23void ResizeWindow(
Window *w,
int x,
int y,
bool clamp_to_screen =
true,
bool schedule_resize =
true);
73Point GetCaretPosition();
Types related to companies.
A type is considered 'convertible through base()' when it has a 'base()' function that returns someth...
#define T
Climate temperate.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
constexpr bool is_scoped_enum_v
Implementation of std::is_scoped_enum_v (from C++23).
All geometry types in OpenTTD.
#define Point
Macro that prevents name conflicts between included headers.
Types related to strings.
StrongType::Typedef< uint32_t, struct StringIDTag, StrongType::Compare, StrongType::Integer > StringID
Numeric value that represents a string, independent of the selected language.
Number to differentiate different windows of the same class.
Data structure for an opened window.
int PositionStatusbar(Window *w)
(Re)position statusbar window at the screen.
void CloseConstructionWindows()
Close all windows that are used for construction of vehicle etc.
void ShowVitalWindows()
Show the vital in-game windows.
Window * GetMainWindow()
Get the main window, i.e.
void InputLoop()
Regular call from the global game loop.
int PositionMainToolbar(Window *w)
(Re)position main toolbar window at the screen.
void CloseNonVitalWindows()
Try to close a non-vital window.
int PositionNetworkChatWindow(Window *w)
(Re)position network chat window at the screen.
void SetupColoursAndInitialWindow()
Initialise the default colours (remaps and the likes), and load the main windows.
Window * FindWindowByClass(WindowClass cls)
Find any window by its class.
void InvalidateWindowClassesData(WindowClass cls, int data=0, bool gui_scope=false)
Mark window data of all windows of a given class as invalid (in need of re-computing) Note that by de...
constexpr StringID operator+(StringID string, WindowNumber window_number) noexcept
Adding a window number to a string is a common occurence to get the caption for a vehicle type.
void DeleteAllMessages()
Delete all messages and close their corresponding window (if any).
int GetMainViewTop()
Return the top of the main view available for general use.
void ReInitAllWindows(bool zoom_changed)
Re-initialize all windows.
int PositionNewsMessage(Window *w)
(Re)position news message window at the screen.
int GetMainViewBottom()
Return the bottom of the main view available for general use.
void ChangeWindowOwner(Owner old_owner, Owner new_owner)
Change the owner of all the windows one company can take over from another company in the case of a c...
void SetWindowClassesDirty(WindowClass cls)
Mark all windows of a particular class as dirty (in need of repainting).
bool FocusedWindowIsConsole()
Check if a console is focused.
void ResetWindowSystem()
Reset the windowing system, by means of shutting it down followed by re-initialization.
bool EditBoxInGlobalFocus()
Check if an edit box is in global focus.
void InvalidateWindowData(WindowClass cls, WindowNumber number, int data=0, bool gui_scope=false)
Mark window data of the window of a given class and specific window number as invalid (in need of re-...
void HideVitalWindows()
Close all always on-top windows to get an empty screen.
void ResizeWindow(Window *w, int x, int y, bool clamp_to_screen=true, bool schedule_resize=true)
Resize the window.
void CloseWindowByClass(WindowClass cls, int data=0)
Close all windows of a given class.
void CloseAllNonVitalWindows()
It is possible that a stickied window gets to a position where the 'close' button is outside the gami...
Window * FindWindowById(WindowClass cls, WindowNumber number)
Find a window by its class and window number.
void UnInitWindowSystem()
Close down the windowing system.
void CloseWindowById(WindowClass cls, WindowNumber number, bool force=true, int data=0)
Close a window by its class and window number (if it is open).
void InitWindowSystem()
(re)initialize the windowing system
void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, WidgetID widget_index)
Mark a particular widget in a particular window as dirty (in need of repainting).
void SetWindowDirty(WindowClass cls, WindowNumber number)
Mark window as dirty (in need of repainting).
Types related to windows.