UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_windows.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 "../../common/common.h"
28
29/* prototype */
30struct uiNode_t;
31struct uiCallContext_s;
32
33/* module initialization */
34void UI_InitWindows(void);
35
36/* window stack */
38uiNode_t* UI_PushWindow(const char* name, const char* parentName = nullptr, linkedList_t* params = nullptr);
39void UI_InitStack(const char* activeWindow, const char* mainWindow);
40void UI_PopWindow(bool all = false);
41void UI_PopWindowWithEscKey(void);
42void UI_CloseWindow(const char* name);
44int UI_CompleteWithWindow(const char* partial, const char** match);
45bool UI_IsWindowOnStack(const char* name);
46bool UI_IsMouseOnWindow(void);
47void UI_InvalidateStack(void);
48void UI_InsertWindow(uiNode_t* window);
49void UI_RemoveWindow(uiNode_t* window);
50void UI_MoveWindowOnTop(uiNode_t* window);
51
52/* deprecated */
53const char* UI_GetActiveWindowName(void);
54
56void UI_SetNewWindowPos(uiNode_t* window, int x, int y);
57uiNode_t* UI_GetWindow(const char* name);
definitions common between client and server, but not game lib
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition r_gl.h:110
Atomic structure used to define most of the UI.
Definition ui_nodes.h:80
void UI_MoveWindowOnTop(uiNode_t *window)
Move the window on top of compatible windows. "Compatible" mean non full screen windows,...
void UI_InsertWindow(uiNode_t *window)
Add a new window to the list of all windows.
uiNode_t * UI_GetWindow(const char *name)
Searches all windows for the specified one.
int UI_CompleteWithWindow(const char *partial, const char **match)
Complete function for ui_push.
void UI_SetNewWindowPos(uiNode_t *window, int x, int y)
Sets new x and y coordinates for a given window.
void UI_PopWindow(bool all=false)
Pops a window from the window stack.
uiNode_t * UI_PushWindow(const char *name, const char *parentName=nullptr, linkedList_t *params=nullptr)
Push a window onto the window stack.
void UI_InitWindows(void)
int UI_GetLastFullScreenWindow(void)
Returns the ID of the last fullscreen ID. Before this, window should be hidden.
bool UI_IsWindowOnStack(const char *name)
Check if a named window is on the stack if active windows.
void UI_InvalidateStack(void)
Invalidate all windows of the current stack.
void UI_CloseWindow(const char *name)
void UI_PopWindowWithEscKey(void)
void UI_RemoveWindow(uiNode_t *window)
Removes a window from the list of all windows.
uiNode_t * UI_GetActiveWindow(void)
Returns the current active window from the window stack or nullptr if there is none.
void UI_InitStack(const char *activeWindow, const char *mainWindow)
Init the stack to start with a window, and have an alternative window with ESC.
bool UI_IsMouseOnWindow(void)
Check if a point is over a window from the stack.
const char * UI_GetActiveWindowName(void)
Returns the name of the current window.