51 wxFont measuring = m_measuringFont;
52 measuring.SetWeight( wxFONTWEIGHT_BOLD );
53 m_measuringFont = measuring;
74 wxFont font = aActive ? m_selectedFont : m_normalFont;
75 font.SetStyle( aState.
italic ? wxFONTSTYLE_ITALIC : wxFONTSTYLE_NORMAL );
76 font.SetWeight( aState.
bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL );
82#if wxCHECK_VERSION( 3, 3, 0 )
84int KICAD_TAB_ART::DrawPageTab( wxDC& aDc, wxWindow* aWnd, wxAuiNotebookPage& aPage,
91 const wxString savedCaption = aPage.caption;
94 aPage.caption = wxT(
"*" ) + aPage.caption;
98 const wxFont savedNormal = m_normalFont;
99 const wxFont savedSelected = m_selectedFont;
101 m_normalFont = decorated;
102 m_selectedFont = decorated;
104 const int xExtent = wxAuiDefaultTabArt::DrawPageTab( aDc, aWnd, aPage, aRect );
106 m_normalFont = savedNormal;
107 m_selectedFont = savedSelected;
108 aPage.caption = savedCaption;
114wxSize KICAD_TAB_ART::GetPageTabSize( wxReadOnlyDC& aDc, wxWindow* aWnd,
115 const wxAuiNotebookPage& aPage,
int* aXExtent )
118 wxAuiNotebookPage reserved = aPage;
119 reserved.caption = wxT(
"*" ) + aPage.caption;
121 return wxAuiDefaultTabArt::GetPageTabSize( aDc, aWnd, reserved, aXExtent );
127 const wxRect& aInRect,
int aCloseButtonState, wxRect* aOutTabRect,
128 wxRect* aOutButtonRect,
int* aXExtent )
133 wxAuiNotebookPage local = aPage;
136 local.caption = wxT(
"*" ) + local.caption;
140 const wxFont savedNormal = m_normalFont;
141 const wxFont savedSelected = m_selectedFont;
143 m_normalFont = decorated;
144 m_selectedFont = decorated;
146 wxAuiDefaultTabArt::DrawTab( aDc, aWnd, local, aInRect, aCloseButtonState, aOutTabRect,
147 aOutButtonRect, aXExtent );
149 m_normalFont = savedNormal;
150 m_selectedFont = savedSelected;
155 const wxBitmapBundle& aBitmap,
bool aActive,
156 int aCloseButtonState,
int* aXExtent )
159 const wxString reserved = wxT(
"*" ) + aCaption;
161 return wxAuiDefaultTabArt::GetTabSize( aDc, aWnd, reserved, aBitmap, aActive, aCloseButtonState,
wxSize GetTabSize(wxDC &aDc, wxWindow *aWnd, const wxString &aCaption, const wxBitmapBundle &aBitmap, bool aActive, int aCloseButtonState, int *aXExtent) override
KICAD_TAB_ART(STATE_FN aProvider)
wxAuiTabArt * Clone() override
std::function< TAB_VISUAL_STATE(wxWindow *)> STATE_FN
Returns the current visual state for a page window.
void DrawTab(wxDC &aDc, wxWindow *aWnd, const wxAuiNotebookPage &aPage, const wxRect &aInRect, int aCloseButtonState, wxRect *aOutTabRect, wxRect *aOutButtonRect, int *aXExtent) override
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.
TAB_VISUAL_STATE stateFor(wxWindow *aPageWindow) const
Visual state for a page, or a default if no provider is set.
TAB_VISUAL_STATE ResolveTabVisualState(bool aPreview, bool aModified)
Resolve a tab's decorations from its document state flags.
Visual decorations derived from document state: preview is italic, modified is bold with a leading as...