TDME2  1.9.200
SoundTabView.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 #include <tdme/tdme.h>
7 #include <tdme/audio/fwd-tdme.h>
8 #include <tdme/engine/fwd-tdme.h>
17 
18 using std::string;
19 using std::unique_ptr;
20 
21 using tdme::audio::Audio;
31 
32 /**
33  * Sound tab view
34  * @author Andreas Drewke
35  */
37  : public TabView
38 {
39 protected:
40  unique_ptr<Engine> engine;
41  Audio* audio { nullptr };
42 
43 private:
44  EditorView* editorView { nullptr };
45  string tabId;
46  GUIScreenNode* screenNode { nullptr };
47  PopUps* popUps { nullptr };
48  unique_ptr<SoundTabController> soundTabController;
50  AudioEntity* audioEntity { nullptr };
51 
52 public:
53  // forbid class copy
55 
56  /**
57  * Public constructor
58  * @param editorView editor view
59  * @param tabId tab id
60  * @param screenNode screenNode
61  * @param audioEntity audioEntity
62  */
64 
65  /**
66  * Destructor
67  */
68  ~SoundTabView();
69 
70  /**
71  * @return editor view
72  */
74  return editorView;
75  }
76 
77  /**
78  * @return associated tab controller
79  */
80  inline TabController* getTabController() override {
81  return soundTabController.get();
82  }
83 
84  /**
85  * @return pop up views
86  */
87  inline PopUps* getPopUps() {
88  return popUps;
89  }
90 
91  // overridden methods
92  void handleInputEvents() override;
93  void display() override;
94  inline const string& getTabId() override {
95  return tabId;
96  }
97  void initialize() override;
98  void dispose() override;
99  Engine* getEngine() override;
100  void activate() override;
101  void deactivate() override;
102  void reloadOutliner() override;
103  inline bool hasFixedSize() override{ return false; };
104  void updateRendering() override;
105 
106  /**
107  * Play
108  */
109  void play();
110 
111  /**
112  * Stop
113  */
114  void stop();
115 };
Audio entity base class.
Definition: AudioEntity.h:19
Interface to audio module.
Definition: Audio.h:29
Engine main class.
Definition: Engine.h:131
Frame buffer class.
Definition: FrameBuffer.h:22
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:72
Pop ups controller accessor class.
Definition: PopUps.h:29
void dispose() override
Disposes the view.
SoundTabView(EditorView *editorView, const string &tabId, GUIScreenNode *screenNode, AudioEntity *audioEntity)
Public constructor.
bool hasFixedSize() override
If this viewport framebuffer has a fixed size.
Definition: SoundTabView.h:103
void display() override
Renders the view.
void reloadOutliner() override
Reload outliner.
void initialize() override
Initiates the view.
TabController * getTabController() override
Definition: SoundTabView.h:80
void handleInputEvents() override
Handle input events that have not yet been processed.
void updateRendering() override
Update rendering.
unique_ptr< SoundTabController > soundTabController
Definition: SoundTabView.h:48
Tab controller, which connects UI with logic.
Definition: TabController.h:34
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6