ui_node_checkbox.c 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_main.h"
#include "../ui_actions.h"
#include "../ui_render.h"
#include "ui_node_checkbox.h"
#include "ui_node_abstractnode.h"
#include "ui_node_abstractvalue.h"
Include dependency graph for ui_node_checkbox.c:

Go to the source code of this file.

Defines

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

Functions

static void UI_CheckBoxNodeDraw (uiNode_t *node)
static void UI_CheckBoxNodeActivate (uiNode_t *node)
 Activate the node. Can be used without the mouse (ie. a button will execute onClick).
static void UI_CheckBoxNodeCallActivate (uiNode_t *node, const uiCallContext_t *context)
static void UI_CheckBoxNodeClick (uiNode_t *node, int x, int y)
 Handles checkboxes clicks.
static void UI_CheckBoxNodeLoading (uiNode_t *node)
 Handled before the begin of the load of the node from the script.
void UI_RegisterCheckBoxNode (uiBehaviour_t *behaviour)

Variables

static const value_t properties []

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 mn_serverday"
   pos  "410 100"
 }

Definition in file ui_node_checkbox.c.


Define Documentation

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

Definition at line 43 of file ui_node_checkbox.c.


Function Documentation

static void UI_CheckBoxNodeActivate ( uiNode_t node  )  [static]

Activate the node. Can be used without the mouse (ie. a button will execute onClick).

Definition at line 82 of file ui_node_checkbox.c.

References uiNode_s::disabled, EXTRADATA, uiNode_s::onChange, UI_ExecuteEventActions(), UI_GetReferenceFloat(), and UI_SetCvar().

Referenced by UI_CheckBoxNodeCallActivate(), UI_CheckBoxNodeClick(), and UI_RegisterCheckBoxNode().

static void UI_CheckBoxNodeCallActivate ( uiNode_t node,
const uiCallContext_t context 
) [static]

Definition at line 109 of file ui_node_checkbox.c.

References UI_CheckBoxNodeActivate().

static void UI_CheckBoxNodeClick ( uiNode_t node,
int  x,
int  y 
) [static]

Handles checkboxes clicks.

Definition at line 117 of file ui_node_checkbox.c.

References uiNode_s::onClick, UI_CheckBoxNodeActivate(), and UI_ExecuteEventActions().

Referenced by UI_RegisterCheckBoxNode().

static void UI_CheckBoxNodeDraw ( uiNode_t node  )  [static]
static void UI_CheckBoxNodeLoading ( uiNode_t node  )  [static]

Handled before the begin of the load of the node from the script.

Definition at line 128 of file ui_node_checkbox.c.

Referenced by UI_RegisterCheckBoxNode().

void UI_RegisterCheckBoxNode ( uiBehaviour_t behaviour  ) 

Variable Documentation

const value_t properties[] [static]
Initial value:
 {
    

    
    {"toggle", V_UI_NODEMETHOD, ((size_t) UI_CheckBoxNodeCallActivate), 0},
    {NULL, V_NULL, 0, 0}
}

Definition at line 132 of file ui_node_checkbox.c.


Generated by  doxygen 1.6.2