UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_node_baseinventory.h
Go to the documentation of this file.
1
4
5/*
6Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8This program is free software; you can redistribute it and/or
9modify it under the terms of the GNU General Public License
10as published by the Free Software Foundation; either version 2
11of the License, or (at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17See the GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23*/
24
25#pragma once
26
27#include "ui_node_container.h"
29
31public:
32 void initNode(uiNode_t* node) override;
33 void draw(uiNode_t* node) override;
34 void drawTooltip(const uiNode_t* node, int x, int y) const override;
35
36 void onMouseDown(uiNode_t* node, int x, int y, int button) override;
37 void onMouseUp(uiNode_t* node, int x, int y, int button) override;
38 bool onScroll(uiNode_t* node, int deltaX, int deltaY) override;
39 void onCapturedMouseMove(uiNode_t* node, int x, int y) override;
40 void onWindowOpened(uiNode_t* node, linkedList_t* params) override;
41 void onLoading(uiNode_t* node) override;
42 void onLoaded(uiNode_t* node) override;
43 bool onDndEnter(uiNode_t* node) override;
44 bool onDndMove(uiNode_t* node, int x, int y) override;
45 void onDndLeave(uiNode_t* node) override;
46};
47
48/* prototypes */
49struct uiBehaviour_t;
50
51typedef struct baseInventoryExtraData_s {
53
56
65
66 /* scroll status */
68 /* scroll callback when the status change */
69 struct uiAction_s* onViewChange;
71
73
77CASSERT(offsetof(baseInventoryExtraData_t, super) == 0);
78
void drawTooltip(const uiNode_t *node, int x, int y) const override
Custom tooltip for container node.
void onCapturedMouseMove(uiNode_t *node, int x, int y) override
void onMouseDown(uiNode_t *node, int x, int y, int button) override
bool onDndMove(uiNode_t *node, int x, int y) override
Call into the target when the DND hover it.
bool onDndEnter(uiNode_t *node) override
Call when a DND enter into the node.
void draw(uiNode_t *node) override
Main function to draw a container node.
void onDndLeave(uiNode_t *node) override
Call when a DND enter into the node.
bool onScroll(uiNode_t *node, int deltaX, int deltaY) override
void initNode(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 shap...
void onMouseUp(uiNode_t *node, int x, int y, int button) override
void onLoading(uiNode_t *node) override
void onWindowOpened(uiNode_t *node, linkedList_t *params) override
Call when we open the window containing the node.
int LUA_EVENT
holds a reference to a lua event handler
Definition scripts_lua.h:49
#define CASSERT(x)
Definition shared.h:107
struct uiAction_s * onViewChange
extradata for container widget
node behaviour, how a node work
Atomic structure used to define most of the UI.
Definition ui_nodes.h:80
Scroll representation.
base code for scrollable node
void UI_RegisterBaseInventoryNode(uiBehaviour_t *behaviour)