TDME2  1.9.200
FontTabController.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 
27 #include <ext/tinyxml/tinyxml.h>
28 
30 
31 using std::string;
32 
37 using tdme::gui::GUI;
52 
56 
57 #define AVOID_NULLPTR_STRING(arg) (arg == nullptr?"":arg)
58 
59 FontTabController::FontTabController(FontTabView* view)
60 {
61  this->view = view;
62  this->popUps = view->getPopUps();
63 }
64 
66 }
67 
69 {
70  this->screenNode = screenNode;
71 }
72 
74 {
75 }
76 
78 {
79  showInfoPopUp("Warning", "This command is not supported yet");
80 }
81 
82 void FontTabController::onDrop(const string& payload, int mouseX, int mouseY) {
83  showInfoPopUp("Warning", "You can not drop a file here");
84 }
85 
86 void FontTabController::showInfoPopUp(const string& caption, const string& message)
87 {
88  popUps->getInfoDialogScreenController()->show(caption, message);
89 }
90 
92 {
93 }
94 
96 }
97 
99 }
100 
101 void FontTabController::onContextMenuRequest(GUIElementNode* node, int mouseX, int mouseY) {
102 }
103 
104 void FontTabController::onTooltipShowRequest(GUINode* node, int mouseX, int mouseY) {
105  int tooltipLeft, tooltipTop;
106  if (view->getEditorView()->getCurrentTabTooltipPosition(screenNode, mouseX, mouseY, tooltipLeft, tooltipTop) == false) return;
107  //
108  popUps->getTooltipScreenController()->show(tooltipLeft, tooltipTop, node->getToolTip());
109 }
110 
113 }
114 
116  string xml;
117  xml+= "<selectbox-option text=\"Font\" value=\"font\" />\n";
119 }
120 
123 }
124 
126 {
127 }
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
An attribute is a name-value pair.
Definition: tinyxml.h:734
Always the top level node.
Definition: tinyxml.h:1317
The element is a container class.
Definition: tinyxml.h:886
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