|
OpenTTD Source
14.0-beta3
|
High level window description. More...
#include <window_gui.h>
Public Member Functions | |
| WindowDesc (const char *const file, const int line, WindowPosition default_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad, WindowClass window_class, WindowClass parent_class, uint32_t flags, const NWidgetPart *nwid_begin, const NWidgetPart *nwid_end, HotkeyList *hotkeys=nullptr) | |
| Window description constructor. | |
| int16_t | GetDefaultWidth () const |
| Determine default width of window. More... | |
| int16_t | GetDefaultHeight () const |
| Determine default height of window. More... | |
Public Member Functions inherited from ZeroedMemoryAllocator | |
| void * | operator new (size_t size) |
| Memory allocator for a single class instance. More... | |
| void * | operator new[] (size_t size) |
| Memory allocator for an array of class instances. More... | |
| void | operator delete (void *ptr) |
| Memory release for a single class instance. More... | |
| void | operator delete[] (void *ptr) |
| Memory release for an array of class instances. More... | |
Static Public Member Functions | |
| static void | LoadFromConfig () |
| Load all WindowDesc settings from _windows_file. | |
| static void | SaveToConfig () |
| Save all WindowDesc settings to _windows_file. | |
Data Fields | |
| const char *const | file |
| Source file of this definition. | |
| const int | line |
| Source line of this definition. | |
| WindowPosition | default_pos |
| Preferred position of the window. More... | |
| WindowClass | cls |
| Class of the window,. More... | |
| WindowClass | parent_cls |
| Class of the parent window. More... | |
| const char * | ini_key |
Key to store window defaults in openttd.cfg. nullptr if nothing shall be stored. | |
| uint32_t | flags |
| Flags. More... | |
| const NWidgetPart * | nwid_begin |
| Beginning of nested widget parts describing the window. | |
| const NWidgetPart * | nwid_end |
| Ending of nested widget parts describing the window. | |
| HotkeyList * | hotkeys |
| Hotkeys for the window. | |
| bool | pref_sticky |
| Preferred stickyness. | |
| int16_t | pref_width |
| User-preferred width of the window. Zero if unset. | |
| int16_t | pref_height |
| User-preferred height of the window. Zero if unset. | |
Private Member Functions | |
| WindowDesc (const WindowDesc &other) | |
| Dummy private copy constructor to prevent compilers from copying the structure, which fails due to _window_descs. | |
Private Attributes | |
| int16_t | default_width_trad |
| Preferred initial width of the window (pixels at 1x zoom). | |
| int16_t | default_height_trad |
| Preferred initial height of the window (pixels at 1x zoom). | |
High level window description.
Definition at line 153 of file window_gui.h.
| int16_t WindowDesc::GetDefaultHeight | ( | ) | const |
Determine default height of window.
This is either a stored user preferred size, or the built-in default.
Definition at line 148 of file window.cpp.
References default_height_trad, pref_height, and ScaleGUITrad().
Referenced by LocalGetWindowPlacement().
| int16_t WindowDesc::GetDefaultWidth | ( | ) | const |
Determine default width of window.
This is either a stored user preferred size, or the built-in default.
Definition at line 138 of file window.cpp.
References default_width_trad, pref_width, and ScaleGUITrad().
Referenced by Window::FinishInitNested(), LocalGetWindowPlacement(), and Window::ReInit().
| WindowClass WindowDesc::cls |
Class of the window,.
Definition at line 164 of file window_gui.h.
Referenced by AllocateWindowDescFront(), and Window::InitializeData().
| WindowPosition WindowDesc::default_pos |
Preferred position of the window.
Definition at line 163 of file window_gui.h.
Referenced by Window::InitializeData().
| uint32_t WindowDesc::flags |
Flags.
Definition at line 167 of file window_gui.h.
Referenced by CloseAllNonVitalWindows(), CloseConstructionWindows(), and CloseNonVitalWindows().
| WindowClass WindowDesc::parent_cls |
Class of the parent window.
Definition at line 165 of file window_gui.h.
Referenced by LocalGetWindowPlacement().