14 explicit Panel(wxWindow *parent,
const wxString &name =
"Panel",
long style = wxTAB_TRAVERSAL);
51 bool ExecuteOperation(
const wxString &operation,
const wxString ¶meter =
"")
override;
56 void SetName(
const wxString &name)
override;
114 DECLARE_EVENT_TABLE()
bool HasUnsavedChanges() const override
Returns true if there are unsaved changes.
void SetPanelType(const wxString &type)
Sets the panel type identifier.
virtual void OnPanelPaint(wxPaintEvent &event)
Hook: handles panel paint events.
virtual void CreateLayout()
Hook: creates the panel layout. Override to customize.
Panel & operator=(const Panel &)=delete
Panel(wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL)
Constructs the panel with optional name and style.
void Cleanup() override
Cleans up panel resources.
bool IsValid() const override
Returns true if the panel has been initialized.
wxString GetTitle() const override
Returns the panel title.
virtual void HandleActivation()
Hook: handles panel activation. Override to customize.
void DeserializeState(const wxString &state) override
Restores panel state from a serialized string.
void SetName(const wxString &name) override
Sets the panel name.
void SetTitle(const wxString &title)
Sets the panel title.
void OnActivated() override
Called when the panel is activated.
void OnDeactivated() override
Called when the panel is deactivated.
wxColour foreground_color_
virtual void ApplyTheme()
Hook: applies theme colors and fonts. Override to customize.
void MarkChanged()
Marks the panel as having unsaved changes.
virtual void OnPanelSize(wxSizeEvent &event)
Hook: handles panel resize events.
wxString GetPanelType() const override
Returns the panel type identifier.
bool SupportsOperation(const wxString &operation) const override
Returns true if the panel supports the given operation.
void MarkSaved()
Clears the unsaved-changes flag.
bool ExecuteOperation(const wxString &operation, const wxString ¶meter="") override
Executes a named operation with optional parameter.
wxString GetName() const override
Returns the panel name.
wxPanel * GetPanel() override
Returns this panel as wxPanel pointer.
void SetupEventHandlers()
void Initialize() override
Initializes the panel layout and appearance.
void SetMainSizer(wxSizer *sizer)
Sets the main sizer.
wxSizer * GetMainSizer() const
Returns the main sizer for layout.
wxColour background_color_
virtual void UpdateContent()
Hook: updates displayed content. Override to refresh data.
wxString SerializeState() const override
Serializes panel state to a string.
virtual void HandleDeactivation()
Hook: handles panel deactivation. Override to customize.
void Refresh() override
Refreshes panel content.
bool Save() override
Saves panel state; returns true on success.
virtual bool ValidateState() const
Hook: validates panel state; returns true if valid.
bool has_unsaved_changes_
Panel(const Panel &)=delete
Interface for panel-based UI components in the application.