8#include <wx/aui/auibook.h>
9#include <wx/bmpbuttn.h>
10#include <wx/simplebook.h>
11#include <wx/toolbar.h>
48 wxString
GetTitle()
const override {
return "Scene"; }
57 int AddScene(std::unique_ptr<IScene> scene);
65 int InsertScene(
int index, std::unique_ptr<IScene> scene);
Base class for all panels with layout, theme, and state management.
Interface for scene-based UI components (e.g., views or screens).
wxString GetPanelType() const override
Returns the panel type identifier.
void SetSceneChangedCallback(SceneChangedCallback callback)
bool SetActiveScene(int index)
Set the active scene by index.
std::function< void(const std::string &action, const std::string ¶m)> WelcomeActionCallback
void UpdateActiveSceneTitle(const wxString &newTitle)
Update the title of the active scene.
std::vector< std::unique_ptr< IScene > > m_scenes
@ ID_OVERLAY_SELECTED_NODE
@ ID_OVERLAY_CONTROLS_HELP
void OnNewSceneButton(wxCommandEvent &event)
wxAuiNotebook * GetNotebook() const
wxAuiNotebook * m_sceneNotebook
SceneChangedCallback m_sceneChangedCallback
wxString GetTitle() const override
Returns the display title of the panel.
void UpdateOverlayButtonState()
int AddScene(std::unique_ptr< IScene > scene)
Add a new scene to the panel.
void SwitchToNextScene()
Switch to the next scene (cyclic)
MainPanel(wxWindow *parent)
int InsertScene(int index, std::unique_ptr< IScene > scene)
Insert a scene at a specific position.
std::function< void(IScene *newScene, int newIndex)> SceneChangedCallback
size_t GetSceneCount() const
Get the number of scenes.
void SetWelcomeActionCallback(WelcomeActionCallback cb)
void CreateLayout() override
Hook: creates the panel layout. Override to customize.
void OnOverlayMenuItem(wxCommandEvent &event)
bool RemoveScene(int index, bool force=false)
Remove a scene by index.
void OnTabChanged(wxAuiNotebookEvent &event)
wxString GenerateSceneTitle() const
void OnTabClosed(wxAuiNotebookEvent &event)
IScene * GetActiveScene() const
Get the currently active scene.
void ApplyOverlayToActiveCanvas()
wxPanel * CreateWelcomePanel()
bool SceneTitleExists(const wxString &title) const
void ApplyCanvasBackgroundColor(const wxColour &color)
Apply canvas background color to all scenes.
IScene * GetScene(int index) const
Get a scene by index.
void SwitchToPreviousScene()
Switch to the previous scene (cyclic)
WelcomeActionCallback m_welcomeActionCallback
int CreateNewScene()
Create a new empty behavior tree scene.
void OnOverlayButton(wxCommandEvent &event)