28 #include <wx/dcscreen.h> 29 #include <wx/dcclient.h> 30 #include <wx/settings.h> 31 #include <wx/toplevel.h> 42 const wxPoint& aPosition, const wxSize& aSize,
43 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 );
54 m_fontSize = GetTextExtent( wxT(
"W" ) );
65 wxSize fontSizeInPixels;
66 wxWindowDC dc( aWindow );
69 dc.GetTextExtent( wxT(
"W" ), &fontSizeInPixels.x, &fontSizeInPixels.y );
72 return 2 * fontSizeInPixels.y + 0;
82 dc.SetBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
83 dc.SetBackgroundMode( wxSOLID );
84 dc.SetTextBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
98 wxSize drawSize = GetClientSize();
100 text = ( aUpperText.Len() > aLowerText.Len() ) ? aUpperText : aLowerText;
101 text.Append(
' ', aPadding );
128 const wxString& aLowerText )
131 wxSize drawSize = GetClientSize();
133 if( aXPosition >= 0 )
153 for( ndx=0; ndx<limit; ++ndx )
181 wxTopLevelWindow* tlw = dynamic_cast<wxTopLevelWindow*>( wxGetTopLevelParent(
this ) );
183 if( tlw && !tlw->IsActive() )
184 color = wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT );
186 color = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
188 aDC.SetTextForeground(
color.ToColour() );
211 wxSize size = GetClientSize();
212 wxColour
color = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
214 pen.SetColour(
color );
216 brush.SetColour(
color );
217 brush.SetStyle( wxBRUSHSTYLE_SOLID );
220 aDC->SetBrush( brush );
221 aDC->DrawRectangle( 0, 0, size.x, size.y );
void showItem(wxDC &dc, const MSG_PANEL_ITEM &aItem)
static int GetRequiredHeight(wxWindow *aWindow)
Return the required height (in pixels) of a EDA_MSG_PANEL.
void SetMessage(int aXPosition, const wxString &aUpperText, const wxString &aLowerText)
Set a message at aXPosition to aUpperText and aLowerText in the message panel.
wxFont GetControlFont(wxWindow *aWindow)
A panel to display various information messages.
void OnPaint(wxPaintEvent &aEvent)
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.
std::vector< MSG_PANEL_ITEM > m_Items
int m_last_x
the last used x coordinate
wxFont GetStatusFont(wxWindow *aWindow)
EDA_MSG_PANEL items for displaying messages.
void AppendMessage(const wxString &aUpperText, const wxString &aLowerText, int aPadding=6)
Append a message to the message panel.
Message panel definition file.
A color representation with 4 components: red, green, blue, alpha.