UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_node_checkbox.cpp File Reference

The checkbox node is a three state widget. If the value is 0, checkbox is unchecked, if value is bigger than 0, the value is checked; but if the value is under 0, the checkbox display an "invalidate" status. More...

#include "../ui_nodes.h"
#include "../ui_parse.h"
#include "../ui_behaviour.h"
#include "../ui_main.h"
#include "../ui_actions.h"
#include "../ui_render.h"
#include "../ui_sound.h"
#include "../ui_sprite.h"
#include "../ui_lua.h"
#include "ui_node_checkbox.h"
#include "ui_node_abstractnode.h"
#include "ui_node_abstractvalue.h"
#include "../../../common/scripts_lua.h"

Go to the source code of this file.

Macros

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

Functions

static void UI_CheckBoxNodeCallActivate (uiNode_t *node, const uiCallContext_t *context)
 
void UI_CheckBox_SetBackgroundByName (uiNode_t *node, const char *name)
 
void UI_CheckBox_SetIconCheckedByName (uiNode_t *node, const char *name)
 
void UI_CheckBox_SetIconUncheckedByName (uiNode_t *node, const char *name)
 
void UI_CheckBox_Toggle (uiNode_t *node)
 
void UI_CheckBox_SetIconUnknownByName (uiNode_t *node, const char *name)
 
bool UI_CheckBox_ValueAsBoolean (uiNode_t *node)
 
int UI_CheckBox_ValueAsInteger (uiNode_t *node)
 
void UI_RegisterCheckBoxNode (uiBehaviour_t *behaviour)
 

Detailed Description

The checkbox node is a three state widget. If the value is 0, checkbox is unchecked, if value is bigger than 0, the value is checked; but if the value is under 0, the checkbox display an "invalidate" status.

checkbox check_item {
cvar "*cvar foobar"
pos "410 100"
}

Definition in file ui_node_checkbox.cpp.

Macro Definition Documentation

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

Definition at line 51 of file ui_node_checkbox.cpp.

Referenced by uiCheckBoxNode::draw().

#define EXTRADATA_TYPE   checkboxExtraData_t

Definition at line 50 of file ui_node_checkbox.cpp.

Referenced by UI_RegisterCheckBoxNode().

Function Documentation

void UI_CheckBox_SetBackgroundByName ( uiNode_t node,
const char *  name 
)

Definition at line 140 of file ui_node_checkbox.cpp.

References UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_background().

void UI_CheckBox_SetIconCheckedByName ( uiNode_t node,
const char *  name 
)

Definition at line 145 of file ui_node_checkbox.cpp.

References UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_iconchecked().

void UI_CheckBox_SetIconUncheckedByName ( uiNode_t node,
const char *  name 
)

Definition at line 150 of file ui_node_checkbox.cpp.

References UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_iconunchecked().

void UI_CheckBox_SetIconUnknownByName ( uiNode_t node,
const char *  name 
)

Definition at line 160 of file ui_node_checkbox.cpp.

References UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_iconunknown().

void UI_CheckBox_Toggle ( uiNode_t node)
bool UI_CheckBox_ValueAsBoolean ( uiNode_t node)
int UI_CheckBox_ValueAsInteger ( uiNode_t node)
static void UI_CheckBoxNodeCallActivate ( uiNode_t node,
const uiCallContext_t context 
)
static

Definition at line 108 of file ui_node_checkbox.cpp.

References UI_Node_Activate().

Referenced by UI_RegisterCheckBoxNode().

void UI_RegisterCheckBoxNode ( uiBehaviour_t behaviour)

Sprite used as an icon for checked state

Sprite used as an icon for unchecked state

Sprite used as an icon for indeterminate state

Sprite used as a background

Definition at line 175 of file ui_node_checkbox.cpp.

References uiBehaviour_t::extends, EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_CheckBoxNodeCallActivate(), UI_RegisterExtradataNodeProperty, UI_RegisterNodeMethod(), UI_SWIG_TypeQuery(), and V_UI_SPRITEREF.