ui_node_textlist.c File Reference

#include "../ui_main.h"
#include "../ui_internal.h"
#include "../ui_font.h"
#include "../ui_actions.h"
#include "../ui_parse.h"
#include "../ui_render.h"
#include "../ui_data.h"
#include "ui_node_text.h"
#include "ui_node_textlist.h"
#include "ui_node_abstractnode.h"
#include "../../client.h"
#include "../../../shared/parse.h"
Include dependency graph for ui_node_textlist.c:

Go to the source code of this file.

Defines

#define EXTRADATA(node)   UI_EXTRADATA(node, textExtraData_t)
#define EXTRADATACONST(node)   UI_EXTRADATACONST(node, textExtraData_t)

Functions

static int UI_TextListNodeGetLine (const uiNode_t *node, int x, int y)
 Get the line number under an absolute position.
static void UI_TextListNodeMouseMove (uiNode_t *node, int x, int y)
static void UI_TextLineNodeDrawText (uiNode_t *node, const linkedList_t *list)
 Handles line breaks and drawing for shared data text.
static void UI_TextListNodeDraw (uiNode_t *node)
 Draw a text node.
static void UI_TextListNodeClick (uiNode_t *node, int x, int y)
 Calls the script command for a text node that is clickable.
static void UI_TextListNodeRightClick (uiNode_t *node, int x, int y)
 Calls the script command for a text node that is clickable via right mouse button.
static void UI_TextListNodeMouseWheel (uiNode_t *node, qboolean down, int x, int y)
static void UI_TextListNodeLoading (uiNode_t *node)
void UI_RegisterTextListNode (uiBehaviour_t *behaviour)

Detailed Description

Definition in file ui_node_textlist.c.


Define Documentation

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

Definition at line 39 of file ui_node_textlist.c.

#define EXTRADATACONST ( node   )     UI_EXTRADATACONST(node, textExtraData_t)

Definition at line 40 of file ui_node_textlist.c.


Function Documentation

void UI_RegisterTextListNode ( uiBehaviour_t behaviour  ) 
static void UI_TextLineNodeDrawText ( uiNode_t node,
const linkedList_t list 
) [static]
static void UI_TextListNodeClick ( uiNode_t node,
int  x,
int  y 
) [static]

Calls the script command for a text node that is clickable.

See also:
UI_TextNodeRightClick

Definition at line 179 of file ui_node_textlist.c.

References EXTRADATA, uiNode_s::onChange, uiNode_s::onClick, UI_ExecuteEventActions(), and UI_TextListNodeGetLine().

Referenced by UI_RegisterTextListNode().

static void UI_TextListNodeDraw ( uiNode_t node  )  [static]
static int UI_TextListNodeGetLine ( const uiNode_t node,
int  x,
int  y 
) [static]

Get the line number under an absolute position.

Parameters:
[in] node a text node
[in] x position x on the screen
[in] y position y on the screen
Returns:
The line number under the position (0 = first line)

Definition at line 49 of file ui_node_textlist.c.

References EXTRADATACONST, uiNode_s::padding, UI_FontGetHeight(), UI_GetFontFromNode(), and UI_NodeAbsoluteToRelativePos().

Referenced by UI_TextListNodeClick(), UI_TextListNodeMouseMove(), and UI_TextListNodeRightClick().

static void UI_TextListNodeLoading ( uiNode_t node  )  [static]

< Invalid/no line selected per default.

< left center of each cells

Definition at line 230 of file ui_node_textlist.c.

References ALIGN_CL, uiNode_s::color, EXTRADATA, uiNode_s::selectedColor, uiNode_s::textalign, and Vector4Set.

Referenced by UI_RegisterTextListNode().

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

Definition at line 62 of file ui_node_textlist.c.

References EXTRADATA, and UI_TextListNodeGetLine().

Referenced by UI_RegisterTextListNode().

static void UI_TextListNodeMouseWheel ( uiNode_t node,
qboolean  down,
int  x,
int  y 
) [static]
static void UI_TextListNodeRightClick ( uiNode_t node,
int  x,
int  y 
) [static]

Calls the script command for a text node that is clickable via right mouse button.

Todo:
we should delete that function

Definition at line 200 of file ui_node_textlist.c.

References EXTRADATA, uiNode_s::onChange, uiNode_s::onRightClick, UI_ExecuteEventActions(), and UI_TextListNodeGetLine().

Referenced by UI_RegisterTextListNode().


Generated by  doxygen 1.6.2