TDME2  1.9.200
TriggerEditorTabView.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/engine/fwd-tdme.h>
18 
19 using std::string;
20 using std::unique_ptr;
21 
35 
36 /**
37  * Trigger editor tab view
38  * @author Andreas Drewke
39  */
41  : public TabView
43 {
44 protected:
45  unique_ptr<Engine> engine;
46 
47 private:
48  EditorView* editorView { nullptr };
49  string tabId;
50  PopUps* popUps { nullptr };
51  unique_ptr<TriggerEditorTabController> triggerEditorTabController;
53 
54  unique_ptr<Prototype> prototype;
55  unique_ptr<CameraRotationInputHandler> cameraRotationInputHandler;
59 
60  /**
61  * On rotation event to be overloaded
62  */
63  void onCameraRotation() override;
64 
65  /**
66  * On scale event to be overloaded
67  */
68  void onCameraScale() override;
69 
70 public:
71  // forbid class copy
73 
74  /**
75  * Public constructor
76  * @param editorView editor view
77  * @param tabId tab id
78  * @param prototype prototype
79  */
81 
82  /**
83  * Destructor
84  */
86 
87  /**
88  * @return editor view
89  */
91  return editorView;
92  }
93 
94  /**
95  * @return associated tab controller
96  */
97  inline TabController* getTabController() override {
98  return triggerEditorTabController.get();
99  }
100 
101  /**
102  * @return pop up views
103  */
104  inline PopUps* getPopUps() {
105  return popUps;
106  }
107 
108  /**
109  * @return prototype
110  */
112  return prototype.get();
113  }
114 
115  // overridden methods
116  void handleInputEvents() override;
117  void display() override;
118  inline const string& getTabId() override {
119  return tabId;
120  }
121  void initialize() override;
122  void dispose() override;
123  Engine* getEngine() override;
124  void activate() override;
125  void deactivate() override;
126  void reloadOutliner() override;
127  inline bool hasFixedSize() override{ return false; };
128  void updateRendering() override;
129 
130  /**
131  * Saving prototype as tempty prototype
132  * @param pathName path name
133  * @param fileName file name
134  */
135  void saveFile(const string& pathName, const string& fileName);
136 
137 };
Engine main class.
Definition: Engine.h:131
Frame buffer class.
Definition: FrameBuffer.h:22
Prototype definition.
Definition: Prototype.h:55
Scene definition.
Definition: Scene.h:50
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Definition: Vector3.h:20
Pop ups controller accessor class.
Definition: PopUps.h:29
void saveFile(const string &pathName, const string &fileName)
Saving prototype as tempty prototype.
unique_ptr< TriggerEditorTabController > triggerEditorTabController
bool hasFixedSize() override
If this viewport framebuffer has a fixed size.
void onCameraRotation() override
On rotation event to be overloaded.
void handleInputEvents() override
Handle input events that have not yet been processed.
unique_ptr< CameraRotationInputHandler > cameraRotationInputHandler
TriggerEditorTabView(EditorView *editorView, const string &tabId, Prototype *prototype)
Public constructor.
void onCameraScale() override
On scale event to be overloaded.
Tab controller, which connects UI with logic.
Definition: TabController.h:34
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6