#include "../ui_nodes.h"
Go to the source code of this file.
Functions | |
void | UI_RegisterAbstractNode (uiBehaviour_t *) |
qboolean | UI_NodeInstanceOf (const uiNode_t *node, const char *behaviourName) |
Check the node inheritance. | |
qboolean | UI_NodeInstanceOfPointer (const uiNode_t *node, const uiBehaviour_t *behaviour) |
Check the node inheritance. | |
qboolean | UI_NodeSetProperty (uiNode_t *node, const value_t *property, const char *value) |
Set node property. | |
void | UI_NodeSetPropertyFromRAW (uiNode_t *node, const value_t *property, void *rawValue, int rawType) |
float | UI_GetFloatFromNodeProperty (const struct uiNode_s *node, const value_t *property) |
const char * | UI_GetStringFromNodeProperty (const uiNode_t *node, const value_t *property) |
Return a string from a node property. | |
void | UI_UnHideNode (struct uiNode_s *node) |
Unhides a given node. | |
void | UI_HideNode (struct uiNode_s *node) |
Hides a given node. | |
void | UI_Invalidate (struct uiNode_s *node) |
Invalidate a node and all his parent to request a layout update. | |
void | UI_Validate (struct uiNode_s *node) |
Validate a node tree. | |
void | UI_NodeSetSize (uiNode_t *node, vec2_t size) |
Update the node size and fire the size callback. | |
void | UI_GetNodeAbsPos (const struct uiNode_s *node, vec2_t pos) |
void | UI_NodeAbsoluteToRelativePos (const struct uiNode_s *node, int *x, int *y) |
void | UI_NodeRelativeToAbsolutePoint (const uiNode_t *node, vec2_t pos) |
Update a relative point to an absolute one. | |
void | UI_NodeGetPoint (const uiNode_t *node, vec2_t pos, int pointDirection) |
return a relative position of a point into a node. | |
struct uiNode_s * | UI_GetNode (const struct uiNode_s *const node, const char *name) |
void | UI_InsertNode (struct uiNode_s *const node, struct uiNode_s *prevNode, struct uiNode_s *newNode) |
Insert a node next another one into a node. If prevNode is NULL add the node on the head of the window. | |
void | UI_AppendNode (struct uiNode_s *const node, struct uiNode_s *newNode) |
add a node at the end of the node child | |
uiNode_t * | UI_RemoveNode (uiNode_t *const node, uiNode_t *child) |
Remove a node from a parent node. | |
void | UI_UpdateRoot (uiNode_t *node, uiNode_t *newRoot) |
Definition in file ui_node_abstractnode.h.
add a node at the end of the node child
Definition at line 325 of file ui_node_abstractnode.c.
References uiNode_s::lastChild, and UI_InsertNode().
Referenced by UI_AbstractNodeCallCreateChild(), UI_CloneNode(), UI_ParseNode(), and UI_WindowNodeLoaded().
Return a string from a node property.
[in] | node | Requested node |
[in] | property | Requested property |
Definition at line 431 of file ui_node_abstractnode.c.
References byte, Com_Printf(), Com_ValueToStr(), f, i, value_s::ofs, value_s::string, value_s::type, UI_GetPath(), UI_GetReferenceFloat(), UI_GetReferenceString(), V_CVAR_OR_FLOAT, V_CVAR_OR_LONGSTRING, V_CVAR_OR_STRING, V_NOT_UI, V_UI_CVAR, V_UI_MASK, and va().
Referenced by UI_GenInjectedString(), and UI_GetStringFromExpression().
void UI_HideNode | ( | uiNode_t * | node | ) |
Hides a given node.
Definition at line 180 of file ui_node_abstractnode.c.
References Com_Printf(), uiNode_s::invis, and qtrue.
Insert a node next another one into a node. If prevNode is NULL add the node on the head of the window.
[in] | node | Node where inserting a node |
[in] | prevNode | previous node, will became before the newNode; else NULL if newNode will become the first child of the node |
[in] | newNode | node we insert |
Definition at line 236 of file ui_node_abstractnode.c.
References uiNode_s::firstChild, uiNode_s::indexed, uiNode_s::lastChild, uiNode_s::next, uiNode_s::parent, uiNode_s::root, UI_Invalidate(), and UI_WindowNodeAddIndexedNode().
Referenced by UI_AppendNode().
void UI_Invalidate | ( | struct uiNode_s * | node | ) |
Invalidate a node and all his parent to request a layout update.
Definition at line 576 of file ui_node_abstractnode.c.
References uiNode_s::invalidated, uiNode_s::parent, and qtrue.
Referenced by UI_AbstractNodeSizeChanged(), UI_AbstractNodeVisibilityChange(), UI_InsertNode(), UI_InvalidateStack(), UI_OptionPropertyChanged(), UI_PanelNodeLoaded(), UI_PanelPropertyChanged(), UI_RemoveNode(), UI_WindowNodeInit(), and UI_WindowNodeLoaded().
void UI_NodeAbsoluteToRelativePos | ( | const struct uiNode_s * | node, | |
int * | x, | |||
int * | y | |||
) |
return a relative position of a point into a node.
[in] | node | Requested node |
[out] | pos | Result position |
[in] | direction |
Definition at line 72 of file ui_node_abstractnode.c.
References Com_Printf(), int(), LAYOUTALIGN_H_LEFT, LAYOUTALIGN_H_MIDDLE, LAYOUTALIGN_H_RIGHT, LAYOUTALIGN_V_BOTTOM, LAYOUTALIGN_V_MIDDLE, LAYOUTALIGN_V_TOP, uiNode_s::size, UI_GET_HORIZONTAL_ALIGN, and UI_GET_VERTICAL_ALIGN.
Referenced by UI_PushDropDownWindow_f(), and UI_StarLayout().
Check the node inheritance.
[in] | node | Requested node |
[in] | behaviourName | Behaviour name we check |
Definition at line 39 of file ui_node_abstractnode.c.
References uiNode_s::behaviour, uiBehaviour_s::name, qfalse, qtrue, and uiBehaviour_s::super.
Referenced by UI_AbstractScrollableNodeIsSizeChange(), UI_AbstractScrollableNodeScrollY(), UI_AbstractScrollableNodeSetY(), UI_ActiveVScrollbarNode_f(), UI_ConfuncCommand_f(), UI_ConFuncIsVirtual(), UI_DrawModelNode(), UI_FireInit_f(), UI_OptionNodeSortOptions(), UI_TextNodeGetLine(), UI_TextScrollEnd(), UI_WindowIsFullScreen(), UI_WindowNodeGetKeyBinding(), UI_WindowNodeRegisterKeyBinding(), and UI_WindowNodeSetRenderNode().
qboolean UI_NodeInstanceOfPointer | ( | const uiNode_t * | node, | |
const uiBehaviour_t * | behaviour | |||
) |
Check the node inheritance.
[in] | node | Requested node |
[in] | behaviour | Behaviour we check |
Definition at line 55 of file ui_node_abstractnode.c.
References uiNode_s::behaviour, qfalse, qtrue, and uiBehaviour_s::super.
Update a relative point to an absolute one.
[in] | node | The requested node |
[in,out] | pos | A point to transform |
Definition at line 140 of file ui_node_abstractnode.c.
References uiNode_s::parent, and uiNode_s::pos.
Referenced by UI_PushDropDownWindow_f(), and UI_StarLayout().
Set node property.
Definition at line 366 of file ui_node_abstractnode.c.
References uiNode_s::behaviour, byte, Com_GetLastParseError(), Com_ParseValue(), Com_Printf(), f, Mem_PoolStrDup, value_s::ofs, uiBehaviour_s::propertyChanged, qfalse, qtrue, RESULT_OK, value_s::size, value_s::string, value_s::type, ui_dynStringPool, UI_FreeStringProperty(), UI_GetPath(), UI_SetCvar(), V_CVAR_OR_FLOAT, V_CVAR_OR_LONGSTRING, V_CVAR_OR_STRING, V_FLOAT, V_NOT_UI, V_UI_CVAR, and V_UI_MASK.
Referenced by UI_NodeSetPropertyFromActionValue().
void UI_NodeSetPropertyFromRAW | ( | uiNode_t * | node, | |
const value_t * | property, | |||
void * | rawValue, | |||
int | rawType | |||
) |
Definition at line 330 of file ui_node_abstractnode.c.
References uiNode_s::behaviour, byte, Com_Error(), Com_Printf(), Com_SetValue(), ERR_FATAL, value_s::ofs, uiBehaviour_s::propertyChanged, value_s::size, value_s::string, value_s::type, UI_FreeStringProperty(), UI_GetPath(), V_BASETYPEMASK, V_FLOAT, V_INT, V_NOT_UI, V_UI_ACTION, V_UI_CVAR, V_UI_ICONREF, and V_UI_MASK.
Referenced by UI_NodeSetPropertyFromActionValue().
Update the node size and fire the size callback.
Definition at line 203 of file ui_node_abstractnode.c.
References uiNode_s::behaviour, uiNode_s::size, and uiBehaviour_s::sizeChanged.
Referenced by UI_BorderLayout(), UI_EditorNodeCapturedMouseMove(), UI_PackLayout(), UI_StarLayout(), and UI_TopDownFlowLayout().
void UI_RegisterAbstractNode | ( | uiBehaviour_t * | ) |
Definition at line 859 of file ui_node_abstractnode.c.
References uiBehaviour_s::activate, ALIGN_CC, ALIGN_CL, ALIGN_CR, ALIGN_LC, ALIGN_LL, ALIGN_LR, ALIGN_UC, ALIGN_UL, ALIGN_UR, uiBehaviour_s::clone, uiBehaviour_s::close, Cmd_AddCommand(), Com_RegisterConstInt(), uiBehaviour_s::dndDrop, uiBehaviour_s::dndEnter, uiBehaviour_s::dndFinished, uiBehaviour_s::dndLeave, uiBehaviour_s::dndMove, uiBehaviour_s::doLayout, uiBehaviour_s::init, uiBehaviour_s::isAbstract, uiBehaviour_s::name, uiBehaviour_s::properties, uiBehaviour_s::propertyChanged, qtrue, uiBehaviour_s::sizeChanged, UI_AbstractNodeActivate(), UI_AbstractNodeClone(), UI_AbstractNodeClose(), UI_AbstractNodeDNDDrop(), UI_AbstractNodeDNDEnter(), UI_AbstractNodeDNDFinished(), UI_AbstractNodeDNDLeave(), UI_AbstractNodeDNDMove(), UI_AbstractNodeDoLayout(), UI_AbstractNodeInit(), UI_AbstractNodePropertyChanged(), UI_AbstractNodeSizeChanged(), and UI_GetPropertyFromBehaviour().
Remove a node from a parent node.
remove the 'child' node
find node before 'child' node
update cache
Definition at line 275 of file ui_node_abstractnode.c.
References uiNode_s::firstChild, uiNode_s::indexed, uiNode_s::lastChild, uiNode_s::next, uiNode_s::parent, uiNode_s::root, UI_Invalidate(), and UI_WindowNodeRemoveIndexedNode().
Referenced by UI_DeleteNode().
void UI_UnHideNode | ( | uiNode_t * | node | ) |
Unhides a given node.
Definition at line 192 of file ui_node_abstractnode.c.
References Com_Printf(), uiNode_s::invis, and qfalse.
Definition at line 312 of file ui_node_abstractnode.c.
References uiNode_s::firstChild, uiNode_s::next, uiNode_s::root, and UI_UpdateRoot().
Referenced by UI_ParseNode(), and UI_UpdateRoot().
void UI_Validate | ( | struct uiNode_s * | node | ) |
Validate a node tree.
Definition at line 589 of file ui_node_abstractnode.c.
References uiNode_s::behaviour, uiBehaviour_s::doLayout, and uiNode_s::invalidated.
Referenced by UI_AbstractOptionDoLayout(), UI_DrawNode(), UI_GetActiveRenderRect(), UI_GetNodeAtPosition(), and UI_OptionDoLayout().