Ember
Loading...
Searching...
No Matches
IScene.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <wx/wx.h>
5
7class IScene {
8 public:
9 virtual ~IScene() = default;
10
12 virtual wxPanel *GetPanel() = 0;
14 virtual wxString GetTitle() const = 0;
16 virtual wxString GetSceneType() const = 0;
17
19 virtual void OnActivated() {}
21 virtual void OnDeactivated() {}
23 virtual void Refresh() {}
24
26 virtual bool HasUnsavedChanges() const { return false; }
28 virtual bool Save() { return true; }
30 virtual bool IsClosable() const { return true; }
31};
Interface for scene-based UI components (e.g., views or screens).
Definition IScene.h:7
virtual bool HasUnsavedChanges() const
Returns true if the scene has unsaved changes.
Definition IScene.h:26
virtual ~IScene()=default
virtual void OnActivated()
Called when the scene becomes active.
Definition IScene.h:19
virtual wxString GetSceneType() const =0
Returns the scene type identifier.
virtual bool IsClosable() const
Returns true if the scene can be closed.
Definition IScene.h:30
virtual void Refresh()
Refreshes the scene content.
Definition IScene.h:23
virtual wxString GetTitle() const =0
Returns the display title of the scene.
virtual wxPanel * GetPanel()=0
Returns the wxPanel used as the scene content.
virtual bool Save()
Saves the scene content; returns true on success.
Definition IScene.h:28
virtual void OnDeactivated()
Called when the scene becomes inactive.
Definition IScene.h:21