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

#include <ui_node_window.h>

Inherits uiLocatedNode.

Public Member Functions

void setFill (uiNode_t *node, bool value)
 
- 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 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 bool onScroll (uiNode_t *node, int deltaX, int deltaY)
 
virtual void onMouseMove (uiNode_t *node, int x, int y)
 
virtual void onMouseDown (uiNode_t *node, int x, int y, int button)
 
virtual void onMouseUp (uiNode_t *node, int x, int y, int button)
 
virtual bool onMouseLongPress (uiNode_t *node, int x, int y, int button)
 Send mouse event when a pressed mouse button is dragged. More...
 
virtual void onMouseEnter (uiNode_t *node)
 
virtual void onMouseLeave (uiNode_t *node)
 
virtual void onCapturedMouseMove (uiNode_t *node, int x, int y)
 
virtual void onCapturedMouseLost (uiNode_t *node)
 
virtual bool onStartDragging (uiNode_t *node, int startX, int startY, int currentX, int currentY, int button)
 Send mouse event when a pressed mouse button is dragged. More...
 
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 void getClientPosition (uiNode_t const *node, vec2_t position)
 
virtual int getCellWidth (uiNode_t *node)
 
virtual int getCellHeight (uiNode_t *node)
 
- Public Member Functions inherited from uiNode
virtual void initNodeDynamic (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 void onPropertyChanged (uiNode_t *node, const value_t *property)
 
virtual ~uiNode ()
 

Private Member Functions

void draw (uiNode_t *node) override
 
void initNode (uiNode_t *node) override
 
void deleteNode (uiNode_t *node) override
 Actions to do on deleting the node. More...
 
void doLayout (uiNode_t *node) override
 Call to update the node layout. This common code revalidates the node tree. More...
 
void onLoading (uiNode_t *node) override
 Called at the begin of the load from script. More...
 
void onLoaded (uiNode_t *node) override
 Called at the end of the load from script. More...
 
void onWindowOpened (uiNode_t *node, linkedList_t *params) override
 Called when we init the node on the screen. More...
 
void onWindowClosed (uiNode_t *node) override
 Called when we close the node on the screen. More...
 
void onWindowActivate (uiNode_t *node) override
 Called when a windows gets active again after some other window was popped from the stack. More...
 
void onSizeChanged (uiNode_t *node) override
 Callback stub. More...
 
void clone (uiNode_t const *source, uiNode_t *clone) override
 

Detailed Description

Definition at line 36 of file ui_node_window.h.

Member Function Documentation

void uiWindowNode::clone ( uiNode_t const *  source,
uiNode_t clone 
)
overrideprivatevirtual

call to initialize a cloned node

Reimplemented from uiNode.

Definition at line 395 of file ui_node_window.cpp.

References uiNode::clone(), EXTRADATA, and OBJZERO.

void uiWindowNode::deleteNode ( uiNode_t node)
overrideprivatevirtual

Actions to do on deleting the node.

Parameters
[in,out]nodePointer to the node to destroy

Reimplemented from uiNode.

Definition at line 179 of file ui_node_window.cpp.

References uiNode::deleteNode(), and UI_RemoveWindow().

void uiWindowNode::doLayout ( uiNode_t node)
overrideprivatevirtual

Call to update the node layout. This common code revalidates the node tree.

Called to update node layout

Todo:
check and fix here window outside the screen

Reimplemented from uiLocatedNode.

Definition at line 185 of file ui_node_window.cpp.

References uiNode_t::box, CONTROLS_PADDING, uiLocatedNode::doLayout(), EXTRADATA, int(), uiNode_t::invalidated, uiBox_t::pos, uiBox_t::size, UI_FindNode(), UI_StarLayout(), UI_WindowIsFullScreen(), viddef, viddef_t::virtualHeight, viddef_t::virtualWidth, WINDOW_CLOSE_BUTTON_NAME, and WINDOW_DRAG_BUTTON_NAME.

void uiWindowNode::initNode ( uiNode_t node)
overrideprivatevirtual

call to initialize the node structure and extradata structure

Reimplemented from uiNode.

Definition at line 167 of file ui_node_window.cpp.

References EXTRADATA, and uiNode::initNode().

void uiWindowNode::onLoaded ( uiNode_t node)
overrideprivatevirtual

Called at the end of the load from script.

Reimplemented from uiNode.

Definition at line 375 of file ui_node_window.cpp.

References EXTRADATA, UI_Invalidate(), UI_Window_FlagFullscreen(), UI_Window_SetCloseButton(), and UI_Window_SetDragButton().

void uiWindowNode::onLoading ( uiNode_t node)
overrideprivatevirtual

Called at the begin of the load from script.

Reimplemented from uiNode.

Definition at line 291 of file ui_node_window.cpp.

References uiNode_t::box, EXTRADATA, uiNode_t::font, uiNode_t::padding, uiBox_t::size, VID_NORM_HEIGHT, VID_NORM_WIDTH, viddef, viddef_t::virtualHeight, viddef_t::virtualWidth, and WINDOW_FONT_BIG.

void uiWindowNode::onSizeChanged ( uiNode_t node)
overrideprivatevirtual

Callback stub.

Called when the node size change

Reimplemented from uiLocatedNode.

Definition at line 277 of file ui_node_window.cpp.

References uiNode_t::box, EXTRADATA, uiNode::onWindowActivate(), uiBox_t::size, UI_Window_FlagFullscreen(), viddef, viddef_t::virtualHeight, and viddef_t::virtualWidth.

Referenced by setFill().

void uiWindowNode::onWindowActivate ( uiNode_t node)
overrideprivatevirtual

Called when a windows gets active again after some other window was popped from the stack.

Reimplemented from uiNode.

Definition at line 264 of file ui_node_window.cpp.

References EXTRADATA, uiNode::onWindowActivate(), UI_ExecuteEventActions(), and UI_ExecuteLuaEventScript().

void uiWindowNode::onWindowClosed ( uiNode_t node)
overrideprivatevirtual

Called when we close the node on the screen.

Reimplemented from uiNode.

Definition at line 248 of file ui_node_window.cpp.

References EXTRADATA, uiNode::onWindowClosed(), UI_ExecuteEventActions(), and UI_ExecuteLuaEventScript().

void uiWindowNode::onWindowOpened ( uiNode_t node,
linkedList_t params 
)
overrideprivatevirtual

Called when we init the node on the screen.

Reimplemented from uiNode.

Definition at line 230 of file ui_node_window.cpp.

References EXTRADATA, uiNode::onWindowOpened(), UI_ExecuteEventActionsEx(), UI_ExecuteLuaEventScript_ParamList(), and UI_Invalidate().

void uiWindowNode::setFill ( uiNode_t node,
bool  value 
)

Definition at line 469 of file ui_node_window.cpp.

References onSizeChanged(), and UI_EXTRADATA.


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