Ember
Loading...
Searching...
No Matches
CustomAuiNotebook.h
Go to the documentation of this file.
1#pragma once
2
4#include <wx/aui/auibook.h>
5#include <wx/bmpbuttn.h>
6
7namespace EmberForge {
8
16class CustomAuiNotebook : public wxAuiNotebook {
17 public:
18 CustomAuiNotebook(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition,
19 const wxSize &size = wxDefaultSize, long style = wxAUI_NB_DEFAULT_STYLE);
20
21 virtual ~CustomAuiNotebook() = default;
22
28
33 void SetTabBarButtonsEnabled(bool enabled);
34
40
41 protected:
42 void OnSize(wxSizeEvent &event);
43 void OnAddButtonClicked(wxCommandEvent &event);
44 void OnMenuButtonClicked(wxCommandEvent &event);
45
46 private:
47 void CreateButtons();
49 void LoadButtonIcons();
50
52 wxBitmapButton *m_addButton;
53 wxBitmapButton *m_menuButton;
55
56 // Button bitmaps
59
60 static const int BUTTON_SIZE = 36;
61 static const int BUTTON_SPACING = 4;
62 static const int BUTTON_MARGIN = 8;
63
65};
66
67} // namespace EmberForge
CustomTabArt * GetCustomTabArt() const
Get the custom tab art provider.
bool AreTabBarButtonsEnabled() const
Check if tab bar buttons are enabled.
virtual ~CustomAuiNotebook()=default
void OnAddButtonClicked(wxCommandEvent &event)
void SetTabBarButtonsEnabled(bool enabled)
Enable or disable the integrated tab bar buttons.
void OnMenuButtonClicked(wxCommandEvent &event)
void OnSize(wxSizeEvent &event)
CustomAuiNotebook(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxAUI_NB_DEFAULT_STYLE)
Custom tab art provider that uses the application's accent color.