TDME2  1.9.200
Editor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 #include <vector>
6 
7 #include <tdme/tdme.h>
9 #include <tdme/engine/fwd-tdme.h>
14 
15 using std::string;
16 using std::unique_ptr;
17 using std::vector;
18 
24 
25 /**
26  * TDME editor
27  * @author andreas.drewke
28  */
30  : public virtual Application
31 {
32 private:
34  Engine* engine { nullptr };
35  View* view { nullptr };
37  View* viewNew { nullptr };
39  unique_ptr<PopUps> popUps;
40  unique_ptr<EditorView> editorView;
41 
42 public:
43 
44  /**
45  * Main
46  * @param argc argument count
47  * @param argv argument values
48  * @return exit code
49  */
50  static int main(int argc, char** argv);
51 
52  /**
53  * @return particle system instance
54  */
55  inline static Editor* getInstance() {
56  return instance;
57  }
58 
59  // forbid class copy
61 
62  /**
63  * Public constructor
64  */
65  Editor();
66 
67  /**
68  * Destructor
69  */
70  ~Editor();
71 
72  /**
73  * @return if editor is running in full screen
74  */
75  bool isFullScreen();
76 
77  /**
78  * Set up new view
79  * @param view view
80  */
81  void setView(View* view);
82 
83  /**
84  * @return current view
85  */
86  View* getView();
87 
88  /**
89  * Request to exit the viewer
90  */
91  void quit();
92 
93  /**
94  * Renders the scene
95  */
96  void display();
97 
98  /**
99  * Shutdown tdme viewer
100  */
101  void dispose();
102 
103  /**
104  * Initialize tdme scene editor
105  */
106  void initialize();
107 
108  /**
109  * Reshape tdme scene editor
110  * @param width width
111  * @param height height
112  */
113  void reshape(int width, int height);
114 
115  // overridden methods
116  void onDrop(const vector<string>& paths);
117  void onClose();
118 };
Application base class, please make sure to allocate application on heap to have correct application ...
Definition: Application.h:41
Engine main class.
Definition: Engine.h:131
void display()
Renders the scene.
Definition: Editor.cpp:101
void quit()
Request to exit the viewer.
Definition: Editor.cpp:96
void initialize()
Initialize tdme scene editor.
Definition: Editor.cpp:145
static int main(int argc, char **argv)
Main.
Definition: Editor.cpp:69
Editor()
Public constructor.
Definition: Editor.cpp:52
unique_ptr< EditorView > editorView
Definition: Editor.h:40
void reshape(int width, int height)
Reshape tdme scene editor.
Definition: Editor.cpp:158
static STATIC_DLL_IMPEXT Editor * instance
Definition: Editor.h:33
static Editor * getInstance()
Definition: Editor.h:55
void onClose()
On close.
Definition: Editor.cpp:167
void setView(View *view)
Set up new view.
Definition: Editor.cpp:86
void dispose()
Shutdown tdme viewer.
Definition: Editor.cpp:133
unique_ptr< PopUps > popUps
Definition: Editor.h:39
void onDrop(const vector< string > &paths)
On drop.
Definition: Editor.cpp:163
Pop ups controller accessor class.
Definition: PopUps.h:29
View interface, this combines application logic, regarding a application view, with screen controller...
Definition: View.h:11
#define STATIC_DLL_IMPEXT
Definition: tdme.h:15
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6