28#include <wx/dcscreen.h>
29#include <wx/dcclient.h>
30#include <wx/settings.h>
31#include <wx/toplevel.h>
42 const wxSize& aSize,
long style, const wxString &
name ) :
43 wxPanel( aParent, aId, aPosition, aSize, style,
name )
46 SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
49 SetBackgroundStyle( wxBG_STYLE_PAINT );
53 m_fontSize = GetTextExtent( wxT(
"W" ) );
64 wxSize fontSizeInPixels;
65 wxWindowDC dc( aWindow );
68 dc.GetTextExtent( wxT(
"W" ), &fontSizeInPixels.x, &fontSizeInPixels.y );
71 return 2 * fontSizeInPixels.y + 0;
81 dc.SetBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
82 dc.SetBackgroundMode( wxSOLID );
83 dc.SetTextBackground( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
97 wxSize drawSize = GetClientSize();
99 text = ( aUpperText.Len() > aLowerText.Len() ) ? aUpperText : aLowerText;
100 text.Append(
' ', aPadding );
127 const wxString& aLowerText )
130 wxSize drawSize = GetClientSize();
132 if( aXPosition >= 0 )
152 for( ndx = 0; ndx < limit; ++ndx )
180 wxTopLevelWindow* tlw =
dynamic_cast<wxTopLevelWindow*
>( wxGetTopLevelParent(
this ) );
182 if( tlw && !tlw->IsActive() )
183 color = wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT );
185 color = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
187 aDC.SetTextForeground(
color.ToColour() );
210 wxSize size = GetClientSize();
211 wxColour
color = wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE );
213 pen.SetColour(
color );
215 brush.SetColour(
color );
216 brush.SetStyle( wxBRUSHSTYLE_SOLID );
219 aDC->SetBrush( brush );
220 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.
int m_last_x
the last used x coordinate
static int GetRequiredHeight(wxWindow *aWindow)
Return the required height (in pixels) of a EDA_MSG_PANEL.
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.
wxFont GetStatusFont(wxWindow *aWindow)
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.