Public Member Functions | Static Public Member Functions | Data Fields | Private Member Functions

WindowDesc Struct Reference

High level window description. More...

#include <window_gui.h>

Inheritance diagram for WindowDesc:
ZeroedMemoryAllocator

Public Member Functions

 WindowDesc (WindowPosition default_pos, const char *ini_key, int16 def_width, int16 def_height, WindowClass window_class, WindowClass parent_class, uint32 flags, const NWidgetPart *nwid_parts, int16 nwid_length, HotkeyList *hotkeys=NULL)
 Window description constructor.
int16 GetDefaultWidth () const
int16 GetDefaultHeight () const

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

WindowPosition default_pos
 Preferred position of the window.
int16 default_width
 Preferred initial width of the window.
int16 default_height
 Preferred initial height of the window.
WindowClass cls
 Class of the window,.
WindowClass parent_cls
 Class of the parent window.
const char * ini_key
 Key to store window defaults in openttd.cfg. NULL if nothing shall be stored.
uint32 flags
 Flags.
const NWidgetPartnwid_parts
 Nested widget parts describing the window.
int16 nwid_length
 Length of the nwid_parts array.
HotkeyListhotkeys
 Hotkeys for the window.
bool pref_sticky
 Preferred stickyness.
int16 pref_width
 User-preferred width of the window. Zero if unset.
int16 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.

Detailed Description

High level window description.

Definition at line 170 of file window_gui.h.


Constructor & Destructor Documentation

WindowDesc::WindowDesc ( WindowPosition  def_pos,
const char *  ini_key,
int16  def_width,
int16  def_height,
WindowClass  window_class,
WindowClass  parent_class,
uint32  flags,
const NWidgetPart nwid_parts,
int16  nwid_length,
HotkeyList hotkeys = NULL 
)

Window description constructor.

Definition at line 88 of file window.cpp.

References SmallVector< T, S >::Append().


Field Documentation

Class of the window,.

See also:
WindowClass.

Definition at line 181 of file window_gui.h.

Referenced by AllocateWindowDescFront(), Window::InitializeData(), and ShowCompanyGroup().

Preferred position of the window.

See also:
WindowPosition()

Definition at line 178 of file window_gui.h.

Referenced by Window::InitializeData(), and LocalGetWindowPlacement().

Class of the parent window.

See also:
WindowClass

Definition at line 182 of file window_gui.h.

Referenced by LocalGetWindowPlacement().


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