|
| | MainPanel (wxWindow *parent) |
| wxString | GetTitle () const override |
| | Get the display title for this panel.
|
| wxString | GetPanelType () const override |
| | Get a unique identifier for this panel type.
|
| int | AddScene (std::unique_ptr< IScene > scene) |
| | Add a new scene to the panel.
|
| bool | RemoveScene (int index) |
| | Remove a scene by index.
|
| IScene * | GetActiveScene () const |
| | Get the currently active scene.
|
| IScene * | GetScene (int index) const |
| | Get a scene by index.
|
| size_t | GetSceneCount () const |
| | Get the number of scenes.
|
| void | SwitchToNextScene () |
| | Switch to the next scene (cyclic)
|
| void | SwitchToPreviousScene () |
| | Switch to the previous scene (cyclic)
|
| bool | SetActiveScene (int index) |
| | Set the active scene by index.
|
| int | CreateNewScene () |
| | Create a new empty behavior tree scene.
|
| int | CreateNewScene (const wxString &customTitle) |
| | Create a new empty behavior tree scene with custom title.
|
| void | UpdateActiveSceneTitle (const wxString &newTitle) |
| | Update the title of the active scene.
|
| wxAuiNotebook * | GetNotebook () const |
| void | ApplyCanvasBackgroundColor (const wxColour &color) |
| | Apply canvas background color to all scenes.
|
| void | SetSceneChangedCallback (SceneChangedCallback callback) |
| | Panel (wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL) |
| | Constructor.
|
| virtual | ~Panel () |
| | Destructor.
|
| wxPanel * | GetPanel () override |
| | Get the main panel widget.
|
| wxString | GetTitle () const override |
| | Get the display title for this panel.
|
| wxString | GetPanelType () const override |
| | Get a unique identifier for this panel type.
|
| void | Initialize () override |
| | Initialize the panel after construction Called once after the panel is created and configured.
|
| void | Refresh () override |
| | Called when the panel should refresh its display This should update the panel's content to reflect current state.
|
| void | OnActivated () override |
| | Called when the panel becomes visible/active.
|
| void | OnDeactivated () override |
| | Called when the panel becomes hidden/inactive.
|
| void | Cleanup () override |
| | Called when the panel is about to be destroyed Use this for cleanup operations.
|
| bool | IsValid () const override |
| | Check if the panel is in a valid state.
|
| wxString | SerializeState () const override |
| | Serialize the panel's current state to a string.
|
| void | DeserializeState (const wxString &state) override |
| | Restore the panel's state from serialized data.
|
| bool | HasUnsavedChanges () const override |
| | Check if this panel has unsaved changes.
|
| bool | Save () override |
| | Save the panel's data (if applicable)
|
| bool | SupportsOperation (const wxString &operation) const override |
| | Check if this panel supports the given operation.
|
| bool | ExecuteOperation (const wxString &operation, const wxString ¶meter="") override |
| | Execute a named operation on this panel.
|
| wxString | GetName () const override |
| void | SetName (const wxString &name) override |
| void | SetTitle (const wxString &title) |
| void | SetPanelType (const wxString &type) |
| virtual | ~IPanel ()=default |
|
| virtual void | ApplyTheme () |
| | Apply current theme to the panel Called when theme changes.
|
| virtual void | UpdateContent () |
| | Update panel content Called during refresh.
|
| virtual void | HandleActivation () |
| | Handle panel activation Called when panel becomes active.
|
| virtual void | HandleDeactivation () |
| | Handle panel deactivation Called when panel becomes inactive.
|
| virtual bool | ValidateState () const |
| | Validate panel state Override to provide custom validation logic.
|
| void | MarkChanged () |
| | Mark panel as having unsaved changes.
|
| void | MarkSaved () |
| | Mark panel as saved (no unsaved changes)
|
| wxSizer * | GetMainSizer () const |
| | Get the main sizer for layout management.
|
| void | SetMainSizer (wxSizer *sizer) |
| | Set the main sizer (takes ownership)
|
| virtual void | OnPanelSize (wxSizeEvent &event) |
| virtual void | OnPanelPaint (wxPaintEvent &event) |
| virtual void | OnPanelRightClick (wxContextMenuEvent &event) |
Central panel for managing and displaying behavior tree scenes.
MainPanel is the primary workspace area in EmberForge where behavior trees are visualized and edited. It manages multiple scenes using a tabbed notebook interface, allowing users to work with several behavior trees simultaneously.
Features
- Multi-scene support: Open and edit multiple behavior trees in tabs
- Scene navigation: Switch between scenes with keyboard shortcuts or buttons
- Dynamic scene creation: Create new scenes on-the-fly
- Tab management: Close, rename, and reorder scene tabs
Usage
auto scene = std::make_unique<BehaviorTreeScene>(mainPanel->GetNotebook());
int index = mainPanel->AddScene(std::move(scene));
IScene* active = mainPanel->GetActiveScene();
mainPanel->SwitchToNextScene();
Abstract interface for different scene types in the MainPanel.
- See also
- IScene, BehaviorTreeScene, Panel
Definition at line 41 of file MainPanel.h.