Ember
Loading...
Searching...
No Matches
IScene.h
Go to the documentation of this file.
1#pragma once
2
13
14#include <memory>
15#include <wx/wx.h>
16
25class IScene {
26 public:
27 virtual ~IScene() = default;
28
33 virtual wxPanel *GetPanel() = 0;
34
39 virtual wxString GetTitle() const = 0;
40
45 virtual wxString GetSceneType() const = 0;
46
50 virtual void OnActivated() {}
51
55 virtual void OnDeactivated() {}
56
60 virtual void Refresh() {}
61
66 virtual bool HasUnsavedChanges() const { return false; }
67
72 virtual bool Save() { return true; }
73};
Abstract interface for different scene types in the MainPanel.
Definition IScene.h:25
virtual bool HasUnsavedChanges() const
Check if this scene has unsaved changes.
Definition IScene.h:66
virtual ~IScene()=default
virtual void OnActivated()
Called when this scene becomes the active tab.
Definition IScene.h:50
virtual wxString GetSceneType() const =0
Get a unique identifier for this scene type.
virtual void Refresh()
Called when the scene should refresh its display.
Definition IScene.h:60
virtual wxString GetTitle() const =0
Get the display title for this scene.
virtual wxPanel * GetPanel()=0
Get the main panel widget for this scene.
virtual bool Save()
Save the scene (if applicable)
Definition IScene.h:72
virtual void OnDeactivated()
Called when this scene is no longer the active tab.
Definition IScene.h:55