TDME2  1.9.200
TriggerEditorTabController.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 #include <tdme/tdme.h>
19 
20 using std::string;
21 using std::unique_ptr;
22 
42 
43 /**
44  * Trigger editor tab controller
45  * @author Andreas Drewke
46  */
48  : public TabController
49 {
50 
51 private:
52  unique_ptr<BasePropertiesSubController> basePropertiesSubController;
53  unique_ptr<PrototypePhysicsSubController> prototypePhysicsSubController;
54  unique_ptr<PrototypeDisplaySubController> prototypeDisplaySubController;
55  unique_ptr<PrototypeScriptSubController> prototypeScriptSubController;
56  TriggerEditorTabView* view { nullptr };
57  GUIScreenNode* screenNode { nullptr };
58  PopUps* popUps { nullptr };
59 
60 public:
61  // forbid class copy
63 
64  /**
65  * Public constructor
66  * @param view view
67  */
69 
70  /**
71  * Destructor
72  */
74 
75  /**
76  * Get view
77  * @return view
78  */
80  return view;
81  }
82 
83  // overridden method
84  inline GUIScreenNode* getScreenNode() override {
85  return screenNode;
86  }
87 
88  /**
89  * @return prototype display sub screen controller
90  */
92  return prototypeDisplaySubController.get();
93  }
94 
95  /**
96  * @return prototype physics sub screen controller
97  */
99  return prototypePhysicsSubController.get();
100  }
101 
102  // overridden methods
103  void initialize(GUIScreenNode* screenNode) override;
104  void dispose() override;
105  void onChange(GUIElementNode* node) override;
106  void onAction(GUIActionListenerType type, GUIElementNode* node) override;
107  void onFocus(GUIElementNode* node) override;
108  void onUnfocus(GUIElementNode* node) override;
109  void onContextMenuRequest(GUIElementNode* node, int mouseX, int mouseY) override;
110  void onTooltipShowRequest(GUINode* node, int mouseX, int mouseY) override;
111  void onTooltipCloseRequest() override;
112  void onCommand(TabControllerCommand command) override;
113  void onDrop(const string& payload, int mouseX, int mouseY) override;
114 
115  /**
116  * Set outliner content
117  */
118  void setOutlinerContent();
119 
120  /**
121  * Set outliner add drop down content
122  */
124 
125  /**
126  * Update details panel
127  * @param outlinerNode outliner node
128  */
129  void updateDetails(const string& outlinerNode);
130 
131  /**
132  * Update info text line
133  * @param text text
134  */
135  void updateInfoText(const MutableString& text);
136 
137  /**
138  * Show the information pop up / modal
139  * @param caption caption
140  * @param message message
141  */
142  void showInfoPopUp(const string& caption, const string& message);
143 
144 };
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.
void updateDetails(const string &outlinerNode)
Update details panel.
unique_ptr< PrototypeScriptSubController > prototypeScriptSubController
unique_ptr< PrototypePhysicsSubController > prototypePhysicsSubController
unique_ptr< PrototypeDisplaySubController > prototypeDisplaySubController
void showInfoPopUp(const string &caption, const string &message)
Show the information pop up / modal.
void onAction(GUIActionListenerType type, GUIElementNode *node) override
TriggerEditorTabController(TriggerEditorTabView *view)
Public constructor.
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