8#include <wx/aui/auibook.h>
46 wxString
GetTitle()
const override {
return "Scene"; }
55 int AddScene(std::unique_ptr<IScene> scene);
Abstract interface for different scene types in the MainPanel.
wxString GetPanelType() const override
Get a unique identifier for this panel type.
void SetSceneChangedCallback(SceneChangedCallback callback)
bool SetActiveScene(int index)
Set the active scene by index.
void UpdateActiveSceneTitle(const wxString &newTitle)
Update the title of the active scene.
bool RemoveScene(int index)
Remove a scene by index.
std::vector< std::unique_ptr< IScene > > m_scenes
void OnNewSceneButton(wxCommandEvent &event)
wxAuiNotebook * GetNotebook() const
wxAuiNotebook * m_sceneNotebook
SceneChangedCallback m_sceneChangedCallback
wxString GetTitle() const override
Get the display title for this panel.
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)
std::function< void(IScene *newScene, int newIndex)> SceneChangedCallback
size_t GetSceneCount() const
Get the number of scenes.
void CreateLayout() override
Create the panel's UI layout Called during initialization.
void OnTabChanged(wxAuiNotebookEvent &event)
wxString GenerateSceneTitle() const
void OnTabClosed(wxAuiNotebookEvent &event)
IScene * GetActiveScene() const
Get the currently active scene.
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)
int CreateNewScene()
Create a new empty behavior tree scene.
Panel(wxWindow *parent, const wxString &name="Panel", long style=wxTAB_TRAVERSAL)
Constructor.