28#include <wx/dcscreen.h>
29#include <wx/dcclient.h>
30#include <wx/settings.h>
31#include <wx/toplevel.h>
43 const wxSize& aSize,
long style, const wxString &
name ) :
44 wxPanel( aParent, aId, aPosition, aSize, style,
name )
47 SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
50 SetBackgroundStyle( wxBG_STYLE_PAINT );
74 return wxSize( wxDefaultCoord, 2 *
m_fontSize.y + 0 );
80 return wxPanel::DoGetBestClientSize();
99 dc.SetBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
100 dc.SetBackgroundMode( wxSOLID );
101 dc.SetTextBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
115 wxSize drawSize = GetClientSize();
117 text = ( aUpperText.Len() > aLowerText.Len() ) ? aUpperText : aLowerText;
118 text.Append(
' ', aPadding );
145 const wxString& aLowerText )
148 wxSize drawSize = GetClientSize();
150 if( aXPosition >= 0 )
170 for( ndx = 0; ndx < limit; ++ndx )
198 wxTopLevelWindow* tlw =
dynamic_cast<wxTopLevelWindow*
>( wxGetTopLevelParent(
this ) );
200 if( tlw && !tlw->IsActive() )
201 color = wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT );
203 color = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
205 aDC.SetTextForeground(
color.ToColour() );
228 wxSize size = GetClientSize();
229 wxColour
color = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
231 pen.SetColour(
color );
233 brush.SetColour(
color );
234 brush.SetStyle( wxBRUSHSTYLE_SOLID );
237 aDC->SetBrush( brush );
238 aDC->DrawRectangle( 0, 0, size.x, size.y );
A panel to display various information messages.
void SetMessage(int aXPosition, const wxString &aUpperText, const wxString &aLowerText)
Set a message at aXPosition to aUpperText and aLowerText in the message panel.
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
wxSize DoGetBestClientSize() const override
void showItem(wxDC &dc, const MSG_PANEL_ITEM &aItem)
std::vector< MSG_PANEL_ITEM > m_Items
void OnPaint(wxPaintEvent &aEvent)
A color representation with 4 components: red, green, blue, alpha.
EDA_MSG_PANEL items for displaying messages.
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.