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

#include <ui_node_baseinventory.h>

Inheritance diagram for uiBaseInventoryNode:
Inheritance graph
Collaboration diagram for uiBaseInventoryNode:
Collaboration graph

Public Member Functions

void initNode (uiNode_t *node) override
void draw (uiNode_t *node) override
 Main function to draw a container node.
void drawTooltip (const uiNode_t *node, int x, int y) const override
 Custom tooltip for container node.
void onMouseDown (uiNode_t *node, int x, int y, int button) override
void onMouseUp (uiNode_t *node, int x, int y, int button) override
bool onScroll (uiNode_t *node, int deltaX, int deltaY) override
void onCapturedMouseMove (uiNode_t *node, int x, int y) override
void onWindowOpened (uiNode_t *node, linkedList_t *params) override
 Call when we open the window containing the node.
void onLoading (uiNode_t *node) override
void onLoaded (uiNode_t *node) override
 Calculates the size of a container node and links the container into the node (uses the invDef_t shape bitmask to determine the size).
bool onDndEnter (uiNode_t *node) override
 Call when a DND enter into the node.
bool onDndMove (uiNode_t *node, int x, int y) override
 Call into the target when the DND hover it.
void onDndLeave (uiNode_t *node) override
 Call when a DND enter into the node.
Public Member Functions inherited from uiContainerNode
void draw (uiNode_t *node) override
 Main function to draw a container node.
void drawTooltip (const uiNode_t *node, int x, int y) const override
 Custom tooltip for container node.
void initNode (uiNode_t *node) override
void onMouseDown (uiNode_t *node, int x, int y, int button) override
void onMouseUp (uiNode_t *node, int x, int y, int button) override
void onCapturedMouseMove (uiNode_t *node, int x, int y) override
void onLoading (uiNode_t *node) override
void onLoaded (uiNode_t *node) override
 Calculates the size of a container node and links the container into the node (uses the invDef_t shape bitmask to determine the size).
bool onDndEnter (uiNode_t *node) override
 Call when a DND enter into the node.
bool onDndMove (uiNode_t *node, int x, int y) override
 Call into the target when the DND hover it.
void onDndLeave (uiNode_t *node) override
 Call when a DND enter into the node.
bool onDndFinished (uiNode_t *node, bool isDroped) override
 Call into the source when the DND end.
Public Member Functions inherited from uiLocatedNode
virtual void drawOverWindow (uiNode_t *node)
virtual void doLayout (uiNode_t *node)
 Call to update the node layout. This common code revalidates the node tree.
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 bool onMouseLongPress (uiNode_t *node, int x, int y, int button)
 Send mouse event when a pressed mouse button is dragged.
virtual void onMouseEnter (uiNode_t *node)
virtual void onMouseLeave (uiNode_t *node)
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.
virtual bool onDndDrop (uiNode_t *node, int x, int y)
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 clone (uiNode_t const *source, uiNode_t *clone)
virtual void initNodeDynamic (uiNode_t *node)
virtual void deleteNode (uiNode_t *node)
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 void onPropertyChanged (uiNode_t *node, const value_t *property)
virtual ~uiNode ()

Detailed Description

Definition at line 30 of file ui_node_baseinventory.h.

Member Function Documentation

◆ draw()

void uiBaseInventoryNode::draw ( uiNode_t * node)
overridevirtual

Main function to draw a container node.

Reimplemented from uiLocatedNode.

Definition at line 451 of file ui_node_baseinventory.cpp.

References uiNode_t::color, Item::def(), DND_ITEM, EXTRADATA, UI_BaseInventoryNodeDraw2(), UI_DNDGetItem(), UI_DNDGetType(), UI_DNDIsDragging(), and ui_inventory.

◆ drawTooltip()

void uiBaseInventoryNode::drawTooltip ( const uiNode_t * node,
int x,
int y ) const
overridevirtual

Custom tooltip for container node.

Parameters
[in]nodeNode we request to draw tooltip
[in]x,yPosition of the mouse

Reimplemented from uiLocatedNode.

Definition at line 604 of file ui_node_baseinventory.cpp.

References Item::getX(), Item::getY(), MAX_VAR, Q_strcat(), UI_BaseInventoryNodeGetItem(), UI_DrawTooltip(), and UI_GetItemTooltip().

◆ initNode()

void uiBaseInventoryNode::initNode ( uiNode_t * node)
overridevirtual

call to initialize the node structure and extradata structure

Reimplemented from uiNode.

Definition at line 443 of file ui_node_baseinventory.cpp.

References EXTRADATA, and uiContainerNode::initNode().

◆ onCapturedMouseMove()

void uiBaseInventoryNode::onCapturedMouseMove ( uiNode_t * node,
int x,
int y )
overridevirtual

Mouse move event in the node when captured

Reimplemented from uiLocatedNode.

Definition at line 659 of file ui_node_baseinventory.cpp.

References dragInfoIC, oldMouseX, oldMouseY, UI_DNDDragItem(), and UI_MouseRelease().

◆ onDndEnter()

bool uiBaseInventoryNode::onDndEnter ( uiNode_t * node)
overridevirtual

Call when a DND enter into the node.

Reimplemented from uiLocatedNode.

Definition at line 739 of file ui_node_baseinventory.cpp.

References DND_ITEM, EXTRADATA, UI_DNDGetSourceNode(), and UI_DNDGetType().

◆ onDndLeave()

void uiBaseInventoryNode::onDndLeave ( uiNode_t * node)
overridevirtual

Call when a DND enter into the node.

Reimplemented from uiLocatedNode.

Definition at line 760 of file ui_node_baseinventory.cpp.

◆ onDndMove()

bool uiBaseInventoryNode::onDndMove ( uiNode_t * target,
int x,
int y )
overridevirtual

Call into the target when the DND hover it.

Returns
True if the DND is accepted

Reimplemented from uiLocatedNode.

Definition at line 752 of file ui_node_baseinventory.cpp.

◆ onLoaded()

void uiBaseInventoryNode::onLoaded ( uiNode_t * node)
overridevirtual

Calculates the size of a container node and links the container into the node (uses the invDef_t shape bitmask to determine the size).

Parameters
[in,out]nodeThe node to get the size for

Reimplemented from uiNode.

Definition at line 233 of file ui_node_baseinventory.cpp.

References EXTRADATA, and INVSH_GetInventoryDefinitionByID().

◆ onLoading()

void uiBaseInventoryNode::onLoading ( uiNode_t * node)
overridevirtual

Called before script initialization, initialized default values

Reimplemented from uiNode.

Definition at line 729 of file ui_node_baseinventory.cpp.

References uiNode_t::color, and EXTRADATA.

◆ onMouseDown()

void uiBaseInventoryNode::onMouseDown ( uiNode_t * node,
int x,
int y,
int button )
overridevirtual

◆ onMouseUp()

void uiBaseInventoryNode::onMouseUp ( uiNode_t * node,
int x,
int y,
int button )
overridevirtual

Mouse button up event in the node

Reimplemented from uiLocatedNode.

Definition at line 705 of file ui_node_baseinventory.cpp.

References K_MOUSE1, UI_DNDDrop(), UI_DNDIsDragging(), UI_GetMouseCapture(), and UI_MouseRelease().

◆ onScroll()

bool uiBaseInventoryNode::onScroll ( uiNode_t * node,
int deltaX,
int deltaY )
overridevirtual

Mouse wheel event in the node

Reimplemented from uiLocatedNode.

Definition at line 717 of file ui_node_baseinventory.cpp.

References EXTRADATA, and UI_BaseInventoryNodeUpdateScroll().

◆ onWindowOpened()

void uiBaseInventoryNode::onWindowOpened ( uiNode_t * node,
linkedList_t * params )
overridevirtual

Call when we open the window containing the node.

Reimplemented from uiNode.

Definition at line 767 of file ui_node_baseinventory.cpp.


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