Base class for all panels with layout, theme, and state management.
More...
#include <Panel.h>
|
| | 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.
|
| wxString | GetTitle () const override |
| | Returns the panel title.
|
| wxString | GetPanelType () const override |
| | Returns the panel type identifier.
|
| 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.
|
| virtual | ~IPanel ()=default |
|
| virtual void | CreateLayout () |
| | Hook: creates the panel layout. Override to customize.
|
| 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.
|
Base class for all panels with layout, theme, and state management.
Definition at line 11 of file Panel.h.
◆ Panel() [1/2]
| EmberUI::Panel::Panel |
( |
wxWindow * | parent, |
|
|
const wxString & | name = "Panel", |
|
|
long | style = wxTAB_TRAVERSAL ) |
|
explicit |
Constructs the panel with optional name and style.
◆ ~Panel()
| EmberUI::Panel::~Panel |
( |
| ) |
|
|
virtual |
◆ Panel() [2/2]
| EmberUI::Panel::Panel |
( |
const Panel & | | ) |
|
|
privatedelete |
◆ ApplyTheme()
| void EmberUI::Panel::ApplyTheme |
( |
| ) |
|
|
protectedvirtual |
Hook: applies theme colors and fonts. Override to customize.
Definition at line 122 of file Panel.cpp.
◆ Cleanup()
| void EmberUI::Panel::Cleanup |
( |
| ) |
|
|
overridevirtual |
Cleans up panel resources.
Reimplemented from IPanel.
Definition at line 63 of file Panel.cpp.
◆ CreateLayout()
| void EmberUI::Panel::CreateLayout |
( |
| ) |
|
|
protectedvirtual |
◆ DeserializeState()
| void EmberUI::Panel::DeserializeState |
( |
const wxString & | state | ) |
|
|
overridevirtual |
Restores panel state from a serialized string.
Reimplemented from IPanel.
Definition at line 87 of file Panel.cpp.
◆ DoApplyTheme()
| void EmberUI::Panel::DoApplyTheme |
( |
| ) |
|
|
private |
◆ DoCleanup()
| void EmberUI::Panel::DoCleanup |
( |
| ) |
|
|
private |
◆ ExecuteOperation()
| bool EmberUI::Panel::ExecuteOperation |
( |
const wxString & | operation, |
|
|
const wxString & | parameter = "" ) |
|
overridevirtual |
Executes a named operation with optional parameter.
Reimplemented from IPanel.
Definition at line 100 of file Panel.cpp.
◆ GetMainSizer()
| wxSizer * EmberUI::Panel::GetMainSizer |
( |
| ) |
const |
|
inlineprotected |
Returns the main sizer for layout.
Definition at line 83 of file Panel.h.
◆ GetName()
| wxString EmberUI::Panel::GetName |
( |
| ) |
const |
|
inlineoverride |
Returns the panel name.
Definition at line 54 of file Panel.h.
◆ GetPanel()
| wxPanel * EmberUI::Panel::GetPanel |
( |
| ) |
|
|
inlineoverridevirtual |
Returns this panel as wxPanel pointer.
Implements IPanel.
Definition at line 18 of file Panel.h.
◆ GetPanelType()
| wxString EmberUI::Panel::GetPanelType |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ GetTitle()
| wxString EmberUI::Panel::GetTitle |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ HandleActivation()
| void EmberUI::Panel::HandleActivation |
( |
| ) |
|
|
protectedvirtual |
Hook: handles panel activation. Override to customize.
Definition at line 132 of file Panel.cpp.
◆ HandleDeactivation()
| void EmberUI::Panel::HandleDeactivation |
( |
| ) |
|
|
protectedvirtual |
Hook: handles panel deactivation. Override to customize.
Definition at line 134 of file Panel.cpp.
◆ HasUnsavedChanges()
| bool EmberUI::Panel::HasUnsavedChanges |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns true if there are unsaved changes.
Reimplemented from IPanel.
Definition at line 44 of file Panel.h.
◆ Initialize()
| void EmberUI::Panel::Initialize |
( |
| ) |
|
|
overridevirtual |
Initializes the panel layout and appearance.
Reimplemented from IPanel.
Definition at line 27 of file Panel.cpp.
◆ InitializePanel()
| void EmberUI::Panel::InitializePanel |
( |
| ) |
|
|
private |
◆ IsValid()
| bool EmberUI::Panel::IsValid |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns true if the panel has been initialized.
Reimplemented from IPanel.
Definition at line 36 of file Panel.h.
◆ MarkChanged()
| void EmberUI::Panel::MarkChanged |
( |
| ) |
|
|
inlineprotected |
Marks the panel as having unsaved changes.
Definition at line 78 of file Panel.h.
◆ MarkSaved()
| void EmberUI::Panel::MarkSaved |
( |
| ) |
|
|
inlineprotected |
Clears the unsaved-changes flag.
Definition at line 80 of file Panel.h.
◆ OnActivated()
| void EmberUI::Panel::OnActivated |
( |
| ) |
|
|
overridevirtual |
Called when the panel is activated.
Reimplemented from IPanel.
Definition at line 47 of file Panel.cpp.
◆ OnDeactivated()
| void EmberUI::Panel::OnDeactivated |
( |
| ) |
|
|
overridevirtual |
Called when the panel is deactivated.
Reimplemented from IPanel.
Definition at line 55 of file Panel.cpp.
◆ OnPanelPaint()
| void EmberUI::Panel::OnPanelPaint |
( |
wxPaintEvent & | event | ) |
|
|
protectedvirtual |
Hook: handles panel paint events.
Definition at line 150 of file Panel.cpp.
◆ OnPanelSize()
| void EmberUI::Panel::OnPanelSize |
( |
wxSizeEvent & | event | ) |
|
|
protectedvirtual |
Hook: handles panel resize events.
Definition at line 143 of file Panel.cpp.
◆ operator=()
| Panel & EmberUI::Panel::operator= |
( |
const Panel & | | ) |
|
|
privatedelete |
◆ Refresh()
| void EmberUI::Panel::Refresh |
( |
| ) |
|
|
overridevirtual |
Refreshes panel content.
Reimplemented from IPanel.
Definition at line 38 of file Panel.cpp.
◆ Save()
| bool EmberUI::Panel::Save |
( |
| ) |
|
|
overridevirtual |
Saves panel state; returns true on success.
Reimplemented from IPanel.
Definition at line 89 of file Panel.cpp.
◆ SerializeState()
| wxString EmberUI::Panel::SerializeState |
( |
| ) |
const |
|
overridevirtual |
Serializes panel state to a string.
Reimplemented from IPanel.
Definition at line 78 of file Panel.cpp.
◆ SetMainSizer()
| void EmberUI::Panel::SetMainSizer |
( |
wxSizer * | sizer | ) |
|
|
protected |
Sets the main sizer.
Definition at line 138 of file Panel.cpp.
◆ SetName()
| void EmberUI::Panel::SetName |
( |
const wxString & | name | ) |
|
|
override |
Sets the panel name.
Definition at line 22 of file Panel.cpp.
◆ SetPanelType()
| void EmberUI::Panel::SetPanelType |
( |
const wxString & | type | ) |
|
|
inline |
Sets the panel type identifier.
Definition at line 61 of file Panel.h.
◆ SetTitle()
| void EmberUI::Panel::SetTitle |
( |
const wxString & | title | ) |
|
|
inline |
Sets the panel title.
Definition at line 59 of file Panel.h.
◆ SetupEventHandlers()
| void EmberUI::Panel::SetupEventHandlers |
( |
| ) |
|
|
private |
◆ SupportsOperation()
| bool EmberUI::Panel::SupportsOperation |
( |
const wxString & | operation | ) |
const |
|
overridevirtual |
Returns true if the panel supports the given operation.
Reimplemented from IPanel.
Definition at line 96 of file Panel.cpp.
◆ UpdateAppearance()
| void EmberUI::Panel::UpdateAppearance |
( |
| ) |
|
|
private |
◆ UpdateContent()
| void EmberUI::Panel::UpdateContent |
( |
| ) |
|
|
protectedvirtual |
Hook: updates displayed content. Override to refresh data.
Definition at line 130 of file Panel.cpp.
◆ ValidateState()
| bool EmberUI::Panel::ValidateState |
( |
| ) |
const |
|
protectedvirtual |
Hook: validates panel state; returns true if valid.
Definition at line 136 of file Panel.cpp.
◆ background_color_
| wxColour EmberUI::Panel::background_color_ |
|
private |
◆ foreground_color_
| wxColour EmberUI::Panel::foreground_color_ |
|
private |
◆ has_unsaved_changes_
| bool EmberUI::Panel::has_unsaved_changes_ |
|
private |
◆ is_active_
| bool EmberUI::Panel::is_active_ |
|
private |
◆ is_initialized_
| bool EmberUI::Panel::is_initialized_ |
|
private |
◆ main_sizer_
| wxSizer* EmberUI::Panel::main_sizer_ |
|
private |
◆ name_
| wxString EmberUI::Panel::name_ |
|
private |
◆ panel_font_
| wxFont EmberUI::Panel::panel_font_ |
|
private |
◆ panel_type_
| wxString EmberUI::Panel::panel_type_ |
|
private |
◆ title_
| wxString EmberUI::Panel::title_ |
|
private |
The documentation for this class was generated from the following files: