28#include <wx/dcscreen.h>
29#include <wx/dcclient.h>
30#include <wx/settings.h>
31#include <wx/toplevel.h>
47 const wxSize& aSize,
long style, const wxString &
name ) :
48 wxPanel( aParent, aId, aPosition, aSize, style,
name )
51 SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
54 SetBackgroundStyle( wxBG_STYLE_PAINT );
78 return wxSize( wxDefaultCoord, 2 *
m_fontSize.y + 0 );
84 return wxPanel::DoGetBestClientSize();
114 wxPaintDC dc(
this );
118 dc.SetBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
119 dc.SetBackgroundMode( wxSOLID );
120 dc.SetTextBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
135 wxSize drawSize = GetClientSize();
137 text = ( upperText.Len() > lowerText.Len() ) ? upperText : lowerText;
176 wxTopLevelWindow* tlw =
dynamic_cast<wxTopLevelWindow*
>( wxGetTopLevelParent(
this ) );
178 if( tlw && !tlw->IsActive() )
179 color = wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT );
181 color = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
183 aDC.SetTextForeground( color.
ToColour() );
206 wxSize size = GetClientSize();
207 wxColour color = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
209 pen.SetColour( color );
211 brush.SetColour( color );
212 brush.SetStyle( wxBRUSHSTYLE_SOLID );
215 aDC->SetBrush( brush );
216 aDC->DrawRectangle( 0, 0, size.x, size.y );
223 std::optional<wxString> uuid;
230 uuid = uuid->SubString( 0, 7 );
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
A panel to display various information messages.
void AppendMessage(const wxString &aUpperText, const wxString &aLowerText, int aPadding=6)
Append a message to the message panel.
void OnDPIChanged(wxDPIChangedEvent &aEvent)
wxSize DoGetBestSize() const override
int m_last_x
the last used x coordinate
EDA_MSG_PANEL(wxWindow *aParent, int aId, const wxPoint &aPosition, const wxSize &aSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxPanelNameStr)
void updateItemPos(MSG_PANEL_ITEM &aItem)
wxSize DoGetBestClientSize() const override
void showItem(wxDC &dc, const MSG_PANEL_ITEM &aItem)
std::vector< MSG_PANEL_ITEM > m_Items
void OnPaint(wxPaintEvent &aEvent)
void OnSize(wxSizeEvent &aEvent)
A color representation with 4 components: red, green, blue, alpha.
wxColour ToColour() const
wxString AsString() const
EDA_MSG_PANEL items for displaying messages.
const wxString & GetUpperText() const
const wxString & GetLowerText() const
int m_MsgPanelShowUuids
Show UUIDs of items in the message panel.
std::optional< wxString > GetMsgPanelDisplayUuid(const KIID &aKiid)
Get a formatted UUID string for display in the message panel, according to the current advanced confi...
Message panel definition file.
KICOMMON_API wxFont GetStatusFont(wxWindow *aWindow)
KICOMMON_API wxFont GetControlFont(wxWindow *aWindow)
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
Functions to provide common constants and other functions to assist in making a consistent UI.