UFO: Alien Invasion
Loading...
Searching...
No Matches
uiPanelNode Class Reference

#include <ui_node_panel.h>

Inheritance diagram for uiPanelNode:
Inheritance graph
Collaboration diagram for uiPanelNode:
Collaboration graph

Private Member Functions

void draw (uiNode_t *node) override
 Handles Button draw.
void onLoaded (uiNode_t *node) override
 Handled after the end of the load of the node from script (all data and/or child are set).
void onLoading (uiNode_t *node) override
 Handled after the end of the load of the node from script (all data and/or child are set).
void doLayout (uiNode_t *node) override
 Call to update the node layout. This common code revalidates the node tree.
void getClientPosition (uiNode_t const *node, vec2_t position) override
void onPropertyChanged (uiNode_t *node, const value_t *property) override
bool onScroll (uiNode_t *node, int deltaX, int deltaY) override
 Handle mouse wheel scrolling.
void onMouseUp (uiNode_t *node, int x, int y, int button) override
bool onMouseLongPress (uiNode_t *node, int x, int y, int button) override
 Send mouse event when a pressed mouse button is dragged.
bool onStartDragging (uiNode_t *node, int startX, int startY, int currentX, int currentY, int button) override
 Send mouse event when a pressed mouse button is dragged.
void onCapturedMouseMove (uiNode_t *node, int x, int y) override

Additional Inherited Members

Public Member Functions inherited from uiAbstractScrollableNode
void initNode (uiNode_t *node) override
bool isSizeChange (uiNode_t *node)
 return true if the node size change and update the cache
bool scrollY (uiNode_t *node, int offset)
 Scroll the Y scroll with a relative position, and call event if need.
bool setScrollY (uiNode_t *node, int viewPos, int viewSize, int fullSize)
 Set the Y scroll to a position, and call event if need.
void pageUp (uiNode_t *node)
void pageDown (uiNode_t *node)
void moveUp (uiNode_t *node)
void moveDown (uiNode_t *node)
void moveHome (uiNode_t *node)
void moveEnd (uiNode_t *node)
Public Member Functions inherited from uiLocatedNode
virtual void drawTooltip (const uiNode_t *node, int x, int y) const
virtual void drawOverWindow (uiNode_t *node)
virtual void onSizeChanged (uiNode_t *node)
 Callback stub.
virtual void onLeftClick (uiNode_t *node, int x, int y)
virtual void onRightClick (uiNode_t *node, int x, int y)
virtual void onMiddleClick (uiNode_t *node, int x, int y)
virtual void onMouseMove (uiNode_t *node, int x, int y)
virtual void onMouseDown (uiNode_t *node, int x, int y, int button)
virtual void onMouseEnter (uiNode_t *node)
virtual void onMouseLeave (uiNode_t *node)
virtual void onCapturedMouseLost (uiNode_t *node)
virtual bool onDndEnter (uiNode_t *node)
virtual bool onDndMove (uiNode_t *node, int x, int y)
virtual void onDndLeave (uiNode_t *node)
virtual bool onDndDrop (uiNode_t *node, int x, int y)
virtual bool onDndFinished (uiNode_t *node, bool isDropped)
virtual void onFocusGained (uiNode_t *node)
virtual void onFocusLost (uiNode_t *node)
virtual bool onKeyPressed (uiNode_t *node, unsigned int key, unsigned short unicode)
virtual bool onKeyReleased (uiNode_t *node, unsigned int key, unsigned short unicode)
virtual int getCellWidth (uiNode_t *node)
virtual int getCellHeight (uiNode_t *node)
Public Member Functions inherited from uiNode
virtual void clone (uiNode_t const *source, uiNode_t *clone)
virtual void initNodeDynamic (uiNode_t *node)
virtual void deleteNode (uiNode_t *node)
virtual void onWindowOpened (uiNode_t *node, linkedList_t *params)
virtual void onWindowClosed (uiNode_t *node)
virtual void onWindowActivate (uiNode_t *node)
virtual void onActivate (uiNode_t *node)
 Activate the node. Can be used without the mouse (ie. a button will execute onClick).
virtual ~uiNode ()

Detailed Description

Definition at line 29 of file ui_node_panel.h.

Member Function Documentation

◆ doLayout()

void uiPanelNode::doLayout ( uiNode_t * node)
overrideprivatevirtual

◆ draw()

void uiPanelNode::draw ( uiNode_t * node)
overrideprivatevirtual

Handles Button draw.

Reimplemented from uiLocatedNode.

Definition at line 54 of file ui_node_panel.cpp.

References uiNode_t::box, EXTRADATA, uiBox_t::size, SPRITE_STATUS_NORMAL, UI_DrawSpriteInBox(), and UI_GetNodeAbsPos().

◆ getClientPosition()

void uiPanelNode::getClientPosition ( uiNode_t const * node,
vec2_t position )
overrideprivatevirtual

Return the position of the client zone into the node

Reimplemented from uiLocatedNode.

Definition at line 536 of file ui_node_panel.cpp.

References EXTRADATACONST.

◆ onCapturedMouseMove()

void uiPanelNode::onCapturedMouseMove ( uiNode_t * node,
int x,
int y )
overrideprivatevirtual

Mouse move event in the node when captured

Todo
do it as well for x

Reimplemented from uiLocatedNode.

Definition at line 517 of file ui_node_panel.cpp.

References mouseScrollX, mouseScrollY, and uiAbstractScrollableNode::scrollY().

◆ onLoaded()

void uiPanelNode::onLoaded ( uiNode_t * node)
overrideprivatevirtual

Handled after the end of the load of the node from script (all data and/or child are set).

Reimplemented from uiNode.

Definition at line 530 of file ui_node_panel.cpp.

References EXTRADATA, LAYOUT_NONE, and UI_Invalidate().

◆ onLoading()

void uiPanelNode::onLoading ( uiNode_t * node)
overrideprivatevirtual

Handled after the end of the load of the node from script (all data and/or child are set).

Reimplemented from uiNode.

Definition at line 483 of file ui_node_panel.cpp.

References EXTRADATA, and uiNode::onLoading().

◆ onMouseLongPress()

bool uiPanelNode::onMouseLongPress ( uiNode_t * node,
int x,
int y,
int button )
overrideprivatevirtual

Send mouse event when a pressed mouse button is dragged.

Returns
True if the event is used

Reimplemented from uiLocatedNode.

Definition at line 493 of file ui_node_panel.cpp.

References EXTRADATA, K_MOUSE1, mouseScrollX, mouseScrollY, UI_GetMouseCapture(), and UI_SetMouseCapture().

Referenced by onStartDragging().

◆ onMouseUp()

void uiPanelNode::onMouseUp ( uiNode_t * node,
int x,
int y,
int button )
overrideprivatevirtual

Mouse button up event in the node

Reimplemented from uiLocatedNode.

Definition at line 511 of file ui_node_panel.cpp.

References UI_GetMouseCapture(), and UI_MouseRelease().

◆ onPropertyChanged()

void uiPanelNode::onPropertyChanged ( uiNode_t * node,
const value_t * property )
overrideprivatevirtual

Called when a property change

Todo
move it to registration code when it is possible

Reimplemented from uiNode.

Definition at line 542 of file ui_node_panel.cpp.

References uiNode_t::behaviour, uiNode::onPropertyChanged(), propertyLayoutColumns, propertyLayoutMargin, propertyPadding, UI_GetPropertyFromBehaviour(), and UI_Invalidate().

◆ onScroll()

bool uiPanelNode::onScroll ( uiNode_t * node,
int deltaX,
int deltaY )
overrideprivatevirtual

Handle mouse wheel scrolling.

Parameters
[in,out]nodeUI node to scroll
[in]deltaXhorizontal scrolling value (not used)
[in]deltaYvertical scrolling value

Reimplemented from uiLocatedNode.

Definition at line 562 of file ui_node_panel.cpp.

References EXTRADATA, uiNode_t::onWheel, uiNode_t::onWheelDown, uiNode_t::onWheelUp, UI_ExecuteEventActions(), and UI_ExecuteLuaEventScript().

◆ onStartDragging()

bool uiPanelNode::onStartDragging ( uiNode_t * node,
int startX,
int startY,
int currentX,
int currentY,
int button )
overrideprivatevirtual

Send mouse event when a pressed mouse button is dragged.

Returns
True if the event is used

Reimplemented from uiLocatedNode.

Definition at line 506 of file ui_node_panel.cpp.

References onMouseLongPress(), startX, and startY.


The documentation for this class was generated from the following files: