Ember
Loading...
Searching...
No Matches
EmberForge::CustomAuiNotebook Class Reference

Custom wxAuiNotebook that integrates Add Tab and Menu buttons into the tab bar. More...

#include <CustomAuiNotebook.h>

Inheritance diagram for EmberForge::CustomAuiNotebook:

Public Member Functions

 CustomAuiNotebook (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxAUI_NB_DEFAULT_STYLE)
virtual ~CustomAuiNotebook ()=default
CustomTabArtGetCustomTabArt () const
 Get the custom tab art provider.
void SetTabBarButtonsEnabled (bool enabled)
 Enable or disable the integrated tab bar buttons.
bool AreTabBarButtonsEnabled () const
 Check if tab bar buttons are enabled.

Protected Member Functions

void OnSize (wxSizeEvent &event)
void OnAddButtonClicked (wxCommandEvent &event)
void OnMenuButtonClicked (wxCommandEvent &event)

Private Member Functions

void CreateButtons ()
void UpdateButtonPositions ()
void LoadButtonIcons ()
 wxDECLARE_EVENT_TABLE ()

Private Attributes

CustomTabArtm_customTabArt
wxBitmapButton * m_addButton
wxBitmapButton * m_menuButton
bool m_buttonsEnabled
wxBitmap m_plusNormal
wxBitmap m_plusHovered
wxBitmap m_plusPressed
wxBitmap m_menuNormal
wxBitmap m_menuHovered
wxBitmap m_menuPressed

Static Private Attributes

static const int BUTTON_SIZE = 36
static const int BUTTON_SPACING = 4
static const int BUTTON_MARGIN = 8

Detailed Description

Custom wxAuiNotebook that integrates Add Tab and Menu buttons into the tab bar.

This class extends wxAuiNotebook to:

  • Place actual button widgets at the right side of the tab bar
  • Handle button clicks and send custom events

Definition at line 16 of file CustomAuiNotebook.h.

Constructor & Destructor Documentation

◆ CustomAuiNotebook()

EmberForge::CustomAuiNotebook::CustomAuiNotebook ( wxWindow * parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxAUI_NB_DEFAULT_STYLE )

◆ ~CustomAuiNotebook()

virtual EmberForge::CustomAuiNotebook::~CustomAuiNotebook ( )
virtualdefault

Member Function Documentation

◆ AreTabBarButtonsEnabled()

bool EmberForge::CustomAuiNotebook::AreTabBarButtonsEnabled ( ) const
inline

Check if tab bar buttons are enabled.

Returns
true if buttons are enabled

Definition at line 39 of file CustomAuiNotebook.h.

◆ CreateButtons()

void EmberForge::CustomAuiNotebook::CreateButtons ( )
private

Definition at line 39 of file CustomAuiNotebook.cpp.

◆ GetCustomTabArt()

CustomTabArt * EmberForge::CustomAuiNotebook::GetCustomTabArt ( ) const
inline

Get the custom tab art provider.

Returns
Pointer to the CustomTabArt instance

Definition at line 27 of file CustomAuiNotebook.h.

◆ LoadButtonIcons()

void EmberForge::CustomAuiNotebook::LoadButtonIcons ( )
private

Definition at line 25 of file CustomAuiNotebook.cpp.

◆ OnAddButtonClicked()

void EmberForge::CustomAuiNotebook::OnAddButtonClicked ( wxCommandEvent & event)
protected

Definition at line 136 of file CustomAuiNotebook.cpp.

◆ OnMenuButtonClicked()

void EmberForge::CustomAuiNotebook::OnMenuButtonClicked ( wxCommandEvent & event)
protected

Definition at line 143 of file CustomAuiNotebook.cpp.

◆ OnSize()

void EmberForge::CustomAuiNotebook::OnSize ( wxSizeEvent & event)
protected

Definition at line 130 of file CustomAuiNotebook.cpp.

◆ SetTabBarButtonsEnabled()

void EmberForge::CustomAuiNotebook::SetTabBarButtonsEnabled ( bool enabled)

Enable or disable the integrated tab bar buttons.

Parameters
enabledWhether buttons should be shown

Definition at line 119 of file CustomAuiNotebook.cpp.

◆ UpdateButtonPositions()

void EmberForge::CustomAuiNotebook::UpdateButtonPositions ( )
private

Definition at line 82 of file CustomAuiNotebook.cpp.

◆ wxDECLARE_EVENT_TABLE()

EmberForge::CustomAuiNotebook::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ BUTTON_MARGIN

const int EmberForge::CustomAuiNotebook::BUTTON_MARGIN = 8
staticprivate

Definition at line 62 of file CustomAuiNotebook.h.

◆ BUTTON_SIZE

const int EmberForge::CustomAuiNotebook::BUTTON_SIZE = 36
staticprivate

Definition at line 60 of file CustomAuiNotebook.h.

◆ BUTTON_SPACING

const int EmberForge::CustomAuiNotebook::BUTTON_SPACING = 4
staticprivate

Definition at line 61 of file CustomAuiNotebook.h.

◆ m_addButton

wxBitmapButton* EmberForge::CustomAuiNotebook::m_addButton
private

Definition at line 52 of file CustomAuiNotebook.h.

◆ m_buttonsEnabled

bool EmberForge::CustomAuiNotebook::m_buttonsEnabled
private

Definition at line 54 of file CustomAuiNotebook.h.

◆ m_customTabArt

CustomTabArt* EmberForge::CustomAuiNotebook::m_customTabArt
private

Definition at line 51 of file CustomAuiNotebook.h.

◆ m_menuButton

wxBitmapButton* EmberForge::CustomAuiNotebook::m_menuButton
private

Definition at line 53 of file CustomAuiNotebook.h.

◆ m_menuHovered

wxBitmap EmberForge::CustomAuiNotebook::m_menuHovered
private

Definition at line 58 of file CustomAuiNotebook.h.

◆ m_menuNormal

wxBitmap EmberForge::CustomAuiNotebook::m_menuNormal
private

Definition at line 58 of file CustomAuiNotebook.h.

◆ m_menuPressed

wxBitmap EmberForge::CustomAuiNotebook::m_menuPressed
private

Definition at line 58 of file CustomAuiNotebook.h.

◆ m_plusHovered

wxBitmap EmberForge::CustomAuiNotebook::m_plusHovered
private

Definition at line 57 of file CustomAuiNotebook.h.

◆ m_plusNormal

wxBitmap EmberForge::CustomAuiNotebook::m_plusNormal
private

Definition at line 57 of file CustomAuiNotebook.h.

◆ m_plusPressed

wxBitmap EmberForge::CustomAuiNotebook::m_plusPressed
private

Definition at line 57 of file CustomAuiNotebook.h.


The documentation for this class was generated from the following files: