OpenTTD: src/window_func.h Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

window_func.h
Go to the documentation of this file.
1 /* $Id: window_func.h 25681 2013-08-05 20:37:14Z michi_cc $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 */
9
12 #ifndef WINDOW_FUNC_H
13 #define WINDOW_FUNC_H
14
15 #include "window_type.h"
16 #include "company_type.h"
17 #include "core/geometry_type.hpp"
18
19 Window *FindWindowById(WindowClass cls, WindowNumber number);
20 Window *FindWindowByClass(WindowClass cls);
21 void ChangeWindowOwner(Owner old_owner, Owner new_owner);
22
23 void ResizeWindow(Window *w, int x, int y, bool clamp_to_screen = true);
24 int PositionMainToolbar(Window *w);
25 int PositionStatusbar(Window *w);
26 int PositionNewsMessage(Window *w);
27 int PositionNetworkChatWindow(Window *w);
28
29 int GetMainViewTop();
30 int GetMainViewBottom();
31
32 void InitWindowSystem();
33 void UnInitWindowSystem();
34 void ResetWindowSystem();
35 void SetupColoursAndInitialWindow();
36 void InputLoop();
37
38 void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0, bool gui_scope = false);
39 void InvalidateWindowClassesData(WindowClass cls, int data = 0, bool gui_scope = false);
40
41 void DeleteNonVitalWindows();
42 void DeleteAllNonVitalWindows();
43 void DeleteConstructionWindows();
44 void HideVitalWindows();
45 void ShowVitalWindows();
46
47 void ReInitAllWindows();
48
49 void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, byte widget_index);
50 void SetWindowDirty(WindowClass cls, WindowNumber number);
51 void SetWindowClassesDirty(WindowClass cls);
52
53 void DeleteWindowById(WindowClass cls, WindowNumber number, bool force = true);
54 void DeleteWindowByClass(WindowClass cls);
55
56 bool EditBoxInGlobalFocus();
57 Point GetCaretPosition();
58
59 #endif /* WINDOW_FUNC_H */