UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_node_linechart.cpp File Reference
Include dependency graph for ui_node_linechart.cpp:

Go to the source code of this file.

Data Structures

struct  line_t
 Structure describes a line. More...

Macros

#define EXTRADATA_TYPE   lineChartExtraData_t
#define EXTRADATA(node)

Functions

bool UI_ClearLineChart (uiNode_t *node)
 Clears all drawings froma lineChart.
bool UI_AddLineChartLine (uiNode_t *node, const char *id, bool visible, const vec4_t color, bool dots, int numPoints)
 Add a line to the chart.
bool UI_AddLineChartCoord (uiNode_t *node, const char *id, int x, int y)
 Add a data point to a line chart.
bool UI_ShowChartLine (uiNode_t *node, const char *id, bool visible)
 Shows/hides a chart line.
bool UI_ShowChartDots (uiNode_t *node, const char *id, bool visible)
 Shows/hides small dots at data points of a chart.
void UI_RegisterLineChartNode (uiBehaviour_t *behaviour)
 Registers lineChart node.

Macro Definition Documentation

◆ EXTRADATA

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

Definition at line 37 of file ui_node_linechart.cpp.

Referenced by UI_AddLineChartCoord(), UI_AddLineChartLine(), UI_ClearLineChart(), UI_ShowChartDots(), and UI_ShowChartLine().

◆ EXTRADATA_TYPE

#define EXTRADATA_TYPE   lineChartExtraData_t

Definition at line 36 of file ui_node_linechart.cpp.

Function Documentation

◆ UI_AddLineChartCoord()

bool UI_AddLineChartCoord ( uiNode_t * node,
const char * id,
int x,
int y )

Add a data point to a line chart.

Parameters
[in,out]nodeChart node to extend
[in]idLine ID to extend
[in]xHorizontal coordinate of the data point
[in]yVertical coordinate of the data point
Note
You cannot add more data points to a line than what was originally set

Definition at line 176 of file ui_node_linechart.cpp.

References Com_Printf(), EXTRADATA, LIST_Foreach, MAX_VAR, Q_strneq, Q_strnull(), and UI_GetPath().

Referenced by uiLineChartNode_t_add_point().

◆ UI_AddLineChartLine()

bool UI_AddLineChartLine ( uiNode_t * node,
const char * id,
bool visible,
const vec4_t color,
bool dots,
int numPoints )

Add a line to the chart.

Parameters
[in,out]nodeChart node to extend
[in]idName of the chart line to add
[in]visibleWhether the chart line be rendered
[in]colorRGBA Color of the chart line
[in]dotsWhether to draw little squares to the datapoints
[in]numPointsNumber of datapoints to allocate

Definition at line 133 of file ui_node_linechart.cpp.

References Com_Printf(), line_t::dots, EXTRADATA, line_t::id, line_t::lineColor, LIST_Add(), LIST_Foreach, MAX_VAR, line_t::maxPoints, Mem_PoolAllocTypeN, line_t::numPoints, line_t::pointList, Q_streq, Q_strncpyz(), Q_strnull(), ui_dynPool, UI_GetPath(), Vector4Copy, and line_t::visible.

Referenced by uiLineChartNode_t_add_line().

◆ UI_ClearLineChart()

bool UI_ClearLineChart ( uiNode_t * node)

Clears all drawings froma lineChart.

Parameters
nodeThe node to clear

Definition at line 109 of file ui_node_linechart.cpp.

References EXTRADATA, LIST_Delete(), LIST_Foreach, and Mem_Free.

Referenced by uiLineChartNode::deleteNode(), and uiLineChartNode_t_clear().

◆ UI_RegisterLineChartNode()

void UI_RegisterLineChartNode ( uiBehaviour_t * behaviour)

Registers lineChart node.

Parameters
[out]behaviourUI node behaviour structure

Definition at line 261 of file ui_node_linechart.cpp.

References EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_RegisterExtradataNodeProperty, UI_SWIG_TypeQuery(), V_BOOL, and V_COLOR.

◆ UI_ShowChartDots()

bool UI_ShowChartDots ( uiNode_t * node,
const char * id,
bool visible )

Shows/hides small dots at data points of a chart.

Parameters
[in,out]nodeChart node in which the line is
[in]idLine ID to alter
[in]visibleBoolean switch of the dot's visibility

Definition at line 236 of file ui_node_linechart.cpp.

References Com_Printf(), EXTRADATA, LIST_Foreach, MAX_VAR, Q_strneq, Q_strnull(), and UI_GetPath().

◆ UI_ShowChartLine()

bool UI_ShowChartLine ( uiNode_t * node,
const char * id,
bool visible )

Shows/hides a chart line.

Parameters
[in,out]nodeChart node in which the line is
[in]idLine ID to show/hide
[in]visibleBoolean switch of line's visibility (including dots)

Definition at line 209 of file ui_node_linechart.cpp.

References Com_Printf(), EXTRADATA, LIST_Foreach, MAX_VAR, Q_strneq, Q_strnull(), and UI_GetPath().