|
KiCad PCB EDA Suite
|
A wxAuiTabArt that renders editor tabs with preview/modified decorations. More...
#include <kicad_tab_art.h>
Public Types | |
| using | STATE_FN = std::function<TAB_VISUAL_STATE( wxWindow* )> |
| Returns the current visual state for a page window. | |
Public Member Functions | |
| KICAD_TAB_ART (STATE_FN aProvider) | |
| wxAuiTabArt * | Clone () override |
| void | DrawTab (wxDC &aDc, wxWindow *aWnd, const wxAuiNotebookPage &aPage, const wxRect &aInRect, int aCloseButtonState, wxRect *aOutTabRect, wxRect *aOutButtonRect, int *aXExtent) override |
| wxSize | GetTabSize (wxDC &aDc, wxWindow *aWnd, const wxString &aCaption, const wxBitmapBundle &aBitmap, bool aActive, int aCloseButtonState, int *aXExtent) override |
Private Member Functions | |
| TAB_VISUAL_STATE | stateFor (wxWindow *aPageWindow) const |
| Visual state for a page, or a default if no provider is set. | |
| wxFont | decoratedFont (const TAB_VISUAL_STATE &aState, bool aActive) const |
| The base caption font for a tab, styled italic for preview and bold for modified. | |
Private Attributes | |
| STATE_FN | m_stateFn |
A wxAuiTabArt that renders editor tabs with preview/modified decorations.
Per-page state comes from a caller callback keyed on the page window, since wxAuiNotebookPage has no slot for it.
Definition at line 48 of file kicad_tab_art.h.
| using KICAD_TAB_ART::STATE_FN = std::function<TAB_VISUAL_STATE( wxWindow* )> |
Returns the current visual state for a page window.
Definition at line 52 of file kicad_tab_art.h.
|
explicit |
Definition at line 47 of file kicad_tab_art.cpp.
References m_stateFn, and move.
Referenced by Clone().
|
override |
Definition at line 57 of file kicad_tab_art.cpp.
References KICAD_TAB_ART(), and m_stateFn.
|
private |
The base caption font for a tab, styled italic for preview and bold for modified.
Definition at line 72 of file kicad_tab_art.cpp.
References TAB_VISUAL_STATE::bold, and TAB_VISUAL_STATE::italic.
Referenced by DrawTab().
|
override |
Definition at line 126 of file kicad_tab_art.cpp.
References decoratedFont(), TAB_VISUAL_STATE::showAsterisk, and stateFor().
|
override |
Definition at line 154 of file kicad_tab_art.cpp.
|
private |
Visual state for a page, or a default if no provider is set.
Definition at line 63 of file kicad_tab_art.cpp.
References m_stateFn.
Referenced by DrawTab().
|
private |
Definition at line 88 of file kicad_tab_art.h.
Referenced by Clone(), KICAD_TAB_ART(), and stateFor().