TDME2  1.9.200
EnvMapEditorTabController.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <array>
4 #include <string>
5 
6 #include <tdme/tdme.h>
18 
19 using std::array;
20 using std::string;
21 
37 
38 /**
39  * Environ map editor screen controller
40  * @author Andreas Drewke
41  */
43  : public TabController
44 {
45 
46 private:
47  EnvMapEditorTabView* view { nullptr };
48  GUIScreenNode* screenNode { nullptr };
49  PopUps* popUps { nullptr };
50 
51  array<string, 7> applyNodesRenderPasses {
52  "rendersettings_renderpass_standard",
53  "rendersettings_renderpass_sky",
54  "rendersettings_renderpass_terrain",
55  "rendersettings_renderpass_water",
56  "rendersettings_renderpass_postprocessing",
57  "rendersettings_frequency",
58  "rendersettings_frequency_value"
59  };
60 
61  array<string, 3> applyNodesLocation {
62  "location_translation_x",
63  "location_translation_y",
64  "location_translation_z"
65  };
66 
67 public:
68  // forbid class copy
70 
71  /**
72  * Public constructor
73  * @param view view
74  */
76 
77  /**
78  * Destructor
79  */
81 
82  /**
83  * Get view
84  * @return view
85  */
87  return view;
88  }
89 
90  // overridden method
91  inline GUIScreenNode* getScreenNode() override {
92  return screenNode;
93  }
94 
95  // overridden methods
96  void initialize(GUIScreenNode* screenNode) override;
97  void dispose() override;
98  void onChange(GUIElementNode* node) override;
99  void onAction(GUIActionListenerType type, GUIElementNode* node) override;
100  void onFocus(GUIElementNode* node) override;
101  void onUnfocus(GUIElementNode* node) override;
102  void onContextMenuRequest(GUIElementNode* node, int mouseX, int mouseY) override;
103  void onTooltipShowRequest(GUINode* node, int mouseX, int mouseY) override;
104  void onTooltipCloseRequest() override;
105  void onCommand(TabControllerCommand command) override;
106  void onDrop(const string& payload, int mouseX, int mouseY) override;
107 
108  /**
109  * Apply render passes
110  */
111  void applyRenderPasses();
112 
113  /**
114  * Apply location
115  */
116  void applyLocation();
117 
118  /**
119  * Set outliner content
120  */
121  void setOutlinerContent();
122 
123  /**
124  * Set outliner add drop down content
125  */
127 
128  /**
129  * Update details panel
130  * @param outlinerNode outliner node
131  */
132  void updateDetails(const string& outlinerNode);
133 
134  /**
135  * Update info text line
136  * @param text text
137  */
138  void updateInfoText(const MutableString& text);
139 
140  /**
141  * Show the information pop up / modal
142  * @param caption caption
143  * @param message message
144  */
145  void showInfoPopUp(const string& caption, const string& message);
146 
147 };
GUI node base class.
Definition: GUINode.h:64
GUI parent node base class thats supporting child nodes.
Definition: GUIParentNode.h:42
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 onContextMenuRequest(GUIElementNode *node, int mouseX, int mouseY) override
On context menu request.
void onDrop(const string &payload, int mouseX, int mouseY) override
On drop.
void updateInfoText(const MutableString &text)
Update info text line.
void onCommand(TabControllerCommand command) override
On command.
EnvMapEditorTabController(EnvMapEditorTabView *view)
Public constructor.
void updateDetails(const string &outlinerNode)
Update details panel.
void showInfoPopUp(const string &caption, const string &message)
Show the information pop up / modal.
void onAction(GUIActionListenerType type, GUIElementNode *node) override
void onTooltipShowRequest(GUINode *node, int mouseX, int mouseY) override
On tooltip show request.
Mutable utf8 aware string class.
Definition: MutableString.h:23
GUI action listener interface.
GUI change listener interface.
GUI focus listener interface.
Tab controller, which connects UI with logic.
Definition: TabController.h:34
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6