UFO: Alien Invasion
Loading...
Searching...
No Matches
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"
Include dependency graph for ui_node_abstractoption.cpp:

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   abstractOptionExtraData_t
#define EXTRADATA(node)

Functions

void UI_AbstractOption_SortOptions (uiNode_t *node)
 Sort options by alphabet.
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.
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

◆ EXTRADATA

#define EXTRADATA ( node)
Value:
#define EXTRADATA_TYPE
#define UI_EXTRADATA(NODE, TYPE)
Definition ui_nodes.h:185

Definition at line 39 of file ui_node_abstractoption.cpp.

Referenced by uiAbstractValueNode::clone(), uiModelNode::clone(), uiWindowNode::clone(), uiAbstractValueNode::decValue(), uiAbstractValueNode::deleteNode(), uiLineChartNode::deleteNode(), uiModelNode::deleteNode(), uiAbstractOptionNode::doLayout(), uiModelNode::doLayout(), uiOptionNode::doLayout(), uiPanelNode::doLayout(), uiTextNode::doLayout(), uiWindowNode::doLayout(), uiBarNode::draw(), uiBaseInventoryNode::draw(), uiBaseLayoutNode::draw(), uiButtonNode::draw(), uiCheckBoxNode::draw(), uiContainerNode::draw(), uiImageNode::draw(), uiItemNode::draw(), uiLineChartNode::draw(), uiMaterialEditorNode::draw(), uiMessageListNode::draw(), uiModelNode::draw(), uiOptionListNode::draw(), uiOptionTreeNode::draw(), uiPanelNode::draw(), uiRadioButtonNode::draw(), uiRowsNode::draw(), uiSequenceNode::draw(), uiSpinnerNode::draw(), uiStringNode::draw(), uiTabNode::draw(), uiTBarNode::draw(), uiText2Node::draw(), uiTextEntryNode::draw(), uiTextListNode::draw(), uiTextNode::draw(), uiTimerNode::draw(), uiVideoNode::draw(), uiVScrollbarNode::draw(), uiWindowNode::draw(), uiSelectBoxNode::drawOverWindow(), uiVideoNode::drawOverWindow(), uiText2Node::drawText(), uiTextListNode::drawText(), uiTextNode::drawText(), uiOptionListNode::getCellHeight(), uiOptionTreeNode::getCellHeight(), uiTextNode::getCellHeight(), uiAbstractValueNode::getShiftIncreaseFactor(), uiAbstractValueNode::incValue(), uiAbstractOptionNode::initNode(), uiAbstractScrollableNode::initNode(), uiBaseInventoryNode::initNode(), uiContainerNode::initNode(), uiSequenceNode::initNode(), uiVideoNode::initNode(), uiWindowNode::initNode(), uiModelNode::initNodeDynamic(), uiSpinnerNode::isPositionIncrease(), uiAbstractScrollableNode::isSizeChange(), uiAbstractScrollableNode::moveDown(), uiAbstractScrollableNode::moveEnd(), uiAbstractScrollableNode::moveUp(), uiRadioButtonNode::onActivate(), uiBarNode::onCapturedMouseMove(), uiModelNode::onCapturedMouseMove(), uiOptionListNode::onCapturedMouseMove(), uiOptionTreeNode::onCapturedMouseMove(), uiSelectBoxNode::onCapturedMouseMove(), uiVScrollbarNode::onCapturedMouseMove(), uiBaseInventoryNode::onDndEnter(), uiContainerNode::onDndEnter(), uiContainerNode::onDndMove(), uiTextEntryNode::onFocusGained(), uiTextEntryNode::onFocusLost(), uiTextEntryNode::onKeyPressed(), uiSelectBoxNode::onLeftClick(), uiSequenceNode::onLeftClick(), uiText2Node::onLeftClick(), uiTextListNode::onLeftClick(), uiTextNode::onLeftClick(), uiAbstractValueNode::onLoaded(), uiBaseInventoryNode::onLoaded(), uiContainerNode::onLoaded(), uiImageNode::onLoaded(), uiPanelNode::onLoaded(), uiRowsNode::onLoaded(), uiText2Node::onLoaded(), uiWindowNode::onLoaded(), uiAbstractValueNode::onLoading(), uiBarNode::onLoading(), uiBaseInventoryNode::onLoading(), uiBaseLayoutNode::onLoading(), uiContainerNode::onLoading(), uiGeoscapeNode::onLoading(), uiModelNode::onLoading(), uiOptionListNode::onLoading(), uiOptionTreeNode::onLoading(), uiPanelNode::onLoading(), uiStringNode::onLoading(), uiText2Node::onLoading(), uiTextListNode::onLoading(), uiTextNode::onLoading(), uiWindowNode::onLoading(), uiZoneNode::onLoading(), uiBarNode::onMouseDown(), uiBaseInventoryNode::onMouseDown(), uiContainerNode::onMouseDown(), uiMessageListNode::onMouseDown(), uiModelNode::onMouseDown(), uiOptionListNode::onMouseDown(), uiOptionTreeNode::onMouseDown(), uiSpinnerNode::onMouseDown(), uiTextNode::onMouseDown(), uiVScrollbarNode::onMouseDown(), uiZoneNode::onMouseDown(), uiPanelNode::onMouseLongPress(), uiText2Node::onMouseMove(), uiTextListNode::onMouseMove(), uiTextNode::onMouseMove(), uiVScrollbarNode::onMouseUp(), uiZoneNode::onMouseUp(), uiSequenceNode::onPropertyChanged(), uiText2Node::onRightClick(), uiTextListNode::onRightClick(), uiTextNode::onRightClick(), uiBaseInventoryNode::onScroll(), uiOptionListNode::onScroll(), uiOptionTreeNode::onScroll(), uiPanelNode::onScroll(), uiVScrollbarNode::onScroll(), uiWindowNode::onSizeChanged(), uiWindowNode::onWindowActivate(), uiSequenceNode::onWindowClosed(), uiVideoNode::onWindowClosed(), uiWindowNode::onWindowClosed(), uiSequenceNode::onWindowOpened(), uiTabNode::onWindowOpened(), uiTimerNode::onWindowOpened(), uiVideoNode::onWindowOpened(), uiWindowNode::onWindowOpened(), uiAbstractScrollableNode::pageDown(), uiAbstractScrollableNode::pageUp(), uiAbstractScrollableNode::scrollY(), uiAbstractValueNode::setDelta(), uiAbstractValueNode::setMax(), uiAbstractValueNode::setMin(), uiAbstractValueNode::setRange(), uiAbstractScrollableNode::setScrollY(), uiAbstractValueNode::setValue(), UI_AbstractOption_GetCount(), UI_AbstractOption_GetCurrentValue(), UI_AbstractOption_GetCvar(), UI_AbstractOption_GetDataId(), UI_AbstractOption_GetFirstOption(), UI_AbstractOption_Scroll_Current(), UI_AbstractOption_Scroll_FullSize(), UI_AbstractOption_Scroll_SetCurrent(), UI_AbstractOption_Scroll_SetFullSize(), UI_AbstractOption_Scroll_SetViewSize(), UI_AbstractOption_Scroll_ViewSize(), UI_AbstractOption_SetCurrentValue(), UI_AbstractOption_SetCvar(), UI_AbstractOption_SetDataId(), UI_AbstractOption_SetDataIdByName(), UI_BaseInventoryNodeDraw2(), UI_BaseInventoryNodeDrawItems(), UI_ContainerNodeDrawFreeSpace(), UI_DrawModelNode(), UI_TextScrollEnd(), uiText2Node::updateCache(), uiTextNode::updateCache(), and uiTextNode::validateCache().

◆ EXTRADATA_TYPE

Function Documentation

◆ UI_AbstractOption_GetCount()

int UI_AbstractOption_GetCount ( uiNode_t * node)

Definition at line 160 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_count().

◆ UI_AbstractOption_GetCurrentValue()

◆ UI_AbstractOption_GetCvar()

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().

◆ UI_AbstractOption_GetDataId()

int UI_AbstractOption_GetDataId ( uiNode_t * node)

Definition at line 156 of file ui_node_abstractoption.cpp.

References EXTRADATA.

Referenced by uiAbstractOptionNode_t_dataid().

◆ UI_AbstractOption_GetFirstOption()

◆ UI_AbstractOption_Scroll_Current()

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().

◆ UI_AbstractOption_Scroll_FullSize()

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().

◆ UI_AbstractOption_Scroll_SetCurrent()

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().

◆ UI_AbstractOption_Scroll_SetFullSize()

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().

◆ UI_AbstractOption_Scroll_SetViewSize()

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().

◆ UI_AbstractOption_Scroll_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().

◆ UI_AbstractOption_SetBackgroundByName()

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

◆ UI_AbstractOption_SetCurrentValue()

◆ UI_AbstractOption_SetCvar()

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

Definition at line 176 of file ui_node_abstractoption.cpp.

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

Referenced by uiAbstractOptionNode_t_set_cvar().

◆ UI_AbstractOption_SetDataId()

void UI_AbstractOption_SetDataId ( uiNode_t * node,
int id )

Definition at line 168 of file ui_node_abstractoption.cpp.

References EXTRADATA, and id.

Referenced by uiAbstractOptionNode_t_set_dataid().

◆ UI_AbstractOption_SetDataIdByName()

void UI_AbstractOption_SetDataIdByName ( uiNode_t * node,
const char * name )

Definition at line 172 of file ui_node_abstractoption.cpp.

References EXTRADATA, name, and UI_GetDataIDByName().

◆ UI_AbstractOption_SortOptions()

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().

◆ UI_RegisterAbstractOptionNode()

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.