TDME2  1.9.200
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DecalEditorTabView.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  * Decal 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<DecalEditorTabController> decalEditorTabController;
53 
54  unique_ptr<Prototype> prototype;
55  unique_ptr<CameraRotationInputHandler> cameraRotationInputHandler;
56 
60 
61  /**
62  * On rotation event to be overloaded
63  */
64  void onCameraRotation() override;
65 
66  /**
67  * On scale event to be overloaded
68  */
69  void onCameraScale() override;
70 
71 public:
72  // forbid class copy
74 
75  /**
76  * Public constructor
77  * @param editorView editor view
78  * @param tabId tab id
79  * @param prototype prototype
80  */
82 
83  /**
84  * Destructor
85  */
87 
88  /**
89  * @return editor view
90  */
92  return editorView;
93  }
94 
95  /**
96  * @return associated tab controller
97  */
98  inline TabController* getTabController() override {
99  return decalEditorTabController.get();
100  }
101 
102  /**
103  * @return pop up views
104  */
105  inline PopUps* getPopUps() {
106  return popUps;
107  }
108 
109  /**
110  * @return prototype
111  */
113  return prototype.get();
114  }
115 
116  // overridden methods
117  void handleInputEvents() override;
118  void display() override;
119  inline const string& getTabId() override {
120  return tabId;
121  }
122  void initialize() override;
123  void dispose() override;
124  Engine* getEngine() override;
125  void activate() override;
126  void deactivate() override;
127  void reloadOutliner() override;
128  inline bool hasFixedSize() override{ return false; };
129  void updateRendering() override;
130 
131  /**
132  * Saving prototype as tempty prototype
133  * @param pathName path name
134  * @param fileName file name
135  */
136  void saveFile(const string& pathName, const string& fileName);
137 
138 };
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.
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
DecalEditorTabView(EditorView *editorView, const string &tabId, Prototype *prototype)
Public constructor.
unique_ptr< DecalEditorTabController > decalEditorTabController
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