UFO: Alien Invasion
|
C interface to allow to access to cpp node code. More...
#include <typeinfo>
#include "ui_main.h"
#include "ui_behaviour.h"
#include "ui_nodes.h"
#include "ui_node.h"
#include "node/ui_node_abstractnode.h"
#include "node/ui_node_abstractoption.h"
#include "node/ui_node_battlescape.h"
#include "node/ui_node_panel.h"
#include "ui_parse.h"
#include "ui_components.h"
#include "ui_internal.h"
#include "../../common/hashtable.h"
Go to the source code of this file.
Functions | |
bool | UI_Node_IsVirtual (uiNode_t const *node) |
bool | UI_Node_IsDrawable (uiNode_t const *node) |
bool | UI_Node_IsOptionContainer (uiNode_t const *node) |
bool | UI_Node_IsWindow (uiNode_t const *node) |
bool | UI_Node_IsBattleScape (uiNode_t const *node) |
bool | UI_Node_IsAbstract (uiNode_t const *node) |
bool | UI_Node_IsDrawItselfChild (uiNode_t const *node) |
bool | UI_Node_IsFunction (uiNode_t const *node) |
bool | UI_Node_IsScrollableContainer (uiNode_t const *node) |
const char * | UI_Node_GetWidgetName (uiNode_t const *node) |
intptr_t | UI_Node_GetMemorySize (uiNode_t const *node) |
void | UI_Node_Draw (uiNode_t *node) |
void | UI_Node_DrawTooltip (const uiNode_t *node, int x, int y) |
void | UI_Node_DrawOverWindow (uiNode_t *node) |
void | UI_Node_LeftClick (uiNode_t *node, int x, int y) |
void | UI_Node_RightClick (uiNode_t *node, int x, int y) |
void | UI_Node_MiddleClick (uiNode_t *node, int x, int y) |
bool | UI_Node_Scroll (uiNode_t *node, int deltaX, int deltaY) |
void | UI_Node_MouseMove (uiNode_t *node, int x, int y) |
void | UI_Node_MouseDown (uiNode_t *node, int x, int y, int button) |
void | UI_Node_MouseUp (uiNode_t *node, int x, int y, int button) |
void | UI_Node_MouseEnter (uiNode_t *node) |
void | UI_Node_MouseLeave (uiNode_t *node) |
bool | UI_Node_MouseLongPress (uiNode_t *node, int x, int y, int button) |
bool | UI_Node_StartDragging (uiNode_t *node, int startX, int startY, int currentX, int currentY, int button) |
void | UI_Node_CapturedMouseMove (uiNode_t *node, int x, int y) |
void | UI_Node_CapturedMouseLost (uiNode_t *node) |
void | UI_Node_Loading (uiNode_t *node) |
void | UI_Node_Loaded (uiNode_t *node) |
void | UI_Node_Clone (uiNode_t const *source, uiNode_t *clone) |
void | UI_Node_InitNodeDynamic (uiNode_t *node) |
void | UI_Node_InitNode (uiNode_t *node) |
void | UI_Node_DeleteNode (uiNode_t *node) |
void | UI_Node_WindowOpened (uiNode_t *node, linkedList_t *params) |
void | UI_Node_WindowClosed (uiNode_t *node) |
void | UI_Node_WindowActivate (uiNode_t *node) |
void | UI_Node_DoLayout (uiNode_t *node) |
void | UI_Node_Activate (uiNode_t *node) |
void | UI_Node_PropertyChanged (uiNode_t *node, const value_t *property) |
void | UI_Node_PosChanged (uiNode_t *node) |
void | UI_Node_SizeChanged (uiNode_t *node) |
void | UI_Node_GetClientPosition (uiNode_t const *node, vec2_t position) |
bool | UI_Node_DndEnter (uiNode_t *node) |
bool | UI_Node_DndMove (uiNode_t *node, int x, int y) |
void | UI_Node_DndLeave (uiNode_t *node) |
bool | UI_Node_DndDrop (uiNode_t *node, int x, int y) |
bool | UI_Node_DndFinished (uiNode_t *node, bool isDroped) |
void | UI_Node_FocusGained (uiNode_t *node) |
void | UI_Node_FocusLost (uiNode_t *node) |
bool | UI_Node_KeyPressed (uiNode_t *node, unsigned int key, unsigned short unicode) |
bool | UI_Node_KeyReleased (uiNode_t *node, unsigned int key, unsigned short unicode) |
int | UI_Node_GetCellWidth (uiNode_t *node) |
int | UI_Node_GetCellHeight (uiNode_t *node) |
const char * | UI_Node_GetText (uiNode_t *node) |
void | UI_Node_SetText (uiNode_t *node, const char *text) |
void | UI_Node_SetFont (uiNode_t *node, const char *name) |
void | UI_Node_SetImage (uiNode_t *node, const char *name) |
const char * | UI_Node_GetTooltip (uiNode_t *node) |
void | UI_Node_SetTooltip (uiNode_t *node, const char *tooltip) |
bool | UI_Node_IsDisabled (uiNode_t const *node) |
bool | UI_Node_IsInvisible (uiNode_t const *node) |
bool | UI_Node_IsGhost (uiNode_t const *node) |
bool | UI_Node_IsFlashing (uiNode_t const *node) |
void | UI_Node_SetDisabled (uiNode_t *node, const bool value) |
bool | UI_NodeInstanceOf (const uiNode_t *node, const char *behaviourName) |
Check the node inheritance. More... | |
bool | UI_NodeInstanceOfPointer (const uiNode_t *node, const uiBehaviour_t *behaviour) |
Check the node inheritance. More... | |
void | UI_NodeGetPoint (const uiNode_t *node, vec2_t pos, int direction) |
return a relative position of a point into a node. More... | |
void | UI_GetNodeAbsPos (const uiNode_t *node, vec2_t pos) |
Returns the absolute position of a node. More... | |
void | UI_GetNodeScreenPos (const uiNode_t *node, vec2_t pos) |
Returns the absolute position of a node in the screen. Screen position is not used for the node rendering cause we use OpenGL translations. But this function is need for some R_functions methodes. More... | |
void | UI_NodeRelativeToAbsolutePoint (const uiNode_t *node, vec2_t pos) |
Update a relative point to an absolute one. More... | |
void | UI_NodeAbsoluteToRelativePos (const uiNode_t *node, int *x, int *y) |
Update an absolute position to a relative one. More... | |
void | UI_HideNode (uiNode_t *node) |
Hides a given node. More... | |
void | UI_UnHideNode (uiNode_t *node) |
Unhides a given node. More... | |
void | UI_NodeSetPos (uiNode_t *node, vec2_t pos) |
Update the node size and fire the pos callback. More... | |
void | UI_NodeSetPos (uiNode_t *node, float x, float y) |
Update the node size and fire the pos callback. More... | |
void | UI_NodeSetSize (uiNode_t *node, vec2_t size) |
Update the node size and fire the size callback. More... | |
void | UI_NodeSetSize (uiNode_t *node, float w, float h) |
Update the node size and fire the size callback. More... | |
void | UI_NodeSetBox (uiNode_t *node, float x, float y, float w, float h) |
Update the node size and height and fire callbacks. More... | |
uiNode_t * | UI_GetNode (const uiNode_t *node, const char *name) |
Search a child node by given name. More... | |
uiNode_t * | UI_GetPrevNode (const uiNode_t *node) |
Returns the previous node based on the order of nodes in the parent. More... | |
uiNode_t * | UI_FindNode (const uiNode_t *node, const char *name) |
Recursive searches for a child node by name in the entire subtree. More... | |
void | UI_InsertNode (uiNode_t *const parent, uiNode_t *prevNode, uiNode_t *newNode) |
Insert a node next another one into a node. If prevNode is nullptr add the node on the head of the window. More... | |
uiNode_t * | UI_RemoveNode (uiNode_t *const node, uiNode_t *child) |
Remove a node from a parent node. More... | |
void | UI_MoveNode (uiNode_t *const parent, uiNode_t *prevNode, uiNode_t *node) |
Moves a node in the tree. More... | |
void | UI_UpdateRoot (uiNode_t *node, uiNode_t *newRoot) |
void | UI_AppendNode (uiNode_t *const parent, uiNode_t *newNode) |
add a node at the end of the node child More... | |
void | UI_NodeSetPropertyFromRAW (uiNode_t *node, const value_t *property, const void *rawValue, int rawType) |
bool | UI_NodeSetProperty (uiNode_t *node, const value_t *property, const char *value) |
Set node property. More... | |
const char * | UI_GetStringFromNodeProperty (const uiNode_t *node, const value_t *property) |
Return a string from a node property. More... | |
float | UI_GetFloatFromNodeProperty (const uiNode_t *node, const value_t *property) |
Return a float from a node property. More... | |
void | UI_Invalidate (uiNode_t *node) |
Invalidate a node and all his parent to request a layout update. More... | |
void | UI_Validate (uiNode_t *node) |
Validate a node tree. More... | |
void | UI_AddNodeMethod (uiNode_t *node, const char *name, LUA_METHOD fcn) |
Adds a lua based method to the list of available node methods for calling. More... | |
bool | UI_GetNodeMethod (const uiNode_t *node, const char *name, LUA_METHOD &fcn) |
Finds the lua based method on this node or its super. More... | |
bool | UI_HasNodeMethod (uiNode_t *node, const char *name) |
Returns true if a node method of given name is available on this node or its super. More... | |
void | UI_Node_SetItem (uiNode_t *node, const char *name, LUA_METHOD fcn) |
This functions adds a lua based method to the internal uiNode behaviour. More... | |
LUA_METHOD | UI_Node_GetItem (uiNode_t *node, const char *name) |
This functions queries a lua based method in the internal uiNode behaviour. More... | |
C interface to allow to access to cpp node code.
Definition in file ui_node.cpp.
void UI_AddNodeMethod | ( | uiNode_t * | node, |
const char * | name, | ||
LUA_METHOD | fcn | ||
) |
Adds a lua based method to the list of available node methods for calling.
[in] | node | The node to extend. |
[in] | name | The name of the new method to add |
[in] | fcn | The lua based function reference. |
Definition at line 1082 of file ui_node.cpp.
References Com_Printf(), HASH_Insert(), HASH_NewTable(), uiNode_t::name, and uiNode_t::nodeMethods.
Referenced by UI_Node_SetItem(), and uiNode_t_add_nodemethod().
add a node at the end of the node child
parent | The node where newNode is inserted as a child. |
newNode | The node to insert. |
Definition at line 856 of file ui_node.cpp.
References uiNode_t::lastChild, and UI_InsertNode().
Referenced by UI_AbstractNodeCallCreateChild(), UI_CloneNode(), UI_CreateControl(), UI_ParseNode(), UI_Window_SetCloseButton(), UI_Window_SetDragButton(), and uiNode_t_append_node().
Recursive searches for a child node by name in the entire subtree.
Definition at line 733 of file ui_node.cpp.
References uiNode_t::firstChild, uiNode_t::next, UI_FindNode(), and UI_GetNode().
Referenced by uiWindowNode::doLayout(), UI_FindNode(), UI_Window_SetCloseButton(), UI_Window_SetDragButton(), and uiNode_t_find().
Return a float from a node property.
[in] | node | Requested node |
[in] | property | Requested property |
Definition at line 1019 of file ui_node.cpp.
References Com_Printf(), Cvar_Get(), Q_strstart(), value_s::string, value_s::type, UI_GetPath(), V_BOOL, V_CVAR_OR_FLOAT, V_CVAR_OR_STRING, V_FLOAT, V_INT, V_UI_CVAR, V_UI_MASK, and cvar_s::value.
Referenced by UI_GetFloatFromExpression().
Search a child node by given name.
Definition at line 702 of file ui_node.cpp.
References uiNode_t::firstChild, uiNode_t::name, uiNode_t::next, and Q_streq.
Referenced by UI_AbstractNodeCallCreateChild(), UI_ContainerNodeAutoPlaceItem(), UI_CreateControl(), UI_FindNode(), UI_GetContainerNodeByContainerIDX(), UI_ParseNode(), UI_PopupList(), UI_ReadNodePath(), UI_SetOneButton(), and uiNode_t_child().
Returns the absolute position of a node.
[in] | node | Context node |
[out] | pos | Absolute position |
Definition at line 514 of file ui_node.cpp.
References uiNode_t::behaviour, uiNode_t::box, Com_Error(), ERR_FATAL, uiBehaviour_t::isVirtual, uiNode_t::name, uiNode_t::parent, uiBox_t::pos, UI_GetPath(), and Vector2Set.
Referenced by uiBattleScapeNode::draw(), uiStringNode::draw(), uiVScrollbarNode::draw(), uiBaseLayoutNode::draw(), uiMaterialEditorNode::draw(), uiPanelNode::draw(), uiRowsNode::draw(), uiSelectBoxNode::draw(), uiItemNode::draw(), uiLineChartNode::draw(), uiTBarNode::draw(), uiBarNode::draw(), uiTextureNode::draw(), uiMessageListNode::draw(), uiOptionTreeNode::draw(), uiRadarNode::draw(), uiTabNode::draw(), uiButtonNode::draw(), uiCheckBoxNode::draw(), uiOptionListNode::draw(), uiRadioButtonNode::draw(), uiSequenceNode::draw(), uiTextEntryNode::draw(), uiImageNode::draw(), uiWindowNode::draw(), uiGeoscapeNode::draw(), uiSpinnerNode::draw(), uiSelectBoxNode::drawOverWindow(), uiVideoNode::drawOverWindow(), uiTextListNode::drawText(), uiText2Node::drawText(), uiTextNode::drawText(), GAME_GetImportData(), uiContainerNode::onDndMove(), uiTextEntryNode::onFocusGained(), uiSelectBoxNode::onLeftClick(), uiBattleScapeNode::onSizeChanged(), uiBattleScapeNode::onWindowOpened(), UI_BaseInventoryNodeDrawItems(), UI_BaseInventoryNodeGetItem(), UI_ContainerNodeDrawDropPreview(), UI_ContainerNodeDrawFreeSpace(), UI_ContainerNodeDrawGrid(), UI_ContainerNodeDrawSingle(), UI_ContainerNodeGetItemAtPosition(), UI_DrawDisabled(), UI_DrawFree(), UI_DrawModelNode(), UI_DrawNode(), UI_EditorNodeHighlightNode(), UI_InitModelInfoView(), UI_InitRadar(), UI_MaterialEditorNodeGetImageAtPosition(), and UI_OptionListNodeGetOptionAtPosition().
bool UI_GetNodeMethod | ( | const uiNode_t * | node, |
const char * | name, | ||
LUA_METHOD & | fcn | ||
) |
Finds the lua based method on this node or its super.
[in] | node | The node to examine. |
[in] | name | The name of the method to find |
[out] | fcn | A reference to a LUA_METHOD value to the corresponding lua based function or to LUA_NOREF if the method is not found |
Definition at line 1104 of file ui_node.cpp.
References uiNode_t::behaviour, HASH_Get(), uiNode_t::super, and UI_GetBehaviourMethod().
Referenced by UI_ExecuteLuaMethod_ByName(), UI_GetPropertyOrLuaMethod(), UI_HasNodeMethod(), and UI_Node_GetItem().
Returns the absolute position of a node in the screen. Screen position is not used for the node rendering cause we use OpenGL translations. But this function is need for some R_functions methodes.
[in] | node | Context node |
[out] | pos | Absolute position into the screen |
Definition at line 542 of file ui_node.cpp.
References uiNode_t::behaviour, uiNode_t::box, Com_Error(), ERR_FATAL, uiBehaviour_t::isVirtual, uiNode_t::name, uiNode_t::parent, uiBox_t::pos, UI_GetPath(), UI_Node_GetClientPosition(), UI_Node_IsScrollableContainer(), and Vector2Set.
Referenced by uiRadarNode::draw(), uiSequenceNode::draw(), uiGeoscapeNode::draw(), UI_BaseInventoryNodeDraw2(), and UI_DrawModelNode().
Returns the previous node based on the order of nodes in the parent.
Definition at line 721 of file ui_node.cpp.
References uiNode_t::firstChild, uiNode_t::next, and uiNode_t::parent.
Referenced by UI_Window_SetDragButton().
Return a string from a node property.
[in] | node | Requested node |
[in] | property | Requested property |
Definition at line 978 of file ui_node.cpp.
References 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().
bool UI_HasNodeMethod | ( | uiNode_t * | node, |
const char * | name | ||
) |
Returns true if a node method of given name is available on this node or its super.
[in] | node | The node to examine. |
[in] | name | The name of the method to find |
Definition at line 1127 of file ui_node.cpp.
References uiNode_t::behaviour, UI_GetBehaviourMethod(), and UI_GetNodeMethod().
Hides a given node.
Definition at line 623 of file ui_node.cpp.
References Com_Printf(), and uiNode_t::invis.
Insert a node next another one into a node. If prevNode is nullptr add the node on the head of the window.
[in] | parent | Node where the newNode is inserted in |
[in] | prevNode | previous node, will became before the newNode; else nullptr if newNode will become the first child of the node |
[in] | newNode | node we insert |
Definition at line 752 of file ui_node.cpp.
References uiNode_t::firstChild, uiNode_t::indexed, uiNode_t::lastChild, uiNode_t::next, uiNode_t::parent, uiNode_t::root, UI_Invalidate(), UI_UpdateRoot(), and UI_WindowNodeAddIndexedNode().
Referenced by UI_AppendNode(), UI_MoveNode(), UI_Window_SetDragButton(), and uiNode_t_insert_node().
Invalidate a node and all his parent to request a layout update.
Definition at line 1053 of file ui_node.cpp.
References uiNode_t::invalidated, and uiNode_t::parent.
Referenced by uiPanelNode::onLoaded(), uiWindowNode::onLoaded(), uiOptionNode::onPropertyChanged(), uiPanelNode::onPropertyChanged(), uiLocatedNode::onSizeChanged(), uiWindowNode::onWindowOpened(), UI_AbstractNodeVisibilityChange(), UI_InsertNode(), UI_InvalidateStack(), UI_MoveNode(), and UI_RemoveNode().
Moves a node in the tree.
[in] | parent | Node where the moved node is inserted in |
[in] | prevNode | Previous node to move this one after |
[in] | node | Node to move |
Definition at line 828 of file ui_node.cpp.
References UI_InsertNode(), UI_Invalidate(), and UI_RemoveNode().
Referenced by uiNode_t_move_node().
Definition at line 271 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onActivate().
Referenced by UI_CheckBoxNodeCallActivate(), and UI_KeyPressedInWindow().
Definition at line 200 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onCapturedMouseLost().
Referenced by UI_MouseRelease().
Definition at line 194 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onCapturedMouseMove().
Referenced by UI_MouseMove().
Definition at line 220 of file ui_node.cpp.
References uiNode_t::behaviour, uiNode::clone(), SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_CloneNode().
Definition at line 237 of file ui_node.cpp.
References uiNode_t::behaviour, uiNode::deleteNode(), SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_DeleteNode().
Definition at line 321 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onDndDrop().
Referenced by UI_DNDDrop().
bool UI_Node_DndEnter | ( | uiNode_t * | node | ) |
Definition at line 303 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onDndEnter().
Referenced by UI_DNDMouseMove().
bool UI_Node_DndFinished | ( | uiNode_t * | node, |
bool | isDroped | ||
) |
Definition at line 327 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onDndFinished().
Referenced by UI_DNDAbort(), and UI_DNDDrop().
Definition at line 315 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onDndLeave().
Referenced by UI_DNDAbort(), and UI_DNDMouseMove().
Definition at line 309 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onDndMove().
Referenced by UI_DNDMouseMove().
Definition at line 263 of file ui_node.cpp.
References uiNode_t::behaviour, uiLocatedNode::doLayout(), SharedPtr< T >::get(), uiBehaviour_t::manager, and UI_Node_IsDrawable().
Referenced by uiLocatedNode::doLayout(), UI_ColumnLayout(), UI_StarLayout(), and UI_Validate().
Definition at line 109 of file ui_node.cpp.
References uiNode_t::behaviour, uiLocatedNode::draw(), SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_DrawNode().
Definition at line 121 of file ui_node.cpp.
References uiNode_t::behaviour, uiLocatedNode::drawOverWindow(), SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_Draw().
Definition at line 115 of file ui_node.cpp.
References uiNode_t::behaviour, uiLocatedNode::drawTooltip(), SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_Draw().
Definition at line 335 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onFocusGained().
Referenced by UI_RequestFocus().
Definition at line 341 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onFocusLost().
Referenced by UI_RemoveFocus(), and UI_RequestFocus().
Definition at line 367 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiLocatedNode::getCellHeight(), and uiBehaviour_t::manager.
Definition at line 361 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiLocatedNode::getCellWidth(), and uiBehaviour_t::manager.
Definition at line 295 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiLocatedNode::getClientPosition(), and uiBehaviour_t::manager.
Referenced by UI_DrawNode(), UI_GetNodeInTreeAtPosition(), UI_GetNodeScreenPos(), and UI_NodeAbsoluteToRelativePos().
LUA_METHOD UI_Node_GetItem | ( | uiNode_t * | node, |
const char * | name | ||
) |
This functions queries a lua based method in the internal uiNode behaviour.
[in] | node | The node with behaviour being queried. |
[in] | name | The name of the behaviour entry to find. |
Definition at line 1159 of file ui_node.cpp.
References UI_GetNodeMethod().
Referenced by uiNode_t___getitem().
intptr_t UI_Node_GetMemorySize | ( | uiNode_t const * | node | ) |
Definition at line 104 of file ui_node.cpp.
References uiNode_t::behaviour, and uiBehaviour_t::extraDataSize.
Referenced by UI_CloneNode().
const char* UI_Node_GetText | ( | uiNode_t * | node | ) |
Definition at line 373 of file ui_node.cpp.
References Com_Printf(), uiNode_t::text, and UI_GetPath().
Referenced by uiDataNode_t_as_string(), and uiNode_t_text().
const char* UI_Node_GetTooltip | ( | uiNode_t * | node | ) |
Definition at line 397 of file ui_node.cpp.
References uiNode_t::tooltip.
const char* UI_Node_GetWidgetName | ( | uiNode_t const * | node | ) |
Definition at line 99 of file ui_node.cpp.
References uiNode_t::behaviour, and uiBehaviour_t::name.
Referenced by UI_CloneNode(), UI_DebugTree(), and UI_GetStringFromExpression().
Definition at line 231 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiNode::initNode(), and uiBehaviour_t::manager.
Referenced by UI_AllocNode().
Definition at line 226 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiNode::initNodeDynamic(), and uiBehaviour_t::manager.
Referenced by UI_AllocNode(), and UI_CloneNode().
bool UI_Node_IsAbstract | ( | uiNode_t const * | node | ) |
Definition at line 72 of file ui_node.cpp.
References uiNode_t::behaviour, and uiBehaviour_t::isAbstract.
Referenced by UI_AllocNodeWithoutNew(), and uiNode_t_is_abstract().
bool UI_Node_IsBattleScape | ( | uiNode_t const * | node | ) |
Definition at line 66 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_IsMouseOnWindow().
bool UI_Node_IsDisabled | ( | uiNode_t const * | node | ) |
Definition at line 406 of file ui_node.cpp.
References uiNode_t::disabled.
Referenced by uiNode_t_is_disabled().
bool UI_Node_IsDrawable | ( | uiNode_t const * | node | ) |
Definition at line 48 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_DrawNode(), UI_LeftRightFlowLayout(), UI_Node_DoLayout(), and UI_TopDownFlowLayout().
bool UI_Node_IsDrawItselfChild | ( | uiNode_t const * | node | ) |
Definition at line 77 of file ui_node.cpp.
References uiNode_t::behaviour, and uiBehaviour_t::drawItselfChild.
Referenced by UI_DrawNode().
bool UI_Node_IsFlashing | ( | uiNode_t const * | node | ) |
Definition at line 418 of file ui_node.cpp.
References uiNode_t::flash.
Referenced by uiNode_t_is_flashing().
bool UI_Node_IsFunction | ( | uiNode_t const * | node | ) |
Definition at line 85 of file ui_node.cpp.
References uiNode_t::behaviour, and uiBehaviour_t::isFunction.
Referenced by UI_ParseFunction(), UI_ParseNodeBody(), and uiNode_t_is_function().
bool UI_Node_IsGhost | ( | uiNode_t const * | node | ) |
Definition at line 414 of file ui_node.cpp.
References uiNode_t::ghost.
Referenced by uiNode_t_is_ghost().
bool UI_Node_IsInvisible | ( | uiNode_t const * | node | ) |
Definition at line 410 of file ui_node.cpp.
References uiNode_t::invis.
Referenced by uiNode_t_is_invisible().
bool UI_Node_IsOptionContainer | ( | uiNode_t const * | node | ) |
Definition at line 54 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_AbstractOption_SortOptions().
bool UI_Node_IsScrollableContainer | ( | uiNode_t const * | node | ) |
Definition at line 93 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by uiAbstractScrollableNode::isSizeChange(), uiAbstractScrollableNode::scrollY(), uiAbstractScrollableNode::setScrollY(), UI_DrawNode(), UI_GetNodeInTreeAtPosition(), UI_GetNodeScreenPos(), and UI_NodeAbsoluteToRelativePos().
bool UI_Node_IsVirtual | ( | uiNode_t const * | node | ) |
Definition at line 42 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_DrawNode(), UI_GetNodeInTreeAtPosition(), and uiNode_t_is_virtual().
bool UI_Node_IsWindow | ( | uiNode_t const * | node | ) |
Definition at line 60 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), and uiBehaviour_t::manager.
Referenced by UI_ReadNodePath(), and uiNode_t_is_window().
Definition at line 347 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onKeyPressed().
Referenced by UI_KeyPressed(), and UI_KeyPressedInWindow().
Definition at line 353 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onKeyReleased().
Referenced by UI_KeyRelease().
Definition at line 128 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onLeftClick().
Referenced by UI_LeftClick().
Definition at line 214 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onLoaded().
Referenced by UI_CreateComponent(), UI_CreateControl(), UI_CreateWindow(), UI_ParseComponent(), UI_ParseNode(), and UI_ParseWindow().
Definition at line 208 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onLoading().
Referenced by UI_AllocNode().
Definition at line 140 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMiddleClick().
Referenced by UI_MiddleClick().
Definition at line 158 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMouseDown().
Referenced by UI_MouseDown().
Definition at line 170 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMouseEnter().
Referenced by UI_MouseMove().
Definition at line 176 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMouseLeave().
Referenced by UI_MouseMove().
Definition at line 182 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMouseLongPress().
Referenced by UI_LongPressCallback().
Definition at line 152 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMouseMove().
Referenced by UI_MouseMove().
Definition at line 164 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onMouseUp().
Referenced by UI_MouseUp().
Definition at line 283 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onSizeChanged().
Referenced by UI_NodeSetPos().
Definition at line 277 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onPropertyChanged().
Referenced by UI_NodeSetProperty(), and UI_NodeSetPropertyFromRAW().
Definition at line 134 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onRightClick().
Referenced by UI_RightClick().
Definition at line 146 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onScroll().
Referenced by UI_MouseScroll().
Definition at line 422 of file ui_node.cpp.
References uiNode_t::disabled.
Referenced by uiNode_t_set_disabled().
Definition at line 387 of file ui_node.cpp.
References uiNode_t::font, Mem_PoolStrDup, ui_dynStringPool, and UI_FreeStringProperty().
Referenced by uiNode_t_set_font().
Definition at line 392 of file ui_node.cpp.
References uiNode_t::image, Mem_PoolStrDup, ui_dynStringPool, and UI_FreeStringProperty().
Referenced by uiImageNode_t_set_source(), uiNode_t_set_image(), and uiTextureNode_t_set_source().
void UI_Node_SetItem | ( | uiNode_t * | node, |
const char * | name, | ||
LUA_METHOD | fcn | ||
) |
This functions adds a lua based method to the internal uiNode behaviour.
[in] | node | The node getting new behaviour. |
[in] | name | The name of the new behaviour entry (this is the function name). |
[in] | fcn | A reference to a lua based method. |
Definition at line 1147 of file ui_node.cpp.
References UI_AddNodeMethod().
Referenced by uiNode_t___setitem().
Definition at line 382 of file ui_node.cpp.
References Mem_PoolStrDup, uiNode_t::text, ui_dynStringPool, and UI_FreeStringProperty().
Referenced by uiDataNode_t_set_value__SWIG_0(), and uiNode_t_set_text().
Definition at line 401 of file ui_node.cpp.
References Mem_PoolStrDup, uiNode_t::tooltip, ui_dynStringPool, and UI_FreeStringProperty().
Referenced by uiNode_t_set_tooltip().
Definition at line 289 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onSizeChanged().
Referenced by uiNode::onPropertyChanged(), and UI_NodeSetSize().
bool UI_Node_StartDragging | ( | uiNode_t * | node, |
int | startX, | ||
int | startY, | ||
int | currentX, | ||
int | currentY, | ||
int | button | ||
) |
Definition at line 188 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiLocatedNode::onStartDragging().
Referenced by UI_MouseMove().
Definition at line 257 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onWindowActivate().
Referenced by uiNode::onWindowActivate(), and UI_CloseWindowByRef().
Definition at line 251 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onWindowClosed().
Referenced by uiNode::onWindowClosed(), UI_CloseAllWindow(), and UI_CloseWindowByRef().
void UI_Node_WindowOpened | ( | uiNode_t * | node, |
linkedList_t * | params | ||
) |
Definition at line 245 of file ui_node.cpp.
References uiNode_t::behaviour, SharedPtr< T >::get(), uiBehaviour_t::manager, and uiNode::onWindowOpened().
Referenced by uiNode::onWindowOpened(), and UI_PushWindow().
Update an absolute position to a relative one.
[in] | node | Context node |
[in,out] | x | an absolute x position |
[in,out] | y | an absolute y position |
Definition at line 592 of file ui_node.cpp.
References uiNode_t::behaviour, uiNode_t::box, Com_Error(), ERR_DROP, uiBehaviour_t::isVirtual, uiNode_t::name, uiNode_t::parent, uiBox_t::pos, UI_Node_GetClientPosition(), and UI_Node_IsScrollableContainer().
Referenced by uiSelectBoxNode::onCapturedMouseMove(), uiBarNode::onCapturedMouseMove(), uiRadarNode::onCapturedMouseMove(), uiOptionTreeNode::onLeftClick(), uiControlNode::onMouseDown(), uiSpinnerNode::onMouseDown(), UI_EditorNodeGetElementAtPosition(), UI_MaterialEditorNodeGetImageAtPosition(), UI_OptionTreeNodeGetOptionAtPosition(), UI_TabNodeTabAtPosition(), UI_TextListNodeGetLine(), UI_TextNodeGetLine(), and UI_VScrollbarNodeGetElement().
return a relative position of a point into a node.
[in] | node | Requested node |
[out] | pos | Result position |
[in] | direction |
Definition at line 472 of file ui_node.cpp.
References uiNode_t::box, Com_Printf(), int(), LAYOUTALIGN_H_LEFT, LAYOUTALIGN_H_MIDDLE, LAYOUTALIGN_H_RIGHT, LAYOUTALIGN_V_BOTTOM, LAYOUTALIGN_V_MIDDLE, LAYOUTALIGN_V_TOP, uiBox_t::size, UI_GET_HORIZONTAL_ALIGN, and UI_GET_VERTICAL_ALIGN.
Referenced by UI_PushDropDownWindow_f(), and UI_StarLayout().
bool UI_NodeInstanceOf | ( | const uiNode_t * | node, |
const char * | behaviourName | ||
) |
Check the node inheritance.
[in] | node | Requested node |
[in] | behaviourName | Behaviour name we check |
Definition at line 441 of file ui_node.cpp.
References uiNode_t::behaviour, Q_streq, and uiBehaviour_t::super.
Referenced by UI_ConfuncCommand_f(), UI_ConFuncIsVirtual(), UI_DrawModelNode(), UI_TextNodeGetLine(), UI_TextScrollEnd(), UI_WindowIsFullScreen(), UI_WindowNodeGetKeyBinding(), and UI_WindowNodeRegisterKeyBinding().
bool 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 456 of file ui_node.cpp.
References uiNode_t::behaviour, and uiBehaviour_t::super.
Update a relative point to an absolute one.
[in] | node | The requested node |
[in,out] | pos | A point to transform |
Definition at line 575 of file ui_node.cpp.
References uiNode_t::box, uiNode_t::parent, and uiBox_t::pos.
Referenced by UI_PushDropDownWindow_f(), and UI_StarLayout().
Update the node size and height and fire callbacks.
Definition at line 687 of file ui_node.cpp.
References uiNode_t::box, uiBox_t::pos, uiBox_t::size, UI_NodeSetPos(), and UI_NodeSetSize().
Referenced by uiNode_t_set_box(), uiNode_t_set_height(), uiNode_t_set_left(), uiNode_t_set_top(), and uiNode_t_set_width().
Update the node size and fire the pos callback.
Definition at line 646 of file ui_node.cpp.
References uiNode_t::box, uiBox_t::pos, UI_Node_PosChanged(), and Vector2Equal.
Referenced by UI_NodeSetBox(), UI_NodeSetPos(), and uiNode_t_set_pos().
Update the node size and fire the pos callback.
Definition at line 657 of file ui_node.cpp.
References UI_NodeSetPos().
Set node property.
Definition at line 890 of file ui_node.cpp.
References Com_GetLastParseError(), Com_ParseValue(), Com_Printf(), Cvar_SetValue(), f, Mem_PoolStrDup, value_s::ofs, Q_strstart(), RESULT_OK, value_s::size, value_s::string, value_s::type, ui_dynStringPool, UI_FreeStringProperty(), UI_GetPath(), UI_GetSpriteByName(), UI_Node_PropertyChanged(), V_CVAR_OR_FLOAT, V_CVAR_OR_LONGSTRING, V_CVAR_OR_STRING, V_FLOAT, V_NOT_UI, V_UI, V_UI_CVAR, V_UI_MASK, and V_UI_SPRITEREF.
Referenced by UI_NodeSetPropertyFromActionValue(), and UI_Window_SetCloseButton().
void UI_NodeSetPropertyFromRAW | ( | uiNode_t * | node, |
const value_t * | property, | ||
const void * | rawValue, | ||
int | rawType | ||
) |
Definition at line 861 of file ui_node.cpp.
References Com_Error(), Com_Printf(), Com_SetValue(), ERR_FATAL, value_s::ofs, value_s::size, value_s::string, value_s::type, UI_FreeStringProperty(), UI_GetPath(), UI_Node_PropertyChanged(), V_BASETYPEMASK, V_FLOAT, V_INT, V_NOT_UI, V_UI_ACTION, V_UI_CVAR, V_UI_MASK, and V_UI_SPRITEREF.
Referenced by UI_NodeSetPropertyFromActionValue().
Update the node size and fire the size callback.
Definition at line 666 of file ui_node.cpp.
References uiNode_t::box, uiBox_t::size, UI_Node_SizeChanged(), and Vector2Equal.
Referenced by uiEditorNode::onCapturedMouseMove(), UI_BorderLayout(), UI_LeftRightFlowLayout(), UI_NodeSetBox(), UI_NodeSetSize(), UI_PackLayout(), UI_StarLayout(), UI_TopDownFlowLayout(), and uiNode_t_set_size().
Update the node size and fire the size callback.
Definition at line 677 of file ui_node.cpp.
References UI_NodeSetSize().
Remove a node from a parent node.
[in] | node | Node where is the child |
[in] | child | Node we want to remove |
remove the 'child' node
update cache
Definition at line 790 of file ui_node.cpp.
References uiNode_t::firstChild, uiNode_t::indexed, uiNode_t::lastChild, uiNode_t::next, uiNode_t::parent, uiNode_t::root, UI_Invalidate(), and UI_WindowNodeRemoveIndexedNode().
Referenced by UI_DeleteNode(), UI_MoveNode(), UI_Window_SetCloseButton(), and UI_Window_SetDragButton().
Unhides a given node.
Definition at line 635 of file ui_node.cpp.
References Com_Printf(), and uiNode_t::invis.
Definition at line 841 of file ui_node.cpp.
References uiNode_t::firstChild, uiNode_t::next, uiNode_t::root, and UI_UpdateRoot().
Referenced by UI_CreateControl(), UI_InsertNode(), UI_ParseNode(), and UI_UpdateRoot().
Validate a node tree.
Definition at line 1066 of file ui_node.cpp.
References uiNode_t::invalidated, and UI_Node_DoLayout().
Referenced by uiOptionNode::doLayout(), uiAbstractOptionNode::doLayout(), UI_DrawNode(), and UI_GetNodeAtPosition().