#include "../ui_main.h"
#include "../ui_parse.h"
#include "../ui_font.h"
#include "../ui_render.h"
#include "../ui_actions.h"
#include "ui_node_abstractnode.h"
#include "ui_node_abstractscrollable.h"
#include "../../client.h"
Go to the source code of this file.
Defines | |
#define | EXTRADATA_TYPE abstractScrollableExtraData_t |
#define | EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE) |
Functions | |
qboolean | UI_AbstractScrollableNodeIsSizeChange (uiNode_t *node) |
return true if the node size change and update the cache | |
qboolean | UI_SetScroll (uiScroll_t *scroll, int viewPos, int viewSize, int fullSize) |
Set the scroll to a position. | |
qboolean | UI_AbstractScrollableNodeSetY (uiNode_t *node, int viewPos, int viewSize, int fullSize) |
Set the Y scroll to a position, and call event if need. | |
static void | UI_AbstractScrollableNodePageUp (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_AbstractScrollableNodePageDown (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_AbstractScrollableNodeMoveUp (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_AbstractScrollableNodeMoveDown (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_AbstractScrollableNodeMoveHome (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_AbstractScrollableNodeMoveEnd (uiNode_t *node, const uiCallContext_t *context) |
qboolean | UI_AbstractScrollableNodeScrollY (uiNode_t *node, int offset) |
Scroll the Y scroll with a relative position, and call event if need. | |
void | UI_RegisterAbstractScrollableNode (uiBehaviour_t *behaviour) |
Variables | |
static const value_t | properties [] |
Definition in file ui_node_abstractscrollable.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, EXTRADATA_TYPE) |
Definition at line 37 of file ui_node_abstractscrollable.c.
#define EXTRADATA_TYPE abstractScrollableExtraData_t |
Definition at line 36 of file ui_node_abstractscrollable.c.
return true if the node size change and update the cache
Definition at line 42 of file ui_node_abstractscrollable.c.
References EXTRADATA, qfalse, qtrue, uiNode_s::size, and UI_NodeInstanceOf().
Referenced by UI_MaterialEditorNodeDraw(), UI_MessageListNodeDraw(), UI_TextLineNodeDrawText(), and UI_TextNodeDrawText().
static void UI_AbstractScrollableNodeMoveDown | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 144 of file ui_node_abstractscrollable.c.
References EXTRADATA, and UI_AbstractScrollableNodeSetY().
static void UI_AbstractScrollableNodeMoveEnd | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 155 of file ui_node_abstractscrollable.c.
References EXTRADATA, and UI_AbstractScrollableNodeSetY().
static void UI_AbstractScrollableNodeMoveHome | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 148 of file ui_node_abstractscrollable.c.
References UI_AbstractScrollableNodeSetY().
static void UI_AbstractScrollableNodeMoveUp | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 140 of file ui_node_abstractscrollable.c.
References EXTRADATA, and UI_AbstractScrollableNodeSetY().
static void UI_AbstractScrollableNodePageDown | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 136 of file ui_node_abstractscrollable.c.
References EXTRADATA, and UI_AbstractScrollableNodeSetY().
static void UI_AbstractScrollableNodePageUp | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 131 of file ui_node_abstractscrollable.c.
References EXTRADATA, pos, and UI_AbstractScrollableNodeSetY().
Scroll the Y scroll with a relative position, and call event if need.
Definition at line 163 of file ui_node_abstractscrollable.c.
References EXTRADATA, UI_AbstractScrollableNodeSetY(), and UI_NodeInstanceOf().
Referenced by UI_MaterialEditorNodeWheel(), UI_MessageListNodeMouseWheel(), UI_TextListNodeMouseWheel(), and UI_TextNodeMouseWheel().
Set the Y scroll to a position, and call event if need.
[in] | node | Context node |
[in] | viewPos | New position to set, else -1 if no change |
[in] | viewSize | New view size to set, else -1 if no change |
[in] | fullSize | New full size to set, else -1 if no change |
Definition at line 115 of file ui_node_abstractscrollable.c.
References EXTRADATA, UI_ExecuteEventActions(), UI_NodeInstanceOf(), and UI_SetScroll().
Referenced by UI_AbstractScrollableNodeMoveDown(), UI_AbstractScrollableNodeMoveEnd(), UI_AbstractScrollableNodeMoveHome(), UI_AbstractScrollableNodeMoveUp(), UI_AbstractScrollableNodePageDown(), UI_AbstractScrollableNodePageUp(), UI_AbstractScrollableNodeScrollY(), UI_MaterialEditorNodeUpdateView(), UI_MessageListNodeDraw(), UI_TextLineNodeDrawText(), and UI_TextNodeDrawText().
void UI_RegisterAbstractScrollableNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 195 of file ui_node_abstractscrollable.c.
References EXTRADATA_TYPE, uiBehaviour_s::extraDataSize, uiBehaviour_s::isAbstract, uiBehaviour_s::name, uiBehaviour_s::properties, and qtrue.
qboolean UI_SetScroll | ( | uiScroll_t * | scroll, | |
int | viewPos, | |||
int | viewSize, | |||
int | fullSize | |||
) |
Set the scroll to a position.
[in] | scroll | scroll to edit |
[in] | viewPos | New position to set, else -1 if no change |
[in] | viewSize | New view size to set, else -1 if no change |
[in] | fullSize | New full size to set, else -1 if no change |
Definition at line 64 of file ui_node_abstractscrollable.c.
References uiScroll_t::fullSize, qfalse, qtrue, uiScroll_t::viewPos, and uiScroll_t::viewSize.
Referenced by UI_AbstractScrollableNodeSetY(), UI_ClientLayout(), UI_ColumnLayout(), UI_OptionListNodeMouseWheel(), UI_OptionListNodeUpdateScroll(), UI_OptionTreeNodeMouseWheel(), UI_OptionTreeNodeUpdateScroll(), and UI_OptionTreeSetSelectedValue().
const value_t properties[] [static] |
{ {"viewpos", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, scrollY.viewPos), MEMBER_SIZEOF(EXTRADATA_TYPE, scrollY.viewPos)}, {"viewsize", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, scrollY.viewSize), MEMBER_SIZEOF(EXTRADATA_TYPE, scrollY.viewSize)}, {"fullsize", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, scrollY.fullSize), MEMBER_SIZEOF(EXTRADATA_TYPE, scrollY.fullSize)}, {"onviewchange", V_UI_ACTION, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, onViewChange), MEMBER_SIZEOF(EXTRADATA_TYPE, onViewChange)}, {"pageup", V_UI_NODEMETHOD, ((size_t) UI_AbstractScrollableNodePageUp), 0}, {"pagedown", V_UI_NODEMETHOD, ((size_t) UI_AbstractScrollableNodePageDown), 0}, {"moveup", V_UI_NODEMETHOD, ((size_t) UI_AbstractScrollableNodeMoveUp), 0}, {"movedown", V_UI_NODEMETHOD, ((size_t) UI_AbstractScrollableNodeMoveDown), 0}, {"movehome", V_UI_NODEMETHOD, ((size_t) UI_AbstractScrollableNodeMoveHome), 0}, {"moveend", V_UI_NODEMETHOD, ((size_t) UI_AbstractScrollableNodeMoveEnd), 0}, {NULL, V_NULL, 0, 0} }
Definition at line 169 of file ui_node_abstractscrollable.c.