TDME2  1.9.200
GUISpaceNode.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
6 #include <tdme/gui/fwd-tdme.h>
11 
12 using std::string;
13 
26 
27 /**
28  * GUI space node
29  * @author Andreas Drewke
30  */
32  : public GUINode
33 {
34  friend class tdme::gui::GUIParser;
35 
36 protected:
37  // forbid class copy
39 
40  /**
41  * Constructor
42  * @param screenNode screen node
43  * @param parentNode parent node
44  * @param id id
45  * @param flow flow
46  * @param alignments alignments
47  * @param requestedConstraints requested constraints
48  * @param backgroundColor background color
49  * @param backgroundImage background image
50  * @param backgroundImageScale9Grid background image scale 9 grid
51  * @param backgroundImageEffectColorMul background image effect color mul
52  * @param backgroundImageEffectColorAdd background image effect color add
53  * @param border border
54  * @param padding padding
55  * @param showOn show on
56  * @param hideOn hide on
57  * @param tooltip tooltip
58  */
62  const string& id,
67  const string& backgroundImage,
71  const GUINode_Border& border,
72  const GUINode_Padding& padding,
75  const string& tooltip
76  );
77 
78  // overridden methods
79  const string getNodeType() override;
80  bool isContentNode() override;
81 
82 public:
83  // overridden methods
84  int getContentWidth() override;
85  int getContentHeight() override;
86 
87  /**
88  * Create requested constraints
89  * @param left left
90  * @param top top
91  * @param width width
92  * @param height height
93  * @param factor factor
94  * @return requested constraints
95  */
96  static GUINode_RequestedConstraints createRequestedConstraints(const string& left, const string& top, const string& width, const string& height, int factor);
97 
98  // overridden methods
99  void dispose() override;
100  void render(GUIRenderer* guiRenderer) override;
101 
102 };
GUI parser.
Definition: GUIParser.h:40
GUI element node conditions.
GUI node base class.
Definition: GUINode.h:64
GUINodeConditions hideOn
Definition: GUINode.h:162
GUIColor backgroundImageEffectColorMul
Definition: GUINode.h:157
GUINode_Border border
Definition: GUINode.h:160
GUINode_Scale9Grid backgroundImageScale9Grid
Definition: GUINode.h:156
GUIColor backgroundImageEffectColorAdd
Definition: GUINode.h:158
GUIParentNode * parentNode
Definition: GUINode.h:148
GUINode_Padding padding
Definition: GUINode.h:159
GUIScreenNode * screenNode
Definition: GUINode.h:147
GUINode_RequestedConstraints requestedConstraints
Definition: GUINode.h:151
GUINode_Alignments alignments
Definition: GUINode.h:150
GUINodeConditions showOn
Definition: GUINode.h:161
GUINode_Flow * flow
Definition: GUINode.h:86
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
const string getNodeType() override
void dispose() override
Dispose node.
void render(GUIRenderer *guiRenderer) override
Render.
GUISpaceNode(GUIScreenNode *screenNode, GUIParentNode *parentNode, const string &id, GUINode_Flow *flow, const GUINode_Alignments &alignments, const GUINode_RequestedConstraints &requestedConstraints, const GUIColor &backgroundColor, const string &backgroundImage, const GUINode_Scale9Grid &backgroundImageScale9Grid, const GUIColor &backgroundImageEffectColorMul, const GUIColor &backgroundImageEffectColorAdd, const GUINode_Border &border, const GUINode_Padding &padding, const GUINodeConditions &showOn, const GUINodeConditions &hideOn, const string &tooltip)
Constructor.
static GUINode_RequestedConstraints createRequestedConstraints(const string &left, const string &top, const string &width, const string &height, int factor)
Create requested constraints.
GUI node border entity.
GUI node padding entity.
GUI node scale 9 grid entity.
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6