UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_node_abstractoption.cpp File Reference
#include "../ui_main.h"
#include "../ui_internal.h"
#include "../ui_parse.h"
#include "../ui_draw.h"
#include "../ui_data.h"
#include "../ui_lua.h"
#include "ui_node_abstractoption.h"
#include "ui_node_abstractnode.h"
#include "../../../common/scripts_lua.h"

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   abstractOptionExtraData_t
 
#define EXTRADATA(node)   UI_EXTRADATA(node, EXTRADATA_TYPE)
 

Functions

void UI_AbstractOption_SortOptions (uiNode_t *node)
 Sort options by alphabet. More...
 
const char * UI_AbstractOption_GetCurrentValue (uiNode_t *node)
 
void UI_AbstractOption_SetCurrentValue (uiNode_t *node, const char *value)
 
uiNode_tUI_AbstractOption_GetFirstOption (uiNode_t *node)
 Return the first option of the node. More...
 
int UI_AbstractOption_GetDataId (uiNode_t *node)
 
int UI_AbstractOption_GetCount (uiNode_t *node)
 
const char * UI_AbstractOption_GetCvar (uiNode_t *node)
 
void UI_AbstractOption_SetDataId (uiNode_t *node, int id)
 
void UI_AbstractOption_SetDataIdByName (uiNode_t *node, const char *name)
 
void UI_AbstractOption_SetCvar (uiNode_t *node, const char *name)
 
void UI_AbstractOption_SetBackgroundByName (uiNode_t *node, const char *name)
 
int UI_AbstractOption_Scroll_Current (uiNode_t *node)
 
void UI_AbstractOption_Scroll_SetCurrent (uiNode_t *node, int pos)
 
void UI_AbstractOption_Scroll_SetViewSize (uiNode_t *node, int size)
 
void UI_AbstractOption_Scroll_SetFullSize (uiNode_t *node, int size)
 
int UI_AbstractOption_Scroll_ViewSize (uiNode_t *node)
 
int UI_AbstractOption_Scroll_FullSize (uiNode_t *node)
 
void UI_RegisterAbstractOptionNode (uiBehaviour_t *behaviour)
 

Detailed Description

Todo:
manage disabled option

Definition in file ui_node_abstractoption.cpp.

Macro Definition Documentation

#define EXTRADATA_TYPE   abstractOptionExtraData_t

Definition at line 38 of file ui_node_abstractoption.cpp.

Referenced by UI_RegisterAbstractOptionNode().

Function Documentation

int UI_AbstractOption_GetCount ( uiNode_t node)

Definition at line 160 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_count().

const char* UI_AbstractOption_GetCvar ( uiNode_t node)

Definition at line 164 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_cvar().

int UI_AbstractOption_GetDataId ( uiNode_t node)

Definition at line 156 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_dataid().

int UI_AbstractOption_Scroll_Current ( uiNode_t node)

Definition at line 186 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_current().

int UI_AbstractOption_Scroll_FullSize ( uiNode_t node)

Definition at line 206 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_fullsize().

void UI_AbstractOption_Scroll_SetCurrent ( uiNode_t node,
int  pos 
)

Definition at line 190 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_set_current().

void UI_AbstractOption_Scroll_SetFullSize ( uiNode_t node,
int  size 
)

Definition at line 198 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_set_fullsize().

void UI_AbstractOption_Scroll_SetViewSize ( uiNode_t node,
int  size 
)

Definition at line 194 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_set_viewsize().

int UI_AbstractOption_Scroll_ViewSize ( uiNode_t node)

Definition at line 202 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_viewsize().

void UI_AbstractOption_SetBackgroundByName ( uiNode_t node,
const char *  name 
)
void UI_AbstractOption_SetCvar ( uiNode_t node,
const char *  name 
)

Definition at line 176 of file ui_node_abstractoption.cpp.

References Cvar_Get(), EXTRADATA, and cvar_s::name.

Referenced by uiAbstractOptionNode_t_set_cvar().

void UI_AbstractOption_SetDataId ( uiNode_t node,
int  id 
)

Definition at line 168 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_set_dataid().

void UI_AbstractOption_SetDataIdByName ( uiNode_t node,
const char *  name 
)

Definition at line 172 of file ui_node_abstractoption.cpp.

References EXTRADATA, and UI_GetDataIDByName().

void UI_AbstractOption_SortOptions ( uiNode_t node)

Sort options by alphabet.

update lastChild

Todo:
the sort option should do it itself

Definition at line 44 of file ui_node_abstractoption.cpp.

References uiNode_t::firstChild, uiNode_t::lastChild, uiNode_t::next, UI_Node_IsOptionContainer(), and UI_SortOptions().

void UI_RegisterAbstractOptionNode ( uiBehaviour_t behaviour)

Optional. Data ID we want to use. It must be an option list. It substitute to the inline options

Optional. We can define the height of the block containing an option.

Definition at line 211 of file ui_node_abstractoption.cpp.

References count, uiBehaviour_t::drawItselfChild, EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::isAbstract, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_RegisterExtradataNodeProperty, UI_SWIG_TypeQuery(), V_INT, V_UI_ACTION, V_UI_CVAR, and V_UI_DATAID.