![]() |
Ember
|
Custom tab art provider that uses the application's accent color. More...
#include <CustomTabArt.h>
Public Member Functions | |
| CustomTabArt () | |
| virtual | ~CustomTabArt ()=default |
| wxAuiTabArt * | Clone () override |
| int | GetIndentSize () override |
| Override to increase tab bar height for larger buttons. | |
| int | GetBestTabCtrlSize (wxWindow *wnd, const wxAuiNotebookPageArray &pages, const wxSize &requiredBmpSize) override |
| Override to get a taller tab bar. | |
| void | UpdateAccentColor () |
| Update the highlight color to match the current accent color preference. | |
| int | DrawPageTab (wxDC &dc, wxWindow *wnd, wxAuiNotebookPage &page, const wxRect &rect) override |
| void | LoadButtonIcons () |
| Load button icons from resources Must be called after construction when a window context is available. | |
| void | DrawTabBarButtons (wxDC &dc, wxWindow *wnd, const wxRect &rect) |
| Draw the tab bar buttons (+ and menu) at the right side of the tab area. | |
| TabBarButton | ButtonHitTest (int x, int y) const |
| Test if a point hits one of the tab bar buttons. | |
| int | GetButtonAreaWidth () const |
| Get the width reserved for buttons on the right side of the tab bar. | |
| void | SetHoveredButton (TabBarButton button) |
| Set the hovered button state (for visual feedback) | |
| void | SetPressedButton (TabBarButton button) |
| Set the pressed button state (for visual feedback) | |
| bool | AreButtonsEnabled () const |
| Check if buttons are enabled/visible. | |
| void | SetButtonsEnabled (bool enabled) |
| Enable or disable the integrated buttons. | |
Private Attributes | |
| wxColour | m_accentColor |
| wxBitmap | m_plusNormal |
| wxBitmap | m_plusHovered |
| wxBitmap | m_plusPressed |
| wxBitmap | m_menuNormal |
| wxBitmap | m_menuHovered |
| wxBitmap | m_menuPressed |
| wxRect | m_plusButtonRect |
| wxRect | m_menuButtonRect |
| TabBarButton | m_hoveredButton |
| TabBarButton | m_pressedButton |
| bool | m_buttonsEnabled |
| bool | m_iconsLoaded |
Static Private Attributes | |
| static const int | BUTTON_SIZE = 20 |
| static const int | BUTTON_SPACING = 4 |
| static const int | BUTTON_MARGIN = 8 |
Custom tab art provider that uses the application's accent color.
This class extends wxAuiFlatTabArt to customize the active tab indicator line color to use the user's configured accent color from preferences. It also provides integrated Add Tab and Menu buttons in the tab bar.
Definition at line 24 of file CustomTabArt.h.
| EmberForge::CustomTabArt::CustomTabArt | ( | ) |
Definition at line 12 of file CustomTabArt.cpp.
|
virtualdefault |
|
inline |
Check if buttons are enabled/visible.
Definition at line 92 of file CustomTabArt.h.
| TabBarButton EmberForge::CustomTabArt::ButtonHitTest | ( | int | x, |
| int | y ) const |
Test if a point hits one of the tab bar buttons.
| x | X coordinate relative to notebook |
| y | Y coordinate relative to notebook |
Definition at line 168 of file CustomTabArt.cpp.
|
override |
Definition at line 19 of file CustomTabArt.cpp.
|
override |
Definition at line 80 of file CustomTabArt.cpp.
| void EmberForge::CustomTabArt::DrawTabBarButtons | ( | wxDC & | dc, |
| wxWindow * | wnd, | ||
| const wxRect & | rect ) |
Draw the tab bar buttons (+ and menu) at the right side of the tab area.
| dc | The device context to draw on |
| wnd | The window (notebook) being drawn |
| rect | The full tab bar area rectangle |
Definition at line 122 of file CustomTabArt.cpp.
|
override |
Override to get a taller tab bar.
Definition at line 49 of file CustomTabArt.cpp.
| int EmberForge::CustomTabArt::GetButtonAreaWidth | ( | ) | const |
Get the width reserved for buttons on the right side of the tab bar.
Definition at line 114 of file CustomTabArt.cpp.
|
override |
Override to increase tab bar height for larger buttons.
Definition at line 44 of file CustomTabArt.cpp.
| void EmberForge::CustomTabArt::LoadButtonIcons | ( | ) |
Load button icons from resources Must be called after construction when a window context is available.
Definition at line 60 of file CustomTabArt.cpp.
|
inline |
Enable or disable the integrated buttons.
| enabled | Whether buttons should be shown |
Definition at line 98 of file CustomTabArt.h.
| void EmberForge::CustomTabArt::SetHoveredButton | ( | TabBarButton | button | ) |
Set the hovered button state (for visual feedback)
| button | The button being hovered, or None |
Definition at line 182 of file CustomTabArt.cpp.
| void EmberForge::CustomTabArt::SetPressedButton | ( | TabBarButton | button | ) |
Set the pressed button state (for visual feedback)
| button | The button being pressed, or None |
Definition at line 184 of file CustomTabArt.cpp.
| void EmberForge::CustomTabArt::UpdateAccentColor | ( | ) |
Update the highlight color to match the current accent color preference.
Definition at line 39 of file CustomTabArt.cpp.
|
staticprivate |
Definition at line 122 of file CustomTabArt.h.
|
staticprivate |
Definition at line 120 of file CustomTabArt.h.
|
staticprivate |
Definition at line 121 of file CustomTabArt.h.
|
private |
Definition at line 101 of file CustomTabArt.h.
|
private |
Definition at line 116 of file CustomTabArt.h.
|
private |
Definition at line 112 of file CustomTabArt.h.
|
private |
Definition at line 117 of file CustomTabArt.h.
|
private |
Definition at line 109 of file CustomTabArt.h.
|
private |
Definition at line 105 of file CustomTabArt.h.
|
private |
Definition at line 105 of file CustomTabArt.h.
|
private |
Definition at line 105 of file CustomTabArt.h.
|
private |
Definition at line 108 of file CustomTabArt.h.
|
private |
Definition at line 104 of file CustomTabArt.h.
|
private |
Definition at line 104 of file CustomTabArt.h.
|
private |
Definition at line 104 of file CustomTabArt.h.
|
private |
Definition at line 113 of file CustomTabArt.h.