|
KiCad PCB EDA Suite
|
A panel to display various information messages. More...
#include <msgpanel.h>
Public Member Functions | |
| EDA_MSG_PANEL (wxWindow *aParent, int aId, const wxPoint &aPosition, const wxSize &aSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxPanelNameStr) | |
| ~EDA_MSG_PANEL () | |
| void | OnPaint (wxPaintEvent &aEvent) |
| void | OnDPIChanged (wxDPIChangedEvent &aEvent) |
| void | OnSize (wxSizeEvent &aEvent) |
| void | EraseMsgBox () |
| wxSize | DoGetBestSize () const override |
| wxSize | DoGetBestClientSize () const override |
| void | AppendMessage (const wxString &aUpperText, const wxString &aLowerText, int aPadding=6) |
| Append a message to the message panel. | |
| void | AppendMessage (const MSG_PANEL_ITEM &aMessageItem) |
| Append aMessageItem to the message panel. | |
Protected Member Functions | |
| void | updateFontSize () |
| void | rebuildItems () |
| void | updateItemPos (MSG_PANEL_ITEM &aItem) |
| void | showItem (wxDC &dc, const MSG_PANEL_ITEM &aItem) |
| void | erase (wxDC *DC) |
Protected Attributes | |
| std::vector< MSG_PANEL_ITEM > | m_Items |
| int | m_last_x |
| the last used x coordinate | |
| wxSize | m_fontSize |
A panel to display various information messages.
Definition at line 100 of file msgpanel.h.
| EDA_MSG_PANEL::EDA_MSG_PANEL | ( | wxWindow * | aParent, |
| int | aId, | ||
| const wxPoint & | aPosition, | ||
| const wxSize & | aSize, | ||
| long | style = wxTAB_TRAVERSAL, | ||
| const wxString & | name = wxPanelNameStr ) |
Definition at line 46 of file msgpanel.cpp.
References EDA_MSG_PANEL(), KIUI::GetStatusFont(), m_last_x, name, and updateFontSize().
Referenced by EDA_MSG_PANEL().
| EDA_MSG_PANEL::~EDA_MSG_PANEL | ( | ) |
Definition at line 64 of file msgpanel.cpp.
|
inline |
Append aMessageItem to the message panel.
| aMessageItem | is a reference to an MSG_PANEL_ITEM containing the message to append to the panel. |
Definition at line 136 of file msgpanel.h.
References AppendMessage(), MSG_PANEL_ITEM::GetLowerText(), MSG_PANEL_ITEM::GetPadding(), and MSG_PANEL_ITEM::GetUpperText().
| void EDA_MSG_PANEL::AppendMessage | ( | const wxString & | aUpperText, |
| const wxString & | aLowerText, | ||
| int | aPadding = 6 ) |
Append a message to the message panel.
This method automatically adjusts for the width of the text string. Making consecutive calls to AppendMessage will append each message to the right of the last message. This message is not compatible with Affiche_1_Parametre.
| aUpperText | The message upper text. |
| aLowerText | The message lower text. |
| aPadding | Number of spaces to pad between messages (default = 4). |
Definition at line 157 of file msgpanel.cpp.
References m_Items, MSG_PANEL_ITEM::m_LowerText, MSG_PANEL_ITEM::m_UpperText, Refresh(), and updateItemPos().
Referenced by AppendMessage().
|
override |
Definition at line 82 of file msgpanel.cpp.
|
override |
Definition at line 76 of file msgpanel.cpp.
References m_fontSize.
|
protected |
Definition at line 201 of file msgpanel.cpp.
Referenced by OnPaint().
| void EDA_MSG_PANEL::EraseMsgBox | ( | ) |
Definition at line 193 of file msgpanel.cpp.
| void EDA_MSG_PANEL::OnDPIChanged | ( | wxDPIChangedEvent & | aEvent | ) |
Definition at line 88 of file msgpanel.cpp.
References updateFontSize().
| void EDA_MSG_PANEL::OnPaint | ( | wxPaintEvent & | aEvent | ) |
Definition at line 112 of file msgpanel.cpp.
References erase(), KIUI::GetControlFont(), m_Items, and showItem().
| void EDA_MSG_PANEL::OnSize | ( | wxSizeEvent & | aEvent | ) |
Definition at line 106 of file msgpanel.cpp.
References rebuildItems().
|
protected |
Definition at line 97 of file msgpanel.cpp.
References m_Items, m_last_x, and updateItemPos().
Referenced by OnSize().
|
protected |
Definition at line 171 of file msgpanel.cpp.
References MSG_PANEL_ITEM::m_LowerText, MSG_PANEL_ITEM::m_LowerY, MSG_PANEL_ITEM::m_UpperText, MSG_PANEL_ITEM::m_UpperY, MSG_PANEL_ITEM::m_X, and KIGFX::COLOR4D::ToColour().
Referenced by OnPaint().
|
protected |
Definition at line 69 of file msgpanel.cpp.
References KIUI::GetControlFont(), and m_fontSize.
Referenced by EDA_MSG_PANEL(), and OnDPIChanged().
|
protected |
Definition at line 130 of file msgpanel.cpp.
References MSG_PANEL_ITEM::GetLowerText(), MSG_PANEL_ITEM::GetPadding(), MSG_PANEL_ITEM::GetUpperText(), m_fontSize, m_last_x, MSG_PANEL_ITEM::m_LowerY, MSG_PANEL_ITEM::m_UpperY, MSG_PANEL_ITEM::m_X, and text.
Referenced by AppendMessage(), and rebuildItems().
|
protected |
Definition at line 158 of file msgpanel.h.
Referenced by DoGetBestSize(), updateFontSize(), and updateItemPos().
|
protected |
Definition at line 156 of file msgpanel.h.
Referenced by AppendMessage(), EraseMsgBox(), OnPaint(), and rebuildItems().
|
protected |
the last used x coordinate
Definition at line 157 of file msgpanel.h.
Referenced by EDA_MSG_PANEL(), EraseMsgBox(), rebuildItems(), and updateItemPos().