UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
uiPanelNode Class Reference

#include <ui_node_panel.h>

Inherits uiAbstractScrollableNode.

Private Member Functions

void draw (uiNode_t *node) override
 Handles Button draw. More...
 
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) More...
 
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) More...
 
void doLayout (uiNode_t *node) override
 Call to update the node layout. This common code revalidates the node tree. More...
 
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. More...
 
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. More...
 
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. More...
 
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 More...
 
bool scrollY (uiNode_t *node, int offset)
 Scroll the Y scroll with a relative position, and call event if need. More...
 
bool setScrollY (uiNode_t *node, int viewPos, int viewSize, int fullSize)
 Set the Y scroll to a position, and call event if need. More...
 
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. More...
 
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) More...
 
virtual ~uiNode ()
 

Detailed Description

Definition at line 29 of file ui_node_panel.h.

Member Function Documentation

void uiPanelNode::doLayout ( uiNode_t node)
overrideprivatevirtual
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().

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.

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().

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().

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().

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().

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().

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(), UI_GetPropertyFromBehaviour(), and UI_Invalidate().

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().

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().


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