![]() |
Ember
|
#include <ForgeSidePanel.h>
Public Member Functions | |
| SidePanel (wxWindow *parent, MainFrame *mainFrame=nullptr, const wxString &panelName="Side Panel", EmberForge::PanelType panelType=EmberForge::PanelType::LeftPanel, EmberForge::PanelDescriptor *parentDescriptor=nullptr) | |
| virtual | ~SidePanel () |
| void | FinishSetup () |
| wxString | GetTitle () const override=0 |
| Returns the panel title. | |
| wxString | GetPanelType () const override=0 |
| Returns the panel type identifier. | |
| int | AddTab (ITabPtr tab) override |
| Adds a tab and returns its index. | |
| ITabPtr | RemoveTab (int index) override |
| Removes the tab at the given index; returns the removed tab. | |
| bool | SetActiveTab (int index) override |
| Sets the active tab by index; returns true on success. | |
| void | ClearAllTabs () override |
| Removes all tabs. | |
| EmberForge::CustomAuiNotebook * | GetCustomNotebook () const |
| void | ResetToDefaultTab (EmberForge::TabType defaultTabType) |
| void | ResetToDefaultTabs (const std::vector< EmberForge::TabType > &defaultTabTypes) |
| virtual void | ApplyPreferences () |
| virtual void | SaveState () |
| virtual void | RestoreState () |
| void | SetTabBarButtonsEnabled (bool enabled) |
| bool | AreTabBarButtonsEnabled () const |
| void | ToggleTabBarButtons () |
| void | SetPanelName (const wxString &name) |
| const EmberForge::PanelDescriptor & | GetPanelDescriptor () const |
| void | SetPanelDescriptor (const EmberForge::PanelDescriptor &descriptor) |
| Public Member Functions inherited from EmberUI::SidePanel | |
| SidePanel (wxWindow *parent, const wxString &panelName="Side Panel", bool autoLayout=true) | |
| Constructs the side panel with optional name and auto-layout flag. | |
| ITab * | GetTab (int index) const |
| Returns the tab at the given index, or nullptr. | |
| ITab * | GetActiveTab () const |
| Returns the currently active tab, or nullptr. | |
| size_t | GetTabCount () const |
| Returns the number of tabs. | |
| bool | HasTabWithName (const wxString &name) const |
| Returns true if a tab with the given name exists. | |
| wxAuiNotebook * | GetNotebook () const |
| Returns the underlying wxAuiNotebook. | |
| Public Member Functions inherited from EmberUI::Panel | |
| Panel (wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL) | |
| Constructs the panel with optional name and style. | |
| virtual | ~Panel () |
| wxPanel * | GetPanel () override |
| Returns this panel as wxPanel pointer. | |
| void | Initialize () override |
| Initializes the panel layout and appearance. | |
| void | Refresh () override |
| Refreshes panel content. | |
| void | OnActivated () override |
| Called when the panel is activated. | |
| void | OnDeactivated () override |
| Called when the panel is deactivated. | |
| void | Cleanup () override |
| Cleans up panel resources. | |
| bool | IsValid () const override |
| Returns true if the panel has been initialized. | |
| wxString | SerializeState () const override |
| Serializes panel state to a string. | |
| void | DeserializeState (const wxString &state) override |
| Restores panel state from a serialized string. | |
| bool | HasUnsavedChanges () const override |
| Returns true if there are unsaved changes. | |
| bool | Save () override |
| Saves panel state; returns true on success. | |
| bool | SupportsOperation (const wxString &operation) const override |
| Returns true if the panel supports the given operation. | |
| bool | ExecuteOperation (const wxString &operation, const wxString ¶meter="") override |
| Executes a named operation with optional parameter. | |
| wxString | GetName () const override |
| Returns the panel name. | |
| void | SetName (const wxString &name) override |
| Sets the panel name. | |
| void | SetTitle (const wxString &title) |
| Sets the panel title. | |
| void | SetPanelType (const wxString &type) |
| Sets the panel type identifier. | |
| Public Member Functions inherited from IPanel | |
| virtual | ~IPanel ()=default |
Protected Types | |
| enum | BaseEventIDs { ID_BASE_NOTEBOOK = wxID_HIGHEST + 1000 , ID_BASE_HIDE_PANEL_MENU_ITEM , ID_BASE_PREFERENCES_MENU_ITEM , ID_BASE_ADD_TAB_BUTTON , ID_BASE_MENU_BUTTON , ID_BASE_LAST } |
Protected Member Functions | |
| void | CreateLayout () override |
| Creates the side panel layout with the notebook. | |
| void | CreateNotebook () override |
| Hook: creates the notebook control. Override to customize. | |
| virtual void | SetupEventHandlers () |
| virtual void | OnPanelSpecificSetup () |
| virtual bool | GetRememberLastTab () const =0 |
| virtual const std::vector< std::string > & | GetLastOpenTabs () const =0 |
| virtual std::string | GetLastActiveTab () const =0 |
| virtual std::string | GetDefaultActiveTab () const =0 |
| void | RestoreAndEnsureTabs () |
| void | DoCreateLayout () |
| void | DoCreateNotebook () |
| void | DoSetupEventHandlers () |
| virtual void | OnAddTabButtonClicked (wxCommandEvent &event) |
| virtual std::vector< EmberForge::TabType > | GetSupportedTabTypes () const |
| void | OnTabChanged (wxAuiNotebookEvent &event) |
| void | OnTabClosed (wxAuiNotebookEvent &event) |
| void | OnAddTabButtonClickedInternal (wxCommandEvent &event) |
| virtual void | OnMenuButtonClicked (wxCommandEvent &event) |
| void | OnHidePanelClicked (wxCommandEvent &event) |
| void | OnPanelPreferencesClicked (wxCommandEvent &event) |
| void | OnTabBarAddButtonClicked (wxCommandEvent &event) |
| void | OnTabBarMenuButtonClicked (wxCommandEvent &event) |
| void | CreateAndAddTab (EmberForge::TabType tabType) |
| void | ShowTabCreationMenu () |
| Protected Member Functions inherited from EmberUI::SidePanel | |
| virtual void | OnTabAdded (ITab *tab, int index) |
| Hook: called when a tab is added. | |
| virtual void | OnTabRemoved (ITab *tab, int index) |
| Hook: called when a tab is removed. | |
| virtual void | OnActiveTabChanged (ITab *tab, int index) |
| Hook: called when the active tab changes. | |
| Protected Member Functions inherited from EmberUI::Panel | |
| virtual void | ApplyTheme () |
| Hook: applies theme colors and fonts. Override to customize. | |
| virtual void | UpdateContent () |
| Hook: updates displayed content. Override to refresh data. | |
| virtual void | HandleActivation () |
| Hook: handles panel activation. Override to customize. | |
| virtual void | HandleDeactivation () |
| Hook: handles panel deactivation. Override to customize. | |
| virtual bool | ValidateState () const |
| Hook: validates panel state; returns true if valid. | |
| void | MarkChanged () |
| Marks the panel as having unsaved changes. | |
| void | MarkSaved () |
| Clears the unsaved-changes flag. | |
| wxSizer * | GetMainSizer () const |
| Returns the main sizer for layout. | |
| void | SetMainSizer (wxSizer *sizer) |
| Sets the main sizer. | |
| virtual void | OnPanelSize (wxSizeEvent &event) |
| Hook: handles panel resize events. | |
| virtual void | OnPanelPaint (wxPaintEvent &event) |
| Hook: handles panel paint events. | |
Protected Attributes | |
| MainFrame * | m_mainFrame |
| wxString | m_panelName |
| bool | m_tabBarButtonsEnabled |
| bool | m_isInitializing |
| EmberForge::PanelDescriptor | m_descriptor |
| Protected Attributes inherited from EmberUI::SidePanel | |
| wxAuiNotebook * | m_notebook |
| std::vector< ITabPtr > | m_tabs |
| int | m_activeTabIndex |
Private Member Functions | |
| wxDECLARE_EVENT_TABLE () | |
Definition at line 20 of file ForgeSidePanel.h.
|
protected |
| Enumerator | |
|---|---|
| ID_BASE_NOTEBOOK | |
| ID_BASE_HIDE_PANEL_MENU_ITEM | |
| ID_BASE_PREFERENCES_MENU_ITEM | |
| ID_BASE_ADD_TAB_BUTTON | |
| ID_BASE_MENU_BUTTON | |
| ID_BASE_LAST | |
Definition at line 101 of file ForgeSidePanel.h.
| SidePanel::SidePanel | ( | wxWindow * | parent, |
| MainFrame * | mainFrame = nullptr, | ||
| const wxString & | panelName = "Side Panel", | ||
| EmberForge::PanelType | panelType = EmberForge::PanelType::LeftPanel, | ||
| EmberForge::PanelDescriptor * | parentDescriptor = nullptr ) |
|
virtual |
Reimplemented from EmberUI::SidePanel.
Definition at line 42 of file SidePanel.cpp.
|
overridevirtual |
Adds a tab and returns its index.
Reimplemented from EmberUI::SidePanel.
Definition at line 171 of file SidePanel.cpp.
|
virtual |
Reimplemented in BottomPanel, LeftSidePanel, and RightSidePanel.
Definition at line 560 of file SidePanel.cpp.
|
inline |
Definition at line 49 of file ForgeSidePanel.h.
|
overridevirtual |
Removes all tabs.
Reimplemented from EmberUI::SidePanel.
Definition at line 288 of file SidePanel.cpp.
|
protected |
Definition at line 439 of file SidePanel.cpp.
|
overrideprotectedvirtual |
Creates the side panel layout with the notebook.
Reimplemented from EmberUI::SidePanel.
Definition at line 52 of file SidePanel.cpp.
|
overrideprotectedvirtual |
Hook: creates the notebook control. Override to customize.
Reimplemented from EmberUI::SidePanel.
Definition at line 81 of file SidePanel.cpp.
|
protected |
Definition at line 54 of file SidePanel.cpp.
|
protected |
Definition at line 83 of file SidePanel.cpp.
|
protected |
Definition at line 100 of file SidePanel.cpp.
| void SidePanel::FinishSetup | ( | ) |
Definition at line 69 of file SidePanel.cpp.
|
inline |
Definition at line 37 of file ForgeSidePanel.h.
|
protectedpure virtual |
Implemented in BottomPanel, LeftSidePanel, and RightSidePanel.
|
protectedpure virtual |
Implemented in BottomPanel, LeftSidePanel, and RightSidePanel.
|
protectedpure virtual |
Implemented in BottomPanel, LeftSidePanel, and RightSidePanel.
|
inline |
Definition at line 54 of file ForgeSidePanel.h.
|
overridepure virtual |
Returns the panel type identifier.
Reimplemented from EmberUI::Panel.
Implemented in BottomPanel, LeftSidePanel, and RightSidePanel.
|
protectedpure virtual |
Implemented in BottomPanel, LeftSidePanel, and RightSidePanel.
|
inlineprotectedvirtual |
Reimplemented in BottomPanel, LeftSidePanel, and RightSidePanel.
Definition at line 79 of file ForgeSidePanel.h.
|
overridepure virtual |
Returns the panel title.
Reimplemented from EmberUI::Panel.
Implemented in BottomPanel, LeftSidePanel, and RightSidePanel.
|
inlineprotectedvirtual |
Reimplemented in BottomPanel, LeftSidePanel, and RightSidePanel.
Definition at line 78 of file ForgeSidePanel.h.
|
protected |
Definition at line 357 of file SidePanel.cpp.
|
protected |
Definition at line 394 of file SidePanel.cpp.
|
protectedvirtual |
Definition at line 381 of file SidePanel.cpp.
|
protected |
Definition at line 419 of file SidePanel.cpp.
|
protectedvirtual |
Reimplemented in BottomPanel, LeftSidePanel, and RightSidePanel.
Definition at line 104 of file SidePanel.cpp.
|
protected |
Definition at line 367 of file SidePanel.cpp.
|
protected |
Definition at line 374 of file SidePanel.cpp.
|
protected |
Definition at line 298 of file SidePanel.cpp.
|
protected |
Definition at line 320 of file SidePanel.cpp.
|
overridevirtual |
Removes the tab at the given index; returns the removed tab.
Reimplemented from EmberUI::SidePanel.
Definition at line 200 of file SidePanel.cpp.
| void SidePanel::ResetToDefaultTab | ( | EmberForge::TabType | defaultTabType | ) |
Definition at line 227 of file SidePanel.cpp.
| void SidePanel::ResetToDefaultTabs | ( | const std::vector< EmberForge::TabType > & | defaultTabTypes | ) |
Definition at line 263 of file SidePanel.cpp.
|
protected |
Definition at line 108 of file SidePanel.cpp.
|
virtual |
Reimplemented in BottomPanel, LeftSidePanel, and RightSidePanel.
Definition at line 570 of file SidePanel.cpp.
|
virtual |
Reimplemented in BottomPanel, LeftSidePanel, and RightSidePanel.
Definition at line 565 of file SidePanel.cpp.
|
overridevirtual |
Sets the active tab by index; returns true on success.
Reimplemented from EmberUI::SidePanel.
Definition at line 218 of file SidePanel.cpp.
|
inline |
Definition at line 55 of file ForgeSidePanel.h.
|
inline |
Definition at line 52 of file ForgeSidePanel.h.
| void SidePanel::SetTabBarButtonsEnabled | ( | bool | enabled | ) |
Definition at line 540 of file SidePanel.cpp.
|
protectedvirtual |
Definition at line 98 of file SidePanel.cpp.
|
protected |
Definition at line 482 of file SidePanel.cpp.
| void SidePanel::ToggleTabBarButtons | ( | ) |
Definition at line 554 of file SidePanel.cpp.
|
private |
|
protected |
Definition at line 99 of file ForgeSidePanel.h.
|
protected |
Definition at line 98 of file ForgeSidePanel.h.
|
protected |
Definition at line 95 of file ForgeSidePanel.h.
|
protected |
Definition at line 96 of file ForgeSidePanel.h.
|
protected |
Definition at line 97 of file ForgeSidePanel.h.