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

GUI screen node that represents a screen that can be rendered via GUI system. More...

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

Inheritance diagram for GUIScreenNode:
Inheritance graph
Collaboration diagram for GUIScreenNode:
Collaboration graph

Classes

struct  ScrollToNodeStruct
 

Public Member Functions

const string & getFileName ()
 
const string & getApplicationRootPathName ()
 
const string & getApplicationSubPathName ()
 
GUIgetGUI ()
 
void setGUI (GUI *gui)
 Set GUI. More...
 
int getScreenWidth ()
 
int getScreenHeight ()
 
bool isVisible ()
 
void setVisible (bool visible)
 Set visible. More...
 
bool isPopUp ()
 
void setPopUp (bool popUp)
 Set pop up. More...
 
const vector< GUINode * > & getFloatingNodes ()
 
void scrollToNodeX (const string &node, const string &toNode)
 Register deferred scroll to node X. More...
 
void scrollToNodeY (const string &node, const string &toNode)
 Register deferred scroll to node Y. More...
 
int getContentWidth () override
 
int getContentHeight () override
 
void layout () override
 Layout. More...
 
void invalidateLayout (GUINode *node)
 Mark a node to be invalidated regarding layout. More...
 
GUINodeforceInvalidateLayout (GUINode *node)
 Actually do the invalidate layout. More...
 
void invalidateLayouts ()
 Actually do the nodes marked for layout invalidation. More...
 
void forceLayout (GUINode *node)
 Force layout node content (e.g. More...
 
void scrollToNodes ()
 Scroll to nodes. More...
 
void setScreenSize (int width, int height)
 Set screen size. More...
 
GUINodegetNodeById (const string &nodeId)
 Get GUI node by id. More...
 
void removeNodeById (const string &nodeId, bool resetScrollOffsets)
 Remove GUI node by id. More...
 
GUINodegetInnerNodeById (const string &nodeId)
 Get inner GUI node by id. More...
 
const string allocateNodeId ()
 Allocate node id. More...
 
void render (GUIRenderer *guiRenderer) override
 Render screen. More...
 
void renderFloatingNodes (GUIRenderer *guiRenderer)
 Render floating nodes. More...
 
void determineFocussedNodes (GUIParentNode *parentNode, vector< GUIElementNode * > &focusableNodes)
 Determine focussed nodes. More...
 
void determineMouseEventNodes (GUIMouseEvent *event, bool floatingNode, unordered_set< string > &eventNodeIds, unordered_set< string > &eventFloatingNodeIds) override
 Determine mouse event nodes. More...
 
void addActionListener (GUIActionListener *listener)
 Add action listener. More...
 
void removeActionListener (GUIActionListener *listener)
 Remove action listener. More...
 
GUIInputEventHandlergetInputEventHandler ()
 
void setInputEventHandler (GUIInputEventHandler *inputEventHandler)
 Set input event handler. More...
 
void delegateActionPerformed (GUIActionListenerType type, GUIElementNode *node)
 Delegate action performed. More...
 
void addChangeListener (GUIChangeListener *listener)
 Add change listener. More...
 
void removeChangeListener (GUIChangeListener *listener)
 Remove change listener. More...
 
void delegateValueChanged (GUIElementNode *node)
 Delegate value changed. More...
 
void addMouseOverListener (GUIMouseOverListener *listener)
 Add mouse over listener. More...
 
void removeMouseOverListener (GUIMouseOverListener *listener)
 Remove mouse over listener. More...
 
void delegateMouseOver (GUIElementNode *node)
 Delegate mouse over event. More...
 
void addContextMenuRequestListener (GUIContextMenuRequestListener *listener)
 Add context menu request listener. More...
 
void removeContextMenuRequestListener (GUIContextMenuRequestListener *listener)
 Remove context menu request listener. More...
 
void delegateContextMenuRequest (GUIElementNode *node, int mouseX, int mouseY)
 Delegate mouse over event. More...
 
void addFocusListener (GUIFocusListener *listener)
 Add focus listener. More...
 
void removeFocusListener (GUIFocusListener *listener)
 Remove focus listener. More...
 
void delegateFocus (GUIElementNode *node)
 Delegate focus event. More...
 
void delegateUnfocus (GUIElementNode *node)
 Delegate unfocus event. More...
 
void addTickNode (GUINode *node)
 Add tick node, registered node controllers will have a tick once per frame. More...
 
void removeTickNode (GUINode *node)
 Remove tick node. More...
 
void getValues (unordered_map< string, MutableString > &values)
 Get values. More...
 
void setValues (const unordered_map< string, MutableString > &values)
 Set values. More...
 
GUIScreenNode_SizeConstraintsgetSizeConstraints ()
 
void addTimedExpression (int64_t time, const string &expression)
 Add a timed expression. More...
 
void addNodeElementNodeDependency (const string &elementNodeId, const string &nodeId)
 Add node to element node dependency. More...
 
- Public Member Functions inherited from GUIParentNode
void clearSubNodes ()
 Clear sub nodes. More...
 
void replaceSubNodes (const string &xml, bool resetScrollOffsets)
 Replace sub nodes with given XML. More...
 
void addSubNodes (const string &xml, bool resetScrollOffsets)
 Add sub nodes with given XML. More...
 
void addSubNode (GUINode *node)
 Add sub node. More...
 
void moveNodes (GUIParentNode *otherParentNode)
 Move children nodes from other parent node into this parent node. More...
 
GUIParentNode_OverflowgetOverflowX ()
 
GUIParentNode_OverflowgetOverflowY ()
 
float getChildrenRenderOffsetX ()
 
void setChildrenRenderOffsetX (float childrenRenderOffSetX)
 Set children render offset x. More...
 
float getChildrenRenderOffsetY ()
 
void setChildrenRenderOffsetY (float childrenRenderOffSetY)
 Set children render offset y. More...
 
void getChildControllerNodes (vector< GUINode * > &childControllerNodes, bool requireConditionsMet=false)
 Get child controller nodes. More...
 
void dispose () override
 Dispose node. More...
 
void setConditionsMet () override
 Set conditions met for this node and its subnodes. More...
 
void render (GUIRenderer *guiRenderer) override
 Render. More...
 
void determineMouseEventNodes (GUIMouseEvent *event, bool floatingNode, unordered_set< string > &eventNodeIds, unordered_set< string > &eventFloatingNodeIds) override
 Determine mouse event nodes. More...
 
void invalidateRenderCaches ()
 Invalidate render caches. More...
 
- Public Member Functions inherited from GUINode
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 GUIScreenNode_SizeConstraints createSizeConstraints (const string &minWidth, const string &minHeight, const string &maxWidth, const string &maxHeight)
 Create size constraints. More...
 
- Static Public Member Functions inherited from GUIParentNode
static GUIParentNode_OverflowcreateOverflow (const string &overflow)
 Create over flow. More...
 
static GUINode_RequestedConstraints createRequestedConstraints (const string &left, const string &top, const string &width, const string &height, int factor)
 Create requested constraints. More...
 
- Static Public Member Functions inherited from GUINode
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

 GUIScreenNode (const string &fileName, const string &applicationRootPathName, const string &applicationSubPathName, const string &id, GUINode_Flow *flow, GUIParentNode_Overflow *overflowX, GUIParentNode_Overflow *overflowY, 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 GUIScreenNode_SizeConstraints &sizeConstraints, const GUINodeConditions &showOn, const GUINodeConditions &hideOn, bool scrollable, bool popUp)
 Constructor @oaram fileName file name or complete file path. More...
 
 ~GUIScreenNode ()
 Destructor. More...
 
bool isContentNode () override
 
const string getNodeType () override
 
- Protected Member Functions inherited from GUIParentNode
 GUIParentNode (GUIScreenNode *screenNode, GUIParentNode *parentNode, const string &id, GUINode_Flow *flow, GUIParentNode_Overflow *overflowX, GUIParentNode_Overflow *overflowY, 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)
 Constructor. More...
 
void layout () override
 Layout. More...
 
virtual void layoutSubNodes ()
 Layout sub nodes. More...
 
virtual void computeHorizontalChildrenAlignment ()
 Compute horizontal children alignment. More...
 
virtual void computeVerticalChildrenAlignment ()
 Compute vertical children alignment. More...
 
vector< GUINode * > detachSubNodes ()
 Detach sub nodes. More...
 
- Protected Member Functions inherited from 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)
 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...
 

Private Member Functions

bool addNode (GUINode *node)
 Add node. More...
 
bool removeNode (GUINode *node)
 Add node. More...
 
void tick ()
 Calls registered tick nodes controller tick method. More...
 

Private Attributes

string applicationRootPathName
 
string applicationSubPathName
 
string fileName
 
GUIgui { nullptr }
 
int nodeCounter
 
int screenWidth
 
int screenHeight
 
unordered_map< string, GUINode * > nodesById
 
unordered_map< string, GUINode * > tickNodesById
 
vector< GUINode * > floatingNodes
 
vector< GUIActionListener * > actionListener
 
vector< GUIChangeListener * > changeListener
 
vector< GUIMouseOverListener * > mouseOverListener
 
vector< GUIContextMenuRequestListener * > contextMenuRequestListener
 
vector< GUIFocusListener * > focusListener
 
GUIInputEventHandlerinputEventHandler
 
vector< GUINode * > childControllerNodes
 
GUIScreenNode_SizeConstraints sizeConstraints
 
unordered_set< string > invalidateLayoutNodeIds
 
unordered_map< string, unordered_set< string > > elementNodeToNodeMapping
 
bool visible
 
bool popUp
 
unordered_map< int64_t, string > timedExpressions
 
vector< ScrollToNodeStructscrollToNodesX
 
vector< ScrollToNodeStructscrollToNodesY
 

Friends

class tdme::gui::GUI
 
class tdme::gui::GUIParser
 
class GUIElementNode
 
class GUINode
 
class GUINodeConditions
 
class GUIParentNode
 

Additional Inherited Members

- Static Protected Member Functions inherited from GUINode
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 inherited from GUIParentNode
vector< GUINode * > subNodes
 
bool computeViewportCache
 
vector< GUINode * > vieportSubNodesCache
 
vector< GUINode * > floatingNodesCache
 
GUIParentNode_OverflowoverflowX
 
GUIParentNode_OverflowoverflowY
 
- Protected Attributes inherited from GUINode
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 }
 

Detailed Description

GUI screen node that represents a screen that can be rendered via GUI system.

Author
Andreas Drewke
Version
$Id$

Definition at line 55 of file GUIScreenNode.h.

Constructor & Destructor Documentation

◆ GUIScreenNode()

GUIScreenNode ( const string &  fileName,
const string &  applicationRootPathName,
const string &  applicationSubPathName,
const string &  id,
GUINode_Flow flow,
GUIParentNode_Overflow overflowX,
GUIParentNode_Overflow overflowY,
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 GUIScreenNode_SizeConstraints sizeConstraints,
const GUINodeConditions showOn,
const GUINodeConditions hideOn,
bool  scrollable,
bool  popUp 
)
protected

Constructor @oaram fileName file name or complete file path.

Parameters
applicationRootPathapplication root path
applicationSubPathNameapplication sub path name which is usually "engine" or "project"
flowflow
overflowXoverflow x
overflowYoverflow y
alignmentsalignments
requestedConstraintsrequested constraints
backgroundColorbackground color
backgroundImagebackground image
backgroundImageScale9Gridbackground image scale 9 grid
backgroundImageEffectColorMulbackground image effect color mul
backgroundImageEffectColorAddbackground image effect color add
borderborder
paddingpadding
sizeConstraintssize constraints
showOnshow on
hideOnhide on
scrollablescrollable
popUppop up
Exceptions
tdme::gui::GUIParserException

Definition at line 59 of file GUIScreenNode.cpp.

◆ ~GUIScreenNode()

~GUIScreenNode ( )
protected

Destructor.

Definition at line 99 of file GUIScreenNode.cpp.

Member Function Documentation

◆ addActionListener()

void addActionListener ( GUIActionListener listener)

Add action listener.

Parameters
listenerlistener

Definition at line 443 of file GUIScreenNode.cpp.

◆ addChangeListener()

void addChangeListener ( GUIChangeListener listener)

Add change listener.

Parameters
listenerlistener

Definition at line 471 of file GUIScreenNode.cpp.

◆ addContextMenuRequestListener()

void addContextMenuRequestListener ( GUIContextMenuRequestListener listener)

Add context menu request listener.

Parameters
listenerlistener

Definition at line 508 of file GUIScreenNode.cpp.

◆ addFocusListener()

void addFocusListener ( GUIFocusListener listener)

Add focus listener.

Parameters
listenerlistener

Definition at line 523 of file GUIScreenNode.cpp.

◆ addMouseOverListener()

void addMouseOverListener ( GUIMouseOverListener listener)

Add mouse over listener.

Parameters
listenerlistener

Definition at line 490 of file GUIScreenNode.cpp.

◆ addNode()

bool addNode ( GUINode node)
private

Add node.

Parameters
nodenode
Returns
success

Definition at line 329 of file GUIScreenNode.cpp.

◆ addNodeElementNodeDependency()

void addNodeElementNodeDependency ( const string &  elementNodeId,
const string &  nodeId 
)
inline

Add node to element node dependency.

Parameters
elementNodeIdelement node id
nodeIdnode id that depends on element node condition changes

Definition at line 566 of file GUIScreenNode.h.

◆ addTickNode()

void addTickNode ( GUINode node)
inline

Add tick node, registered node controllers will have a tick once per frame.

Parameters

Definition at line 513 of file GUIScreenNode.h.

◆ addTimedExpression()

void addTimedExpression ( int64_t  time,
const string &  expression 
)
inline

Add a timed expression.

Parameters
timetime
expressionexpression

Definition at line 557 of file GUIScreenNode.h.

◆ allocateNodeId()

const string allocateNodeId ( )
inline

Allocate node id.

Returns
node id

Definition at line 373 of file GUIScreenNode.h.

◆ createSizeConstraints()

GUIScreenNode_SizeConstraints createSizeConstraints ( const string &  minWidth,
const string &  minHeight,
const string &  maxWidth,
const string &  maxHeight 
)
static

Create size constraints.

Parameters
minWidthmin width
minHeightmin height
maxWidthmax width
maxHeightmax height

Definition at line 607 of file GUIScreenNode.cpp.

◆ delegateActionPerformed()

void delegateActionPerformed ( GUIActionListenerType  type,
GUIElementNode node 
)

Delegate action performed.

Parameters
typetype
nodenode

Definition at line 464 of file GUIScreenNode.cpp.

◆ delegateContextMenuRequest()

void delegateContextMenuRequest ( GUIElementNode node,
int  mouseX,
int  mouseY 
)

Delegate mouse over event.

Parameters
nodenode
mouseXunscaled mouse X position
mouseYunscaled mouse Y position

Definition at line 517 of file GUIScreenNode.cpp.

◆ delegateFocus()

void delegateFocus ( GUIElementNode node)

Delegate focus event.

Parameters
nodenode

Definition at line 534 of file GUIScreenNode.cpp.

◆ delegateMouseOver()

void delegateMouseOver ( GUIElementNode node)

Delegate mouse over event.

Parameters
nodenode

Definition at line 501 of file GUIScreenNode.cpp.

◆ delegateUnfocus()

void delegateUnfocus ( GUIElementNode node)

Delegate unfocus event.

Parameters
nodenode

Definition at line 540 of file GUIScreenNode.cpp.

◆ delegateValueChanged()

void delegateValueChanged ( GUIElementNode node)

Delegate value changed.

Parameters
nodenode

Definition at line 482 of file GUIScreenNode.cpp.

◆ determineFocussedNodes()

void determineFocussedNodes ( GUIParentNode parentNode,
vector< GUIElementNode * > &  focusableNodes 
)

Determine focussed nodes.

Parameters
parentNodeparent node
focusableNodesfocusable nodes

Definition at line 416 of file GUIScreenNode.cpp.

◆ determineMouseEventNodes()

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

Determine mouse event nodes.

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

Reimplemented from GUIParentNode.

Definition at line 435 of file GUIScreenNode.cpp.

◆ forceInvalidateLayout()

GUINode * forceInvalidateLayout ( GUINode node)

Actually do the invalidate layout.

Parameters
nodenode
Returns
(parent)node thats need a layout

Definition at line 175 of file GUIScreenNode.cpp.

◆ forceLayout()

void forceLayout ( GUINode node)

Force layout node content (e.g.

child nodes or content) without determining parent nodes to be layouted this does also does call layouted nodes post layout method

Parameters
nodenode

Definition at line 270 of file GUIScreenNode.cpp.

◆ getApplicationRootPathName()

const string & getApplicationRootPathName ( )
inline
Returns
application root path name

Definition at line 111 of file GUIScreenNode.h.

◆ getApplicationSubPathName()

const string & getApplicationSubPathName ( )
inline
Returns
application sub folder path name

Definition at line 118 of file GUIScreenNode.h.

◆ getContentHeight()

int getContentHeight ( )
overridevirtual
Returns
content height

Implements GUINode.

Definition at line 154 of file GUIScreenNode.cpp.

◆ getContentWidth()

int getContentWidth ( )
overridevirtual
Returns
content width

Implements GUINode.

Definition at line 149 of file GUIScreenNode.cpp.

◆ getFileName()

const string & getFileName ( )
inline
Returns
screen filename or complete file path

Definition at line 104 of file GUIScreenNode.h.

◆ getFloatingNodes()

const vector< GUINode * > & getFloatingNodes ( )
Returns
floating nodes

Definition at line 139 of file GUIScreenNode.cpp.

◆ getGUI()

GUI * getGUI ( )
Returns
GUI

Definition at line 110 of file GUIScreenNode.cpp.

◆ getInnerNodeById()

GUINode * getInnerNodeById ( const string &  nodeId)
inline

Get inner GUI node by id.

Parameters
nodeIdnodeId
Returns
GUI node or null

Definition at line 365 of file GUIScreenNode.h.

◆ getInputEventHandler()

GUIInputEventHandler * getInputEventHandler ( )
Returns
input event handler

Definition at line 454 of file GUIScreenNode.cpp.

◆ getNodeById()

GUINode * getNodeById ( const string &  nodeId)
inline

Get GUI node by id.

Parameters
nodeIdnodeId
Returns
GUI node or null

Definition at line 345 of file GUIScreenNode.h.

◆ getNodeType()

const string getNodeType ( )
overrideprotectedvirtual
Returns
node type

Implements GUINode.

Definition at line 324 of file GUIScreenNode.cpp.

◆ getScreenHeight()

int getScreenHeight ( )
inline
Returns
screen height

Definition at line 143 of file GUIScreenNode.h.

◆ getScreenWidth()

int getScreenWidth ( )
inline
Returns
screen width

Definition at line 136 of file GUIScreenNode.h.

◆ getSizeConstraints()

GUIScreenNode_SizeConstraints & getSizeConstraints ( )
inline
Returns
size constraints

Definition at line 539 of file GUIScreenNode.h.

◆ getValues()

void getValues ( unordered_map< string, MutableString > &  values)

Get values.

Parameters
valuesvalues

Definition at line 565 of file GUIScreenNode.cpp.

◆ invalidateLayout()

void invalidateLayout ( GUINode node)
inline

Mark a node to be invalidated regarding layout.

Parameters
nodenode
Returns
first node that requires a layout in tree

Definition at line 305 of file GUIScreenNode.h.

◆ invalidateLayouts()

void invalidateLayouts ( )

Actually do the nodes marked for layout invalidation.

Definition at line 236 of file GUIScreenNode.cpp.

◆ isContentNode()

bool isContentNode ( )
overrideprotectedvirtual
Returns
is content node

Implements GUINode.

Definition at line 144 of file GUIScreenNode.cpp.

◆ isPopUp()

bool isPopUp ( )
inline
Returns
is pop up

Definition at line 163 of file GUIScreenNode.h.

◆ isVisible()

bool isVisible ( )
inline
Returns
is visible

Definition at line 150 of file GUIScreenNode.h.

◆ layout()

void layout ( )
overridevirtual

Layout.

Reimplemented from GUIParentNode.

Definition at line 159 of file GUIScreenNode.cpp.

◆ removeActionListener()

void removeActionListener ( GUIActionListener listener)

Remove action listener.

Parameters
listenerlistener

Definition at line 449 of file GUIScreenNode.cpp.

◆ removeChangeListener()

void removeChangeListener ( GUIChangeListener listener)

Remove change listener.

Parameters
listenerlistener

Definition at line 477 of file GUIScreenNode.cpp.

◆ removeContextMenuRequestListener()

void removeContextMenuRequestListener ( GUIContextMenuRequestListener listener)

Remove context menu request listener.

Parameters
listenerlistener

Definition at line 513 of file GUIScreenNode.cpp.

◆ removeFocusListener()

void removeFocusListener ( GUIFocusListener listener)

Remove focus listener.

Parameters
listenerlistener

Definition at line 529 of file GUIScreenNode.cpp.

◆ removeMouseOverListener()

void removeMouseOverListener ( GUIMouseOverListener listener)

Remove mouse over listener.

Parameters
listenerlistener

Definition at line 496 of file GUIScreenNode.cpp.

◆ removeNode()

bool removeNode ( GUINode node)
private

Add node.

Parameters
nodenode
Returns
success

Definition at line 354 of file GUIScreenNode.cpp.

◆ removeNodeById()

void removeNodeById ( const string &  nodeId,
bool  resetScrollOffsets 
)

Remove GUI node by id.

Parameters
nodeIdnodeId
resetScrollOffsetsreset scroll offsets

Definition at line 344 of file GUIScreenNode.cpp.

◆ removeTickNode()

void removeTickNode ( GUINode node)
inline

Remove tick node.

Definition at line 520 of file GUIScreenNode.h.

◆ render()

void render ( GUIRenderer guiRenderer)
overridevirtual

Render screen.

Parameters
guiRenderergui renderer

Reimplemented from GUIParentNode.

Definition at line 382 of file GUIScreenNode.cpp.

◆ renderFloatingNodes()

void renderFloatingNodes ( GUIRenderer guiRenderer)

Render floating nodes.

Parameters
guiRenderergui renderer

Definition at line 392 of file GUIScreenNode.cpp.

◆ scrollToNodes()

void scrollToNodes ( )

Scroll to nodes.

Definition at line 293 of file GUIScreenNode.cpp.

◆ scrollToNodeX()

void scrollToNodeX ( const string &  node,
const string &  toNode 
)
inline

Register deferred scroll to node X.

Parameters
nodenode
toNodeto node

Definition at line 183 of file GUIScreenNode.h.

◆ scrollToNodeY()

void scrollToNodeY ( const string &  node,
const string &  toNode 
)
inline

Register deferred scroll to node Y.

Parameters
nodenode
toNodeto node

Definition at line 197 of file GUIScreenNode.h.

◆ setGUI()

void setGUI ( GUI gui)

Set GUI.

Parameters
guigui

Definition at line 115 of file GUIScreenNode.cpp.

◆ setInputEventHandler()

void setInputEventHandler ( GUIInputEventHandler inputEventHandler)

Set input event handler.

Parameters
inputEventHandlerinput event handler

Definition at line 459 of file GUIScreenNode.cpp.

◆ setPopUp()

void setPopUp ( bool  popUp)

Set pop up.

Parameters
popUppop up

Definition at line 134 of file GUIScreenNode.cpp.

◆ setScreenSize()

void setScreenSize ( int  width,
int  height 
)

Set screen size.

Parameters
widthwidth
heightheight

Definition at line 308 of file GUIScreenNode.cpp.

◆ setValues()

void setValues ( const unordered_map< string, MutableString > &  values)

Set values.

Parameters
valuesvalues

Definition at line 587 of file GUIScreenNode.cpp.

◆ setVisible()

void setVisible ( bool  visible)

Set visible.

Parameters
visiblevisible

Definition at line 120 of file GUIScreenNode.cpp.

◆ tick()

void tick ( )
private

Calls registered tick nodes controller tick method.

Definition at line 546 of file GUIScreenNode.cpp.

Friends And Related Function Documentation

◆ GUIElementNode

friend class GUIElementNode
friend

Definition at line 60 of file GUIScreenNode.h.

◆ GUINode

friend class GUINode
friend

Definition at line 61 of file GUIScreenNode.h.

◆ GUINodeConditions

friend class GUINodeConditions
friend

Definition at line 62 of file GUIScreenNode.h.

◆ GUIParentNode

friend class GUIParentNode
friend

Definition at line 63 of file GUIScreenNode.h.

◆ tdme::gui::GUI

friend class tdme::gui::GUI
friend

Definition at line 58 of file GUIScreenNode.h.

◆ tdme::gui::GUIParser

friend class tdme::gui::GUIParser
friend

Definition at line 59 of file GUIScreenNode.h.

Member Data Documentation

◆ actionListener

vector<GUIActionListener*> actionListener
private

Definition at line 76 of file GUIScreenNode.h.

◆ applicationRootPathName

string applicationRootPathName
private

Definition at line 66 of file GUIScreenNode.h.

◆ applicationSubPathName

string applicationSubPathName
private

Definition at line 67 of file GUIScreenNode.h.

◆ changeListener

vector<GUIChangeListener*> changeListener
private

Definition at line 77 of file GUIScreenNode.h.

◆ childControllerNodes

vector<GUINode*> childControllerNodes
private

Definition at line 82 of file GUIScreenNode.h.

◆ contextMenuRequestListener

vector<GUIContextMenuRequestListener*> contextMenuRequestListener
private

Definition at line 79 of file GUIScreenNode.h.

◆ elementNodeToNodeMapping

unordered_map<string, unordered_set<string> > elementNodeToNodeMapping
private

Definition at line 85 of file GUIScreenNode.h.

◆ fileName

string fileName
private

Definition at line 68 of file GUIScreenNode.h.

◆ floatingNodes

vector<GUINode*> floatingNodes
private

Definition at line 75 of file GUIScreenNode.h.

◆ focusListener

vector<GUIFocusListener*> focusListener
private

Definition at line 80 of file GUIScreenNode.h.

◆ gui

GUI* gui { nullptr }
private

Definition at line 69 of file GUIScreenNode.h.

◆ inputEventHandler

GUIInputEventHandler* inputEventHandler
private

Definition at line 81 of file GUIScreenNode.h.

◆ invalidateLayoutNodeIds

unordered_set<string> invalidateLayoutNodeIds
private

Definition at line 84 of file GUIScreenNode.h.

◆ mouseOverListener

vector<GUIMouseOverListener*> mouseOverListener
private

Definition at line 78 of file GUIScreenNode.h.

◆ nodeCounter

int nodeCounter
private

Definition at line 70 of file GUIScreenNode.h.

◆ nodesById

unordered_map<string, GUINode*> nodesById
private

Definition at line 73 of file GUIScreenNode.h.

◆ popUp

bool popUp
private

Definition at line 88 of file GUIScreenNode.h.

◆ screenHeight

int screenHeight
private

Definition at line 72 of file GUIScreenNode.h.

◆ screenWidth

int screenWidth
private

Definition at line 71 of file GUIScreenNode.h.

◆ scrollToNodesX

vector<ScrollToNodeStruct> scrollToNodesX
private

Definition at line 97 of file GUIScreenNode.h.

◆ scrollToNodesY

vector<ScrollToNodeStruct> scrollToNodesY
private

Definition at line 98 of file GUIScreenNode.h.

◆ sizeConstraints

GUIScreenNode_SizeConstraints sizeConstraints
private

Definition at line 83 of file GUIScreenNode.h.

◆ tickNodesById

unordered_map<string, GUINode*> tickNodesById
private

Definition at line 74 of file GUIScreenNode.h.

◆ timedExpressions

unordered_map<int64_t, string> timedExpressions
private

Definition at line 90 of file GUIScreenNode.h.

◆ visible

bool visible
private

Definition at line 87 of file GUIScreenNode.h.


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