UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_node_option.h File Reference
#include "../ui_nodes.h"
#include "ui_node_abstractnode.h"

Go to the source code of this file.

Data Structures

class  uiOptionNode
 
struct  optionExtraData_s
 Option definition. More...
 

Macros

#define OPTIONEXTRADATA_TYPE   optionExtraData_t
 
#define OPTIONEXTRADATA(node)   UI_EXTRADATA(node, OPTIONEXTRADATA_TYPE)
 
#define OPTIONEXTRADATACONST(node)   UI_EXTRADATACONST(node, OPTIONEXTRADATA_TYPE)
 

Typedefs

typedef struct optionExtraData_s optionExtraData_t
 Option definition. More...
 

Functions

void UI_RegisterOptionNode (uiBehaviour_t *behaviour)
 
int UI_OptionUpdateCache (uiNode_t *option)
 update option cache about child, according to collapse and visible status More...
 
uiNode_tUI_AllocOptionNode (const char *name, const char *label, const char *value)
 Initializes an option with a very little set of values. More...
 
void UI_Option_SetLabel (uiNode_t *node, const char *text)
 
void UI_Option_SetValue (uiNode_t *node, const char *text)
 
void UI_Option_SetIconByName (uiNode_t *node, const char *name)
 

Variables

const uiBehaviour_tui_optionBehaviour
 

Macro Definition Documentation

#define OPTIONEXTRADATA_TYPE   optionExtraData_t

Definition at line 39 of file ui_node_option.h.

#define OPTIONEXTRADATACONST (   node)    UI_EXTRADATACONST(node, OPTIONEXTRADATA_TYPE)

Definition at line 41 of file ui_node_option.h.

Referenced by MSO_UpdateVisibleButtons().

Typedef Documentation

Option definition.

Function Documentation

uiNode_t* UI_AllocOptionNode ( const char *  name,
const char *  label,
const char *  value 
)

Initializes an option with a very little set of values.

Parameters
[in]nameThe name of the new node
[in]labellabel displayed
[in]valuevalue used when this option is selected

Definition at line 126 of file ui_node_option.cpp.

References UI_AllocNode(), and UI_InitOption().

Referenced by UI_AddOption().

void UI_Option_SetIconByName ( uiNode_t node,
const char *  name 
)

Definition at line 142 of file ui_node_option.cpp.

References OPTIONEXTRADATA, and UI_GetSpriteByName().

Referenced by uiOptionNode_t_set_icon().

void UI_Option_SetLabel ( uiNode_t node,
const char *  text 
)

Definition at line 134 of file ui_node_option.cpp.

References OPTIONEXTRADATA, and Q_strncpyz().

Referenced by uiOptionNode_t_set_label().

void UI_Option_SetValue ( uiNode_t node,
const char *  text 
)

Definition at line 138 of file ui_node_option.cpp.

References OPTIONEXTRADATA, and Q_strncpyz().

Referenced by uiOptionNode_t_set_value().

int UI_OptionUpdateCache ( uiNode_t option)

update option cache about child, according to collapse and visible status

Note
can be a common function for all option node
Returns
number of visible elements

Definition at line 53 of file ui_node_option.cpp.

References uiNode_t::behaviour, count, uiNode_t::firstChild, uiNode_t::invis, uiNode_t::next, OPTIONEXTRADATA, and UI_OptionUpdateCache().

Referenced by UI_OptionTreeNodeUpdateCache(), and UI_OptionUpdateCache().

void UI_RegisterOptionNode ( uiBehaviour_t behaviour)

Variable Documentation