TDME2 1.9.121
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
GUINode Class Referenceabstract

GUI node base class. More...

#include <tdme/gui/nodes/GUINode.h>

Inheritance diagram for GUINode:
Inheritance graph
Collaboration diagram for GUINode:
Collaboration graph

Public Member Functions

GUIScreenNodegetScreenNode ()
 
GUIParentNodegetParentNode ()
 
const string & getId ()
 
const string getHierarchicalId ()
 
virtual const string getNodeType ()=0
 
virtual int getContentWidth ()=0
 
virtual int getContentHeight ()=0
 
virtual int getAutoWidth ()
 
virtual int getAutoHeight ()
 
GUINode_BordergetBorder ()
 
GUINode_PaddinggetPadding ()
 
GUINode_RequestedConstraintsgetRequestsConstraints ()
 
GUINode_ComputedConstraintsgetComputedConstraints ()
 
GUIColorgetBackgroundColor ()
 
virtual void dispose ()
 Dispose node. More...
 
bool isConditionsMet ()
 Determine if conditions are set. More...
 
virtual void setConditionsMet ()
 Set conditions met for this node and its subnodes. More...
 
virtual void layoutOnDemand ()
 Layout on demand. More...
 
bool hasEffects ()
 
virtual void applyEffects (GUIRenderer *guiRenderer)
 Apply effects. More...
 
virtual void undoEffects (GUIRenderer *guiRenderer)
 Undo effects. More...
 
virtual void render (GUIRenderer *guiRenderer)
 Render. More...
 
float computeParentChildrenRenderOffsetXTotal ()
 
float computeParentChildrenRenderOffsetYTotal ()
 
bool isEventBelongingToNode (GUIMouseEvent *event, Vector2 &position)
 Is event belonging to node. More...
 
bool isEventBelongingToNode (GUIMouseEvent *event)
 Is event belonging to node. More...
 
void getEventOffNodeRelativePosition (GUIMouseEvent *event, Vector2 &position)
 Get event off node relative position TODO: use Vector2 instead of array<float, 2> More...
 
void getEventNodePosition (GUIMouseEvent *event, Vector2 &position)
 Get event position clamped to node constraints TODO: use Vector2 instead of array<float, 2> More...
 
GUIParentNodegetParentControllerNode ()
 
virtual void determineMouseEventNodes (GUIMouseEvent *event, bool floatingNode, unordered_set< string > &eventNodeIds, unordered_set< string > &eventFloatingNodeIds)
 Determine mouse event nodes. More...
 
GUINodeControllergetController ()
 
void setController (GUINodeController *controller)
 Set up node controller. More...
 
void scrollToNodeY (GUIParentNode *toNode=nullptr)
 Scroll to node Y. More...
 
void scrollToNodeX (GUIParentNode *toNode=nullptr)
 Scroll to node X. More...
 
void setBackgroundImage (const string &backgroundImage)
 Set background image. More...
 
int getGUIEffectOffsetX ()
 
void setGUIEffectOffsetX (int guiEffectOffsetX)
 Set GUI effect offset X. More...
 
int getGUIEffectOffsetY ()
 
void setGUIEffectOffsetY (int guiEffectOffsetY)
 Set GUI effect offset Y. More...
 
GUIEffectStategetEffectState ()
 
GUIEffectgetEffect (const string &id)
 Get effect. More...
 
void addEffect (const string &id, GUIEffect *effect)
 Add effect, effect already registered with the is will be removed. More...
 
void removeEffect (const string &id)
 Remove effect. More...
 

Static Public Member Functions

static GUINode_Alignments createAlignments (const string &horizontal, const string &vertical)
 Create alignments. More...
 
static GUINode_RequestedConstraints createRequestedConstraints (const string &left, const string &top, const string &width, const string &height, int factor)
 Create requested constraints. More...
 
static GUIColor getRequestedColor (const string &color, const GUIColor &defaultColor)
 Get color. More...
 
static GUINode_FlowcreateFlow (const string &flow)
 Create flow. More...
 
static GUINode_Border createBorder (const string &allBorder, const string &left, const string &top, const string &right, const string &bottom, const string &allBorderColor, const string &leftColor, const string &topColor, const string &rightColor, const string &bottomColor)
 Create border. More...
 
static GUINode_Padding createPadding (const string &allPadding, const string &left, const string &top, const string &right, const string &bottom)
 Create padding. More...
 
static GUINode_Scale9Grid createScale9Grid (const string &all, const string &left, const string &top, const string &right, const string &bottom)
 Create scale 9 grid. More...
 
static GUINodeConditions createConditions (const string &conditions)
 Create conditions. More...
 
static void dumpNode (GUINode *node, int depth=0, int indent=0, int depthIdx=0)
 Dump node. More...
 
static void dumpParentNodes (GUINode *node, int indent=0)
 Dump parent nodes. More...
 

Protected Member Functions

 GUINode (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)
 Public constructor. More...
 
virtual ~GUINode ()
 Destructor. More...
 
virtual bool isContentNode ()=0
 
virtual void setLeft (int left)
 Set computed left. More...
 
virtual void setTop (int top)
 Set computed top. More...
 
virtual void layout ()
 Layout. More...
 
virtual void computeContentAlignment ()
 Do content alignment. More...
 
int layoutConstraintPixel (GUINode_RequestedConstraints_RequestedConstraintsType *type, int autoValue, int parentValue, int value)
 Layout constraint. More...
 
bool checkConditions ()
 Check if conditions are met. More...
 
void onSetConditions (const vector< string > &conditions)
 On set condition. More...
 
bool haveActiveOutEffect ()
 Determine if we have a out effect active. More...
 
bool shouldRender ()
 Determine if to render. More...
 
void _scrollToNodeX (GUIParentNode *toNode=nullptr)
 Scroll to node X. More...
 
void _scrollToNodeY (GUIParentNode *toNode=nullptr)
 Scroll to node Y. More...
 

Static Protected Member Functions

static GUINode_RequestedConstraints_RequestedConstraintsTypegetRequestedConstraintsType (const string &constraint, GUINode_RequestedConstraints_RequestedConstraintsType *defaultConstraintsType)
 Get requested constraints type. More...
 
static int getRequestedConstraintsValue (const string &constraint, int defaultConstraintsValue)
 Get requested constraints value. More...
 
static int getRequestedPixelValue (const string &value, int defaultValue)
 Get requested pixel value. More...
 

Protected Attributes

GUIScreenNodescreenNode { nullptr }
 
GUIParentNodeparentNode { nullptr }
 
string id
 
GUINode_Alignments alignments
 
GUINode_RequestedConstraints requestedConstraints
 
GUINode_ComputedConstraints computedConstraints
 
GUIColor backgroundColor
 
TexturebackgroundTexture { nullptr }
 
int backgroundTextureId
 
GUINode_Scale9Grid backgroundImageScale9Grid
 
GUIColor backgroundImageEffectColorMul
 
GUIColor backgroundImageEffectColorAdd
 
GUINode_Padding padding
 
GUINode_Border border
 
GUINodeConditions showOn
 
GUINodeConditions hideOn
 
GUINodeControllercontroller { nullptr }
 
unordered_map< string, GUIEffect * > effects
 
int guiEffectOffsetX
 
int guiEffectOffsetY
 
bool conditionsMet
 
bool layouted
 
bool haveOutEffect
 
vector< string > lastConditions
 
GUIEffectStateeffectState { nullptr }
 

Private Member Functions

void cfDetermineElementNodeDependencies (vector< string > &elementNodeDependencies)
 Determine element node dependencies. More...
 
void cfParse (const string &term, string &function, vector< string > &arguments)
 Parse condition function term. More...
 
bool cfCall (GUIElementNode *elementNode, const string &function, const vector< string > &arguments)
 Call condition function with arguments. More...
 
void cfCallDetermineElementNodeDependencies (const string &function, const vector< string > &arguments, vector< string > &elementNodeDependencies)
 Determine element node dependencies - Call condition function with arguments. More...
 
bool cfEmpty (const vector< string > &arguments)
 Condition function: empty. More...
 
bool cfHasCondition (GUIElementNode *elementNode, const vector< string > &arguments)
 Condition function: has condition. More...
 
void cfHasConditionDetermineElementNodeDependencies (const vector< string > &arguments, vector< string > &elementNodeDependencies)
 Determine element node dependencies - Condition function: has condition. More...
 

Private Attributes

GUINode_Flowflow
 

Friends

class tdme::gui::GUI
 
class GUIElementNode
 
class GUIImageNode
 
class GUILayerNode
 
class GUILayoutNode
 
class GUIParentNode
 
class GUIScreenNode
 
class GUITableNode
 
class GUITableCellNode
 
class GUITableRowNode
 
class GUIHorizontalScrollbarInternalController
 
class GUIVerticalScrollbarInternalController
 
class GUIInputInternalController
 
class GUINodeConditions
 
class GUINode_Flow
 
class GUINode_AlignmentHorizontal
 
class GUINode_AlignmentVertical
 
class GUINode_RequestedConstraints
 
class GUINode_RequestedConstraints_RequestedConstraintsType
 

Detailed Description

GUI node base class.

Author
Andreas Drewke
Version
$Id$

Definition at line 62 of file GUINode.h.

Constructor & Destructor Documentation

◆ GUINode()

GUINode ( 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 
)
protected

Public constructor.

Parameters
screenNodescreen node
parentNodeparent node
idid
flowflow
alignmentsalignments
requestedConstraintsrequested constraints
backgroundColorbackground color
backgroundImagebackground image
backgroundImageScale9Gridbackground image scale 9 grid
backgroundImageEffectColorMulbackground image effect color mul
backgroundImageEffectColorAddbackground image effect color add
borderborder
paddingpadding
showOnshow on
hideOnhide on

Definition at line 85 of file GUINode.cpp.

◆ ~GUINode()

~GUINode ( )
protectedvirtual

Destructor.

Definition at line 135 of file GUINode.cpp.

Member Function Documentation

◆ _scrollToNodeX()

void _scrollToNodeX ( GUIParentNode toNode = nullptr)
protected

Scroll to node X.

Parameters
toNodestop at node to node

Definition at line 1084 of file GUINode.cpp.

◆ _scrollToNodeY()

void _scrollToNodeY ( GUIParentNode toNode = nullptr)
protected

Scroll to node Y.

Parameters
toNodestop at node to node

Definition at line 1106 of file GUINode.cpp.

◆ addEffect()

void addEffect ( const string &  id,
GUIEffect effect 
)

Add effect, effect already registered with the is will be removed.

Parameters
idid
effecteffect

Definition at line 1344 of file GUINode.cpp.

◆ applyEffects()

void applyEffects ( GUIRenderer guiRenderer)
virtual

Apply effects.

Parameters
guiRenderergui renderer

Definition at line 478 of file GUINode.cpp.

◆ cfCall()

bool cfCall ( GUIElementNode elementNode,
const string &  function,
const vector< string > &  arguments 
)
private

Call condition function with arguments.

Parameters
elementNodeelement node to work with
functionfunction to be called
argumentsfunction arguments
Returns
condition met

Definition at line 1255 of file GUINode.cpp.

◆ cfCallDetermineElementNodeDependencies()

void cfCallDetermineElementNodeDependencies ( const string &  function,
const vector< string > &  arguments,
vector< string > &  elementNodeDependencies 
)
private

Determine element node dependencies - Call condition function with arguments.

Parameters
functionfunction to be called
argumentsfunction arguments
elementNodeDependencieselement node dependencies

Definition at line 1270 of file GUINode.cpp.

◆ cfDetermineElementNodeDependencies()

void cfDetermineElementNodeDependencies ( vector< string > &  elementNodeDependencies)
private

Determine element node dependencies.

Parameters
elementNodeDependencieselement node dependencies

Definition at line 1192 of file GUINode.cpp.

◆ cfEmpty()

bool cfEmpty ( const vector< string > &  arguments)
private

Condition function: empty.

Parameters
argumentsarguments Argument should look like 'test', "test", '', "", 123, 0, 123.4, 0.0 for now Arguments or OR connected
Returns
if 1 argument has not been empty

Definition at line 1321 of file GUINode.cpp.

◆ cfHasCondition()

bool cfHasCondition ( GUIElementNode elementNode,
const vector< string > &  arguments 
)
private

Condition function: has condition.

Parameters
elementNodeelement node to work with
argumentsarguments Format of arguments: [elementid.]condition Arguments or OR connected
Returns
if 1 condition has been met

Definition at line 1285 of file GUINode.cpp.

◆ cfHasConditionDetermineElementNodeDependencies()

void cfHasConditionDetermineElementNodeDependencies ( const vector< string > &  arguments,
vector< string > &  elementNodeDependencies 
)
private

Determine element node dependencies - Condition function: has condition.

Parameters
argumentsarguments Format of arguments: [elementid.]condition Arguments or OR connected

Definition at line 1305 of file GUINode.cpp.

◆ cfParse()

void cfParse ( const string &  term,
string &  function,
vector< string > &  arguments 
)
private

Parse condition function term.

Parameters
termterm
functionfunction
argumentsfunction arguments

Definition at line 1211 of file GUINode.cpp.

◆ checkConditions()

bool checkConditions ( )
protected

Check if conditions are met.

Returns
conditions met

Definition at line 424 of file GUINode.cpp.

◆ computeContentAlignment()

void computeContentAlignment ( )
protectedvirtual

Do content alignment.

Reimplemented in GUIStyledTextNode.

Definition at line 205 of file GUINode.cpp.

◆ computeParentChildrenRenderOffsetXTotal()

float computeParentChildrenRenderOffsetXTotal ( )
Returns
compute parent children render offset X total

Definition at line 951 of file GUINode.cpp.

◆ computeParentChildrenRenderOffsetYTotal()

float computeParentChildrenRenderOffsetYTotal ( )
Returns
compute children render offset Y total

Definition at line 962 of file GUINode.cpp.

◆ createAlignments()

GUINode_Alignments createAlignments ( const string &  horizontal,
const string &  vertical 
)
static

Create alignments.

Parameters
horizontalhorizontal
verticalvertical
Returns
alignments

Definition at line 260 of file GUINode.cpp.

◆ createBorder()

GUINode_Border createBorder ( const string &  allBorder,
const string &  left,
const string &  top,
const string &  right,
const string &  bottom,
const string &  allBorderColor,
const string &  leftColor,
const string &  topColor,
const string &  rightColor,
const string &  bottomColor 
)
static

Create border.

Parameters
allBorderall border
leftleft
toptop
rightright
bottombottom
allBorderColorall border color
leftColorleft color
topColortop color
rightColorright color
bottomColorbottom color
Returns
border

Definition at line 345 of file GUINode.cpp.

◆ createConditions()

GUINodeConditions createConditions ( const string &  conditions)
static

Create conditions.

Parameters
conditionsconditions

Definition at line 395 of file GUINode.cpp.

◆ createFlow()

GUINode_Flow * createFlow ( const string &  flow)
static

Create flow.

Parameters
flowflow
Returns
flow

Definition at line 340 of file GUINode.cpp.

◆ createPadding()

GUINode_Padding createPadding ( const string &  allPadding,
const string &  left,
const string &  top,
const string &  right,
const string &  bottom 
)
static

Create padding.

Parameters
allPaddingall padding
leftleft
toptop
rightright
bottombottom
Returns
padding

Definition at line 367 of file GUINode.cpp.

◆ createRequestedConstraints()

GUINode_RequestedConstraints createRequestedConstraints ( const string &  left,
const string &  top,
const string &  width,
const string &  height,
int  factor 
)
static

Create requested constraints.

Parameters
leftleft
toptop
widthwidth
heightheight
factorfactor
Returns
requested constraints

Definition at line 268 of file GUINode.cpp.

◆ createScale9Grid()

GUINode_Scale9Grid createScale9Grid ( const string &  all,
const string &  left,
const string &  top,
const string &  right,
const string &  bottom 
)
static

Create scale 9 grid.

Parameters
allall
leftleft
toptop
rightright
bottombottom
Returns
scale 9 grid

Definition at line 381 of file GUINode.cpp.

◆ determineMouseEventNodes()

void determineMouseEventNodes ( GUIMouseEvent event,
bool  floatingNode,
unordered_set< string > &  eventNodeIds,
unordered_set< string > &  eventFloatingNodeIds 
)
virtual

Determine mouse event nodes.

Parameters
eventevent
floatingNodeif node is floating node
eventNodeIdsevent node ids
eventFloatingNodeIdsevent floating node ids

Reimplemented in GUIPanelNode, GUIParentNode, and GUIScreenNode.

Definition at line 1062 of file GUINode.cpp.

◆ dispose()

void dispose ( )
virtual

◆ dumpNode()

void dumpNode ( GUINode node,
int  depth = 0,
int  indent = 0,
int  depthIdx = 0 
)
static

Dump node.

Parameters
nodenode to dump
depthdepth
indentindention
depthIdxdepth index

Definition at line 1133 of file GUINode.cpp.

◆ dumpParentNodes()

void dumpParentNodes ( GUINode node,
int  indent = 0 
)
static

Dump parent nodes.

Parameters
nodenode to dump from
indentindention

Definition at line 1165 of file GUINode.cpp.

◆ getAutoHeight()

int getAutoHeight ( )
virtual
Returns
auto height if auto height requested or content height

Definition at line 168 of file GUINode.cpp.

◆ getAutoWidth()

int getAutoWidth ( )
virtual
Returns
auto width if auto width requested or content width

Definition at line 159 of file GUINode.cpp.

◆ getBackgroundColor()

GUIColor & getBackgroundColor ( )
inline
Returns
background color

Definition at line 394 of file GUINode.h.

◆ getBorder()

GUINode_Border & getBorder ( )
inline
Returns
border

Definition at line 366 of file GUINode.h.

◆ getComputedConstraints()

GUINode_ComputedConstraints & getComputedConstraints ( )
inline
Returns
computed constraints

Definition at line 387 of file GUINode.h.

◆ getContentHeight()

virtual int getContentHeight ( )
pure virtual

◆ getContentWidth()

virtual int getContentWidth ( )
pure virtual

◆ getController()

GUINodeController * getController ( )
inline
Returns
controller

Definition at line 586 of file GUINode.h.

◆ getEffect()

GUIEffect * getEffect ( const string &  id)

Get effect.

Parameters
idid
Returns
effect or null

Definition at line 1351 of file GUINode.cpp.

◆ getEffectState()

GUIEffectState * getEffectState ( )
inline
Returns
effect state

Definition at line 647 of file GUINode.h.

◆ getEventNodePosition()

void getEventNodePosition ( GUIMouseEvent event,
Vector2 position 
)

Get event position clamped to node constraints TODO: use Vector2 instead of array<float, 2>

Parameters
eventevent
positionposition clamped to node constraints
Returns
void

Definition at line 1040 of file GUINode.cpp.

◆ getEventOffNodeRelativePosition()

void getEventOffNodeRelativePosition ( GUIMouseEvent event,
Vector2 position 
)

Get event off node relative position TODO: use Vector2 instead of array<float, 2>

Parameters
eventevent
position(will return x = 0 if in node on x axis, will return x < 0 (-pixel) if on the left of element, x > 0 (+pixel) if on the right of element, y behaves analogous to x)
Returns
void

Definition at line 1014 of file GUINode.cpp.

◆ getGUIEffectOffsetX()

int getGUIEffectOffsetX ( )
inline
Returns
GUI effect offset X

Definition at line 617 of file GUINode.h.

◆ getGUIEffectOffsetY()

int getGUIEffectOffsetY ( )
inline
Returns
GUI effect offset Y

Definition at line 632 of file GUINode.h.

◆ getHierarchicalId()

const string getHierarchicalId ( )
Returns
hierarchical id

Definition at line 148 of file GUINode.cpp.

◆ getId()

const string & getId ( )
inline
Returns
id

Definition at line 329 of file GUINode.h.

◆ getNodeType()

virtual const string getNodeType ( )
pure virtual

◆ getPadding()

GUINode_Padding & getPadding ( )
inline
Returns
padding

Definition at line 373 of file GUINode.h.

◆ getParentControllerNode()

GUIParentNode * getParentControllerNode ( )
Returns
first parent node in tree with controller node attached

Definition at line 1053 of file GUINode.cpp.

◆ getParentNode()

GUIParentNode * getParentNode ( )
inline
Returns
parent node

Definition at line 322 of file GUINode.h.

◆ getRequestedColor()

GUIColor getRequestedColor ( const string &  color,
const GUIColor defaultColor 
)
static

Get color.

Parameters
colorcolor
defaultColordefault color
Exceptions
tdme::gui::GUIParserException
Returns
value

Definition at line 331 of file GUINode.cpp.

◆ getRequestedConstraintsType()

GUINode_RequestedConstraints_RequestedConstraintsType * getRequestedConstraintsType ( const string &  constraint,
GUINode_RequestedConstraints_RequestedConstraintsType defaultConstraintsType 
)
staticprotected

Get requested constraints type.

Parameters
constraintconstraint
defaultConstraintsTypedefault constraints type
Returns
requested constraints type

Definition at line 286 of file GUINode.cpp.

◆ getRequestedConstraintsValue()

int getRequestedConstraintsValue ( const string &  constraint,
int  defaultConstraintsValue 
)
staticprotected

Get requested constraints value.

Parameters
constraintconstraint
defaultConstraintsValuedefault constraints value
Returns
requested constraints value

Definition at line 304 of file GUINode.cpp.

◆ getRequestedPixelValue()

int getRequestedPixelValue ( const string &  value,
int  defaultValue 
)
staticprotected

Get requested pixel value.

Parameters
valuevalue
defaultValuedefault value
Returns
value

Definition at line 322 of file GUINode.cpp.

◆ getRequestsConstraints()

GUINode_RequestedConstraints & getRequestsConstraints ( )
inline
Returns
requested constraints

Definition at line 380 of file GUINode.h.

◆ getScreenNode()

GUIScreenNode * getScreenNode ( )
inline
Returns
scren node

Definition at line 315 of file GUINode.h.

◆ hasEffects()

bool hasEffects ( )
inline
Returns
if node has effects

Definition at line 503 of file GUINode.h.

◆ haveActiveOutEffect()

bool haveActiveOutEffect ( )
protected

Determine if we have a out effect active.

Definition at line 1484 of file GUINode.cpp.

◆ isConditionsMet()

bool isConditionsMet ( )
inline

Determine if conditions are set.

Returns
if conditions are set

Definition at line 486 of file GUINode.h.

◆ isContentNode()

virtual bool isContentNode ( )
protectedpure virtual

◆ isEventBelongingToNode() [1/2]

bool isEventBelongingToNode ( GUIMouseEvent event)

Is event belonging to node.

Parameters
eventevent
Returns
boolean

Definition at line 1008 of file GUINode.cpp.

◆ isEventBelongingToNode() [2/2]

bool isEventBelongingToNode ( GUIMouseEvent event,
Vector2 position 
)

Is event belonging to node.

Parameters
eventevent
position
Returns
boolean

Definition at line 973 of file GUINode.cpp.

◆ layout()

void layout ( )
protectedvirtual

Layout.

Reimplemented in GUILayerNode, GUIParentNode, and GUIScreenNode.

Definition at line 189 of file GUINode.cpp.

◆ layoutConstraintPixel()

int layoutConstraintPixel ( GUINode_RequestedConstraints_RequestedConstraintsType type,
int  autoValue,
int  parentValue,
int  value 
)
protected

Layout constraint.

Parameters
typetype
autoValueauto value
parentValueparent value
valuevalue
Returns
pixel

Definition at line 237 of file GUINode.cpp.

◆ layoutOnDemand()

void layoutOnDemand ( )
virtual

Layout on demand.

Definition at line 471 of file GUINode.cpp.

◆ onSetConditions()

void onSetConditions ( const vector< string > &  conditions)
protected

On set condition.

Parameters
conditionsconditions

Definition at line 1370 of file GUINode.cpp.

◆ removeEffect()

void removeEffect ( const string &  id)

Remove effect.

Parameters
idid

Definition at line 1358 of file GUINode.cpp.

◆ render()

void render ( GUIRenderer guiRenderer)
virtual

Render.

Parameters
guiRenderergui renderer
floatingNodesfloating nodes

Reimplemented in GUIGradientNode, GUIHorizontalScrollbarInternalNode, GUIInputInternalNode, GUIParentNode, GUIScreenNode, GUISpaceNode, GUIStyledTextNode, GUITextNode, GUITextureBaseNode, and GUIVerticalScrollbarInternalNode.

Definition at line 508 of file GUINode.cpp.

◆ scrollToNodeX()

void scrollToNodeX ( GUIParentNode toNode = nullptr)

Scroll to node X.

Parameters
toNodestop at node to node

Definition at line 1125 of file GUINode.cpp.

◆ scrollToNodeY()

void scrollToNodeY ( GUIParentNode toNode = nullptr)

Scroll to node Y.

Parameters
toNodestop at node to node

Definition at line 1129 of file GUINode.cpp.

◆ setBackgroundImage()

void setBackgroundImage ( const string &  backgroundImage)

Set background image.

Parameters
backgroundImagebackground image

Definition at line 1332 of file GUINode.cpp.

◆ setConditionsMet()

void setConditionsMet ( )
virtual

Set conditions met for this node and its subnodes.

Reimplemented in GUIParentNode.

Definition at line 466 of file GUINode.cpp.

◆ setController()

void setController ( GUINodeController controller)

Set up node controller.

Parameters
controllercontroller

Definition at line 1074 of file GUINode.cpp.

◆ setGUIEffectOffsetX()

void setGUIEffectOffsetX ( int  guiEffectOffsetX)
inline

Set GUI effect offset X.

Parameters
guiEffectOffsetXgui effect offset X

Definition at line 625 of file GUINode.h.

◆ setGUIEffectOffsetY()

void setGUIEffectOffsetY ( int  guiEffectOffsetY)
inline

Set GUI effect offset Y.

Parameters
guiEffectOffsetYgui effect offset Y

Definition at line 640 of file GUINode.h.

◆ setLeft()

void setLeft ( int  left)
protectedvirtual

Set computed left.

Parameters
leftleft

Reimplemented in GUILayerNode, GUILayoutNode, GUITableNode, and GUITableRowNode.

Definition at line 177 of file GUINode.cpp.

◆ setTop()

void setTop ( int  top)
protectedvirtual

Set computed top.

Parameters
toptop

Reimplemented in GUILayerNode, GUILayoutNode, GUITableNode, and GUITableRowNode.

Definition at line 183 of file GUINode.cpp.

◆ shouldRender()

bool shouldRender ( )
inlineprotected

Determine if to render.

Returns
if node will be rendered

Definition at line 295 of file GUINode.h.

◆ undoEffects()

void undoEffects ( GUIRenderer guiRenderer)
virtual

Undo effects.

Parameters
guiRenderergui renderer

Definition at line 503 of file GUINode.cpp.

Friends And Related Function Documentation

◆ GUIElementNode

friend class GUIElementNode
friend

Definition at line 65 of file GUINode.h.

◆ GUIHorizontalScrollbarInternalController

Definition at line 74 of file GUINode.h.

◆ GUIImageNode

friend class GUIImageNode
friend

Definition at line 66 of file GUINode.h.

◆ GUIInputInternalController

friend class GUIInputInternalController
friend

Definition at line 76 of file GUINode.h.

◆ GUILayerNode

friend class GUILayerNode
friend

Definition at line 67 of file GUINode.h.

◆ GUILayoutNode

friend class GUILayoutNode
friend

Definition at line 68 of file GUINode.h.

◆ GUINode_AlignmentHorizontal

friend class GUINode_AlignmentHorizontal
friend

Definition at line 79 of file GUINode.h.

◆ GUINode_AlignmentVertical

friend class GUINode_AlignmentVertical
friend

Definition at line 80 of file GUINode.h.

◆ GUINode_Flow

friend class GUINode_Flow
friend

Definition at line 78 of file GUINode.h.

◆ GUINode_RequestedConstraints

friend class GUINode_RequestedConstraints
friend

Definition at line 81 of file GUINode.h.

◆ GUINode_RequestedConstraints_RequestedConstraintsType

Definition at line 82 of file GUINode.h.

◆ GUINodeConditions

friend class GUINodeConditions
friend

Definition at line 77 of file GUINode.h.

◆ GUIParentNode

friend class GUIParentNode
friend

Definition at line 69 of file GUINode.h.

◆ GUIScreenNode

friend class GUIScreenNode
friend

Definition at line 70 of file GUINode.h.

◆ GUITableCellNode

friend class GUITableCellNode
friend

Definition at line 72 of file GUINode.h.

◆ GUITableNode

friend class GUITableNode
friend

Definition at line 71 of file GUINode.h.

◆ GUITableRowNode

friend class GUITableRowNode
friend

Definition at line 73 of file GUINode.h.

◆ GUIVerticalScrollbarInternalController

Definition at line 75 of file GUINode.h.

◆ tdme::gui::GUI

friend class tdme::gui::GUI
friend

Definition at line 64 of file GUINode.h.

Member Data Documentation

◆ alignments

GUINode_Alignments alignments
protected

Definition at line 149 of file GUINode.h.

◆ backgroundColor

GUIColor backgroundColor
protected

Definition at line 152 of file GUINode.h.

◆ backgroundImageEffectColorAdd

GUIColor backgroundImageEffectColorAdd
protected

Definition at line 157 of file GUINode.h.

◆ backgroundImageEffectColorMul

GUIColor backgroundImageEffectColorMul
protected

Definition at line 156 of file GUINode.h.

◆ backgroundImageScale9Grid

GUINode_Scale9Grid backgroundImageScale9Grid
protected

Definition at line 155 of file GUINode.h.

◆ backgroundTexture

Texture* backgroundTexture { nullptr }
protected

Definition at line 153 of file GUINode.h.

◆ backgroundTextureId

int backgroundTextureId
protected

Definition at line 154 of file GUINode.h.

◆ border

GUINode_Border border
protected

Definition at line 159 of file GUINode.h.

◆ computedConstraints

GUINode_ComputedConstraints computedConstraints
protected

Definition at line 151 of file GUINode.h.

◆ conditionsMet

bool conditionsMet
protected

Definition at line 166 of file GUINode.h.

◆ controller

GUINodeController* controller { nullptr }
protected

Definition at line 162 of file GUINode.h.

◆ effects

unordered_map<string, GUIEffect*> effects
protected

Definition at line 163 of file GUINode.h.

◆ effectState

GUIEffectState* effectState { nullptr }
protected

Definition at line 170 of file GUINode.h.

◆ flow

GUINode_Flow* flow
private

Definition at line 85 of file GUINode.h.

◆ guiEffectOffsetX

int guiEffectOffsetX
protected

Definition at line 164 of file GUINode.h.

◆ guiEffectOffsetY

int guiEffectOffsetY
protected

Definition at line 165 of file GUINode.h.

◆ haveOutEffect

bool haveOutEffect
protected

Definition at line 168 of file GUINode.h.

◆ hideOn

GUINodeConditions hideOn
protected

Definition at line 161 of file GUINode.h.

◆ id

string id
protected

Definition at line 148 of file GUINode.h.

◆ lastConditions

vector<string> lastConditions
protected

Definition at line 169 of file GUINode.h.

◆ layouted

bool layouted
protected

Definition at line 167 of file GUINode.h.

◆ padding

GUINode_Padding padding
protected

Definition at line 158 of file GUINode.h.

◆ parentNode

GUIParentNode* parentNode { nullptr }
protected

Definition at line 147 of file GUINode.h.

◆ requestedConstraints

GUINode_RequestedConstraints requestedConstraints
protected

Definition at line 150 of file GUINode.h.

◆ screenNode

GUIScreenNode* screenNode { nullptr }
protected

Definition at line 146 of file GUINode.h.

◆ showOn

GUINodeConditions showOn
protected

Definition at line 160 of file GUINode.h.


The documentation for this class was generated from the following files: