|
UFO: Alien Invasion
|


Go to the source code of this file.
Data Structures | |
| struct | uiBehaviour_t |
| node behaviour, how a node work More... | |
Macros | |
| #define | UI_RegisterNodeProperty(BEHAVIOUR, NAME, TYPE, OBJECTTYPE, ATTRIBUTE) |
| Initialize a property. | |
| #define | UI_EXTRADATA_OFFSETOF_(TYPE, MEMBER) |
| Return the offset of an extradata node attribute. | |
| #define | UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE) |
| Initialize a property from extradata of node. | |
| #define | UI_RegisterOveridedNodeProperty(BEHAVIOUR, NAME) |
| Initialize a property which override an inherited property. It is yet only used for the documentation. | |
Typedefs | |
| typedef void(* | uiNodeMethod_t) (uiNode_t *node, const struct uiCallContext_s *context) |
| Signature of a function to bind a node method. | |
Functions | |
| const struct value_s * | UI_RegisterNodePropertyPosSize_ (uiBehaviour_t *behaviour, const char *name, int type, size_t pos, size_t size) |
| Register a property to a behaviour. It should not be used in the code. | |
| const struct value_s * | UI_RegisterNodeMethod (uiBehaviour_t *behaviour, const char *name, uiNodeMethod_t function) |
| Register a node method to a behaviour. | |
| const struct value_s * | UI_GetPropertyFromBehaviour (const uiBehaviour_t *behaviour, const char *name) __attribute__((warn_unused_result)) |
| Return a property from a node behaviour. | |
| const value_t * | UI_GetPropertyOrLuaMethod (const uiNode_t *node, const char *name, value_t *out) |
| Return a property or lua based method from a node, node behaviour or inherited behaviour. | |
| void | UI_InitializeNodeBehaviour (uiBehaviour_t *behaviour) |
| Initialize a node behaviour memory, after registration, and before using it. | |
| void | UI_AddBehaviourMethod (uiBehaviour_t *behaviour, const char *name, LUA_METHOD fcn) |
| Adds a lua based method to the list of available behaviour methods for calling. | |
| bool | UI_HasBehaviourMethod (uiBehaviour_t *behaviour, const char *name) |
| Returns true if a node method of given name is available on this behaviour or its super. | |
| bool | UI_GetBehaviourMethod (const uiBehaviour_t *behaviour, const char *name, LUA_METHOD &fcn) |
| Finds the lua based method on this behaviour or its super. | |
| #define UI_EXTRADATA_OFFSETOF_ | ( | TYPE, | |
| MEMBER ) |
Return the offset of an extradata node attribute.
| TYPE | Extradata type |
| MEMBER | Attribute name |
Definition at line 99 of file ui_behaviour.h.
| #define UI_RegisterExtradataNodeProperty | ( | BEHAVIOUR, | |
| NAME, | |||
| TYPE, | |||
| EXTRADATATYPE, | |||
| ATTRIBUTE ) |
Initialize a property from extradata of node.
| BEHAVIOUR | behaviour Target behaviour |
| NAME | Name of the property |
| TYPE | Type of the property |
| EXTRADATATYPE | Object type containing the property |
| ATTRIBUTE | Name of the attribute of the object containing data of the property |
Definition at line 109 of file ui_behaviour.h.
Referenced by UI_RegisterAbstractOptionNode(), UI_RegisterAbstractScrollableNode(), UI_RegisterAbstractScrollbarNode(), UI_RegisterAbstractValueNode(), UI_RegisterBarNode(), UI_RegisterBaseInventoryNode(), UI_RegisterBaseLayoutNode(), UI_RegisterButtonNode(), UI_RegisterCheckBoxNode(), UI_RegisterContainerNode(), UI_RegisterDataNode(), UI_RegisterGeoscapeNode(), UI_RegisterImageNode(), UI_RegisterItemNode(), UI_RegisterLineChartNode(), UI_RegisterModelNode(), UI_RegisterOptionListNode(), UI_RegisterOptionNode(), UI_RegisterOptionTreeNode(), UI_RegisterPanelNode(), UI_RegisterRadioButtonNode(), UI_RegisterRowsNode(), UI_RegisterSequenceNode(), UI_RegisterSpinnerNode(), UI_RegisterStringNode(), UI_RegisterTBarNode(), UI_RegisterTextEntryNode(), UI_RegisterTextNode(), UI_RegisterTimerNode(), UI_RegisterVideoNode(), UI_RegisterWindowNode(), and UI_RegisterZoneNode().
| #define UI_RegisterNodeProperty | ( | BEHAVIOUR, | |
| NAME, | |||
| TYPE, | |||
| OBJECTTYPE, | |||
| ATTRIBUTE ) |
Initialize a property.
| BEHAVIOUR | behaviour Target behaviour |
| NAME | Name of the property |
| TYPE | Type of the property |
| OBJECTTYPE | Object type containing the property |
| ATTRIBUTE | Name of the attribute of the object containing data of the property |
Definition at line 91 of file ui_behaviour.h.
Referenced by UI_RegisterAbstractNode(), UI_RegisterImageNode(), UI_RegisterRowsNode(), UI_RegisterTextureNode(), and UI_RegisterVScrollbarNode().
| #define UI_RegisterOveridedNodeProperty | ( | BEHAVIOUR, | |
| NAME ) |
Initialize a property which override an inherited property. It is yet only used for the documentation.
| BEHAVIOUR | behaviour Target behaviour |
| NAME | Name of the property |
Definition at line 117 of file ui_behaviour.h.
Referenced by UI_RegisterDataNode(), and UI_RegisterTextEntryNode().
Signature of a function to bind a node method.
Definition at line 67 of file ui_behaviour.h.
| void UI_AddBehaviourMethod | ( | uiBehaviour_t * | behaviour, |
| const char * | name, | ||
| LUA_METHOD | fcn ) |
Adds a lua based method to the list of available behaviour methods for calling.
| [in] | behaviour | The behaviour to extend. |
| [in] | name | The name of the new method to add |
| [in] | fcn | The lua based function reference. |
Definition at line 251 of file ui_behaviour.cpp.
References Com_Printf(), HASH_Insert(), HASH_NewTable(), name, uiBehaviour_t::name, and uiBehaviour_t::nodeMethods.
Referenced by uiNode_t_add_classmethod().
| bool UI_GetBehaviourMethod | ( | const uiBehaviour_t * | behaviour, |
| const char * | name, | ||
| LUA_METHOD & | fcn ) |
Finds the lua based method on this behaviour or its super.
| [in] | behaviour | The node behaviour 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 272 of file ui_behaviour.cpp.
References HASH_Get(), name, uiBehaviour_t::nodeMethods, and uiBehaviour_t::super.
Referenced by UI_GetNodeMethod(), UI_HasBehaviourMethod(), and UI_HasNodeMethod().
| const struct value_s * UI_GetPropertyFromBehaviour | ( | const uiBehaviour_t * | behaviour, |
| const char * | name ) |
Return a property from a node behaviour.
Return a property from a node behaviour.
| [in] | behaviour | Context behaviour |
| [in] | name | Property name we search |
Definition at line 100 of file ui_behaviour.cpp.
References uiBehaviour_t::localProperties, name, uiBehaviour_t::propertyCount, Q_strcasecmp, value_t::string, and uiBehaviour_t::super.
Referenced by uiFuncNode::onLoaded(), uiPanelNode::onPropertyChanged(), uiConFuncNode::onWindowClosed(), uiConFuncNode::onWindowOpened(), UI_GenInjectedString(), UI_GetPropertyOrLuaMethod(), UI_InitializeNodeBehaviour(), UI_ParseNodeBody(), UI_ParseNodeProperties(), and UI_Window_SetCloseButton().
| const value_t * UI_GetPropertyOrLuaMethod | ( | const uiNode_t * | node, |
| const char * | name, | ||
| value_t * | out ) |
Return a property or lua based method from a node, node behaviour or inherited behaviour.
Return a property or lua based method from a node, node behaviour or inherited behaviour.
| [in] | node | The node holding the method |
| [in] | name | Property name we search |
| [out] | out | A reference to a value_t structure wich is filled if a lua based method is available. Set to nullptr to onlys scan for properties and not for lua based methods. |
Definition at line 136 of file ui_behaviour.cpp.
References uiNode_t::behaviour, Mem_StrDup, name, value_t::ofs, value_t::size, value_t::string, value_t::type, UI_GetNodeMethod(), UI_GetPropertyFromBehaviour(), and V_UI_NODEMETHOD_LUA.
Referenced by UI_ReadNodePath().
| bool UI_HasBehaviourMethod | ( | uiBehaviour_t * | behaviour, |
| const char * | name ) |
Returns true if a node method of given name is available on this behaviour or its super.
| [in] | behaviour | The node behaviour to examine. |
| [in] | name | The name of the method to find |
Definition at line 292 of file ui_behaviour.cpp.
References name, and UI_GetBehaviourMethod().
| void UI_InitializeNodeBehaviour | ( | uiBehaviour_t * | behaviour | ) |
Initialize a node behaviour memory, after registration, and before using it.
| behaviour | Behaviour to initialize |
| behaviour | Behaviour to initialize |
<
<
Definition at line 160 of file ui_behaviour.cpp.
References Com_Error(), ERR_FATAL, uiBehaviour_t::extends, uiBehaviour_t::extraDataSize, i, uiBehaviour_t::isInitialized, uiBehaviour_t::localProperties, uiBehaviour_t::manager, Mem_Free, uiBehaviour_t::name, uiBehaviour_t::propertyCount, Q_strcasecmp, Q_streq, Q_strvalid, value_t::string, STRUCT_MEMORY_ALIGN, uiBehaviour_t::super, UI_AllocHunkMemory(), UI_GetNodeBehaviour(), UI_GetPropertyFromBehaviour(), UI_InitializeNodeBehaviour(), and V_UI_NODEMETHOD.
Referenced by UI_InitializeNodeBehaviour(), and UI_InitNodes().
| const struct value_s * UI_RegisterNodeMethod | ( | uiBehaviour_t * | behaviour, |
| const char * | name, | ||
| uiNodeMethod_t | function ) |
Register a node method to a behaviour.
| behaviour | Target behaviour |
| name | Name of the property |
| function | function to execute the node method |
Definition at line 88 of file ui_behaviour.cpp.
References name, UI_RegisterNodePropertyPosSize_(), and V_UI_NODEMETHOD.
Referenced by UI_RegisterAbstractNode(), UI_RegisterAbstractScrollableNode(), UI_RegisterCheckBoxNode(), UI_RegisterCvarFuncNode(), UI_RegisterEditorNode(), UI_RegisterGeoscapeNode(), UI_RegisterOptionTreeNode(), and UI_RegisterTextEntryNode().
| const struct value_s * UI_RegisterNodePropertyPosSize_ | ( | uiBehaviour_t * | behaviour, |
| const char * | name, | ||
| int | type, | ||
| size_t | pos, | ||
| size_t | size ) |
Register a property to a behaviour. It should not be used in the code.
| behaviour | Target behaviour |
| name | Name of the property |
| type | Type of the property |
| pos | position of the attribute (which store property memory) into the node structure |
| size | size of the attribute (which store property memory) into the node structure |
Definition at line 53 of file ui_behaviour.cpp.
References Com_Error(), ERR_FATAL, LOCAL_PROPERTY_SIZE, uiBehaviour_t::localProperties, Mem_PoolAllocTypeN, name, uiBehaviour_t::name, uiBehaviour_t::propertyCount, STRUCT_MEMORY_ALIGN, type, UI_AllocHunkMemory(), ui_sysPool, V_CVAR_OR_LONGSTRING, V_CVAR_OR_STRING, V_LONGSTRING, and V_STRING.
Referenced by UI_RegisterNodeMethod().