UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_node_abstractoption.h
Go to the documentation of this file.
1
4
5/*
6Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8This program is free software; you can redistribute it and/or
9modify it under the terms of the GNU General Public License
10as published by the Free Software Foundation; either version 2
11of the License, or (at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17See the GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23*/
24
25#pragma once
26
29
30struct uiAction_s;
31
33public:
35 void initNode(uiNode_t* node) override;
36
37 void doLayout(uiNode_t* node) override;
38 int getCellWidth(uiNode_t* node) override;
39 int getCellHeight(uiNode_t* node) override;
40};
41
42typedef struct {
43 /* link to shared data (can be used if internal data is null) */
44 int dataId;
46 const char* cvar;
47
48 /* information */
49 int count;
51
53
54 struct uiAction_s* onViewChange;
56
60
61struct uiBehaviour_t;
62
65
68void UI_AbstractOption_SetCurrentValue(uiNode_t* node, const char* value);
69
72const char* UI_AbstractOption_GetCvar (uiNode_t* node);
73
74void UI_AbstractOption_SetDataId (uiNode_t* node, int id);
75void UI_AbstractOption_SetDataIdByName (uiNode_t* node, const char* name);
76void UI_AbstractOption_SetCvar (uiNode_t* node, const char* name);
78
int getCellHeight(uiNode_t *node) override
Return size of the cell, which is the size (in virtual "pixel") which represents 1 in the scroll valu...
void doLayout(uiNode_t *node) override
Call to update the node layout. This common code revalidates the node tree.
void initNode(uiNode_t *node) override
int getCellWidth(uiNode_t *node) override
Return size of the cell, which is the size (in virtual "pixel") which represents 1 in the scroll valu...
voidpf void uLong size
Definition ioapi.h:42
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition r_gl.h:110
int LUA_EVENT
holds a reference to a lua event handler
Definition scripts_lua.h:49
node behaviour, how a node work
Atomic structure used to define most of the UI.
Definition ui_nodes.h:80
Scroll representation.
void UI_AbstractOption_Scroll_SetCurrent(uiNode_t *node, int pos)
int UI_AbstractOption_GetCount(uiNode_t *node)
int UI_AbstractOption_Scroll_ViewSize(uiNode_t *node)
uiNode_t * UI_AbstractOption_GetFirstOption(uiNode_t *node)
Return the first option of the node.
const char * UI_AbstractOption_GetCurrentValue(uiNode_t *node)
int UI_AbstractOption_GetDataId(uiNode_t *node)
void UI_AbstractOption_Scroll_SetViewSize(uiNode_t *node, int size)
void UI_AbstractOption_SetCvar(uiNode_t *node, const char *name)
int UI_AbstractOption_Scroll_Current(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_Scroll_SetFullSize(uiNode_t *node, int size)
void UI_AbstractOption_SetBackgroundByName(uiNode_t *node, const char *name)
const char * UI_AbstractOption_GetCvar(uiNode_t *node)
void UI_RegisterAbstractOptionNode(uiBehaviour_t *behaviour)
void UI_AbstractOption_SetCurrentValue(uiNode_t *node, const char *value)
void UI_AbstractOption_SortOptions(uiNode_t *node)
Sort options by alphabet.
int UI_AbstractOption_Scroll_FullSize(uiNode_t *node)
base code for scrollable node