TDME2  1.9.200
TextureTabController.cpp
Go to the documentation of this file.
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
11 #include <tdme/gui/GUI.h>
12 #include <tdme/gui/GUIParser.h>
22 #include <tdme/utilities/Action.h>
23 #include <tdme/utilities/Console.h>
26 
28 
29 using std::string;
30 
35 using tdme::gui::GUI;
50 
51 TextureTabController::TextureTabController(TextureTabView* view)
52 {
53  this->view = view;
54  this->popUps = view->getPopUps();
55 }
56 
58 }
59 
61 {
62  this->screenNode = screenNode;
63 }
64 
66 {
67 }
68 
70 {
71  showInfoPopUp("Warning", "This command is not supported yet");
72 }
73 
74 void TextureTabController::onDrop(const string& payload, int mouseX, int mouseY) {
75  showInfoPopUp("Warning", "You can not drop a file here");
76 }
77 
78 void TextureTabController::showInfoPopUp(const string& caption, const string& message)
79 {
80  popUps->getInfoDialogScreenController()->show(caption, message);
81 }
82 
84 {
85 }
86 
88 }
89 
91 }
92 
93 void TextureTabController::onContextMenuRequest(GUIElementNode* node, int mouseX, int mouseY) {
94 }
95 
96 void TextureTabController::onTooltipShowRequest(GUINode* node, int mouseX, int mouseY) {
97  int tooltipLeft, tooltipTop;
98  if (view->getEditorView()->getCurrentTabTooltipPosition(screenNode, mouseX, mouseY, tooltipLeft, tooltipTop) == false) return;
99  //
100  popUps->getTooltipScreenController()->show(tooltipLeft, tooltipTop, node->getToolTip());
101 }
102 
105 }
106 
108  string xml;
109  xml+= "<selectbox-option text=\"Texture\" value=\"texture\" />\n";
111 }
112 
115 }
116 
118 {
119 }
GUI parser.
Definition: GUIParser.h:40
GUI module class.
Definition: GUI.h:64
GUI node base class.
Definition: GUINode.h:64
const string & getToolTip()
Definition: GUINode.h:346
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
File system singleton class.
Definition: FileSystem.h:17
void show(const string &caption, const string &message)
Shows the pop up.
void show(int mouseX, int mouseY, const string &tooltip)
Show tooltip.
Pop ups controller accessor class.
Definition: PopUps.h:29
TooltipScreenController * getTooltipScreenController()
Definition: PopUps.h:131
InfoDialogScreenController * getInfoDialogScreenController()
Definition: PopUps.h:75
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 setOutlinerAddDropDownContent()
Set outliner add drop down content.
void onChange(GUIElementNode *node) override
On change.
void onCommand(TabControllerCommand command) override
On command.
void onUnfocus(GUIElementNode *node) override
On unfocus.
void onTooltipCloseRequest() override
On tooltip close request.
void onFocus(GUIElementNode *node) override
On focus.
void initialize(GUIScreenNode *screenNode) override
Init.
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.
void setOutlinerAddDropDownContent(const string &xml)
Set outliner add drop down content.
Definition: EditorView.cpp:400
void setOutlinerContent(const string &xml)
Set outliner content.
Definition: EditorView.cpp:396
bool getCurrentTabTooltipPosition(GUIScreenNode *screenNode, int mouseX, int mouseY, int &tooltipLeft, int &tooltipTop)
Determine current tab tooltip position.
Definition: EditorView.cpp:439
Console class.
Definition: Console.h:29
Exception base class.
Definition: ExceptionBase.h:19
std::exception Exception
Exception base class.
Definition: Exception.h:18
Tab controller, which connects UI with logic.
Definition: TabController.h:34
Action Interface.
Definition: Action.h:11