36 explicit Panel(wxWindow *parent,
const wxString &name =
"Panel",
long style = wxTAB_TRAVERSAL);
63 bool ExecuteOperation(
const wxString &operation,
const wxString ¶meter =
"")
override;
67 void SetName(
const wxString &name)
override;
162 DECLARE_EVENT_TABLE()
Abstract interface for all panels in the Ember application.
void OnActivated() override
Called when the panel becomes visible/active.
bool SupportsOperation(const wxString &operation) const override
Check if this panel supports the given operation.
virtual void HandleActivation()
Handle panel activation Called when panel becomes active.
virtual void HandleDeactivation()
Handle panel deactivation Called when panel becomes inactive.
void Initialize() override
Initialize the panel after construction Called once after the panel is created and configured.
void SetPanelType(const wxString &type)
virtual void OnPanelSize(wxSizeEvent &event)
void Refresh() override
Called when the panel should refresh its display This should update the panel's content to reflect cu...
bool Save() override
Save the panel's data (if applicable)
bool HasUnsavedChanges() const override
Check if this panel has unsaved changes.
wxPanel * GetPanel() override
Get the main panel widget.
virtual void ApplyTheme()
Apply current theme to the panel Called when theme changes.
void SetupEventHandlers()
wxColour background_color_
wxColour foreground_color_
virtual void OnPanelRightClick(wxContextMenuEvent &event)
void DeserializeState(const wxString &state) override
Restore the panel's state from serialized data.
wxString GetTitle() const override
Get the display title for this panel.
virtual ~Panel()
Destructor.
virtual bool ValidateState() const
Validate panel state Override to provide custom validation logic.
void SetTitle(const wxString &title)
void Cleanup() override
Called when the panel is about to be destroyed Use this for cleanup operations.
virtual void UpdateContent()
Update panel content Called during refresh.
wxString SerializeState() const override
Serialize the panel's current state to a string.
void SetMainSizer(wxSizer *sizer)
Set the main sizer (takes ownership)
Panel(wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL)
Constructor.
void OnDeactivated() override
Called when the panel becomes hidden/inactive.
bool has_unsaved_changes_
wxString GetName() const override
void SetName(const wxString &name) override
virtual void OnPanelPaint(wxPaintEvent &event)
void MarkChanged()
Mark panel as having unsaved changes.
wxString GetPanelType() const override
Get a unique identifier for this panel type.
bool ExecuteOperation(const wxString &operation, const wxString ¶meter="") override
Execute a named operation on this panel.
virtual void CreateLayout()
Create the panel's UI layout Called during initialization.
bool IsValid() const override
Check if the panel is in a valid state.
void MarkSaved()
Mark panel as saved (no unsaved changes)
Panel(const Panel &)=delete
Panel & operator=(const Panel &)=delete
wxSizer * GetMainSizer() const
Get the main sizer for layout management.