OpenTTD Source 20241224-master-gf74b0cf984
|
Data structure for an opened window. More...
#include <window_gui.h>
Data Structures | |
struct | AllWindows |
Iterable ensemble of all valid Windows. More... | |
struct | WindowIterator |
Iterator to iterate all valid Windows. More... | |
Public Types | |
using | IteratorToFront = WindowIterator< false > |
Iterate in Z order towards front. | |
using | IteratorToBack = WindowIterator< true > |
Iterate in Z order towards back. | |
using | Iterate = AllWindows< false > |
Iterate all windows in whatever order is easiest. | |
using | IterateFromBack = AllWindows< false > |
Iterate all windows in Z order from back to front. | |
using | IterateFromFront = AllWindows< true > |
Iterate all windows in Z order from front to back. | |
Public Member Functions | |
Window (WindowDesc &desc) | |
Empty constructor, initialization has been moved to InitNested() called from the constructor of the derived class. | |
void * | operator new[] (size_t size)=delete |
Helper allocation function to disallow something. | |
template<class NWID > | |
const NWID * | GetWidget (WidgetID widnum) const |
Get the nested widget with number widnum from the nested widget tree. | |
template<class NWID > | |
NWID * | GetWidget (WidgetID widnum) |
Get the nested widget with number widnum from the nested widget tree. | |
const Scrollbar * | GetScrollbar (WidgetID widnum) const |
Return the Scrollbar to a widget index. | |
Scrollbar * | GetScrollbar (WidgetID widnum) |
Return the Scrollbar to a widget index. | |
const QueryString * | GetQueryString (WidgetID widnum) const |
Return the querystring associated to a editbox. | |
QueryString * | GetQueryString (WidgetID widnum) |
Return the querystring associated to a editbox. | |
void | UpdateQueryStringSize () |
Update size of all QueryStrings of this window. | |
virtual const struct Textbuf * | GetFocusedTextbuf () const |
Get the current input text buffer. | |
virtual Point | GetCaretPosition () const |
Get the current caret position if an edit box has the focus. | |
virtual Rect | GetTextBoundingRect (const char *from, const char *to) const |
Get the bounding rectangle for a text range if an edit box has the focus. | |
virtual ptrdiff_t | GetTextCharacterAtPosition (const Point &pt) const |
Get the character that is rendered at a position by the focused edit box. | |
void | InitNested (WindowNumber number=0) |
Perform complete initialization of the Window with nested widgets, to allow use. | |
void | CreateNestedTree () |
Perform the first part of the initialization of a nested widget tree. | |
void | FinishInitNested (WindowNumber window_number=0) |
Perform the second part of the initialization of a nested widget tree. | |
template<typename T , std::enable_if_t< std::is_base_of< StrongTypedefBase, T >::value, int > = 0> | |
void | FinishInitNested (T number) |
void | SetTimeout () |
Set the timeout flag of the window and initiate the timer. | |
void | SetWhiteBorder () |
Set the timeout flag of the window and initiate the timer. | |
void | DisableAllWidgetHighlight () |
Disable the highlighted status of all widgets. | |
void | SetWidgetHighlight (WidgetID widget_index, TextColour highlighted_colour) |
Sets the highlighted status of a widget. | |
bool | IsWidgetHighlighted (WidgetID widget_index) const |
Gets the highlighted status of a widget. | |
void | SetWidgetDisabledState (WidgetID widget_index, bool disab_stat) |
Sets the enabled/disabled status of a widget. | |
void | DisableWidget (WidgetID widget_index) |
Sets a widget to disabled. | |
void | EnableWidget (WidgetID widget_index) |
Sets a widget to Enabled. | |
bool | IsWidgetDisabled (WidgetID widget_index) const |
Gets the enabled/disabled status of a widget. | |
bool | IsWidgetFocused (WidgetID widget_index) const |
Check if given widget is focused within this window. | |
bool | IsWidgetGloballyFocused (WidgetID widget_index) const |
Check if given widget has user input focus. | |
void | SetWidgetLoweredState (WidgetID widget_index, bool lowered_stat) |
Sets the lowered/raised status of a widget. | |
void | ToggleWidgetLoweredState (WidgetID widget_index) |
Invert the lowered/raised status of a widget. | |
void | LowerWidget (WidgetID widget_index) |
Marks a widget as lowered. | |
void | RaiseWidget (WidgetID widget_index) |
Marks a widget as raised. | |
void | RaiseWidgetWhenLowered (WidgetID widget_index) |
Marks a widget as raised and dirty (redraw), when it is marked as lowered. | |
bool | IsWidgetLowered (WidgetID widget_index) const |
Gets the lowered state of a widget. | |
void | UnfocusFocusedWidget () |
Makes no widget on this window have focus. | |
bool | SetFocusedWidget (WidgetID widget_index) |
Set focus within this window to the given widget. | |
EventState | HandleEditBoxKey (WidgetID wid, char32_t key, uint16_t keycode) |
Process keypress for editbox widget. | |
virtual void | InsertTextString (WidgetID wid, const char *str, bool marked, const char *caret, const char *insert_location, const char *replacement_end) |
Insert a text string at the cursor position into the edit box widget. | |
void | HandleButtonClick (WidgetID widget) |
Do all things to make a button look clicked and mark it to be unclicked in a few ticks. | |
int | GetRowFromWidget (int clickpos, WidgetID widget, int padding, int line_height=-1) const |
Compute the row of a widget that a user clicked in. | |
void | RaiseButtons (bool autoraise=false) |
Raise the buttons of the window. | |
template<typename... Args> | |
void | SetWidgetsDisabledState (bool disab_stat, Args... widgets) |
Sets the enabled/disabled status of a list of widgets. | |
template<typename... Args> | |
void | SetWidgetsLoweredState (bool lowered_stat, Args... widgets) |
Sets the lowered/raised status of a list of widgets. | |
template<typename... Args> | |
void | RaiseWidgetsWhenLowered (Args... widgets) |
Raises the widgets and sets widgets dirty that are lowered. | |
void | SetWidgetDirty (WidgetID widget_index) const |
Invalidate a widget, i.e. | |
void | DrawWidgets () const |
Paint all widgets of a window. | |
void | DrawViewport () const |
Draw the viewport of this window. | |
void | DrawSortButtonState (WidgetID widget, SortButtonState state) const |
Draw a sort button's up or down arrow symbol. | |
Window * | FindChildWindow (WindowClass wc=WC_INVALID) const |
Find the Window whose parent pointer points to this window. | |
void | CloseChildWindows (WindowClass wc=WC_INVALID) const |
Close all children a window might have in a head-recursive manner. | |
virtual void | Close (int data=0) |
Hide the window and all its child windows, and mark them for a later deletion. | |
void | SetDirty () const |
Mark entire window as dirty (in need of re-paint) | |
void | ReInit (int rx=0, int ry=0, bool reposition=false) |
Re-initialize a window, and optionally change its size. | |
bool | IsShaded () const |
Is window shaded currently? | |
void | SetShaded (bool make_shaded) |
Set the shaded state of the window to make_shaded. | |
void | ScheduleResize () |
Mark this window as resized and in need of OnResize() event. | |
void | ProcessScheduledResize () |
Process scheduled OnResize() event. | |
void | InvalidateData (int data=0, bool gui_scope=true) |
Mark this window's data as invalid (in need of re-computing) | |
void | ProcessScheduledInvalidations () |
Process all scheduled invalidations. | |
void | ProcessHighlightedInvalidations () |
Process all invalidation of highlighted widgets. | |
virtual void | OnInit () |
Notification that the nested widget tree gets initialized. | |
virtual void | ApplyDefaults () |
Read default values from WindowDesc configuration an apply them to the window. | |
virtual Point | OnInitialPosition (int16_t sm_width, int16_t sm_height, int window_number) |
Compute the initial position of the window. | |
virtual void | OnPaint () |
The window must be repainted. | |
virtual void | DrawWidget (const Rect &r, WidgetID widget) const |
Draw the contents of a nested widget. | |
virtual void | UpdateWidgetSize (WidgetID widget, Dimension &size, const Dimension &padding, Dimension &fill, Dimension &resize) |
Update size and resize step of a widget in the window. | |
virtual void | SetStringParameters (WidgetID widget) const |
Initialize string parameters for a widget. | |
virtual void | OnFocus () |
The window has gained focus. | |
virtual void | OnFocusLost (bool closing) |
The window has lost focus. | |
virtual EventState | OnKeyPress (char32_t key, uint16_t keycode) |
A key has been pressed. | |
virtual EventState | OnHotkey (int hotkey) |
A hotkey has been pressed. | |
virtual EventState | OnCTRLStateChange () |
The state of the control key has changed. | |
virtual void | OnClick (Point pt, WidgetID widget, int click_count) |
A click with the left mouse button has been made on the window. | |
virtual bool | OnRightClick (Point pt, WidgetID widget) |
A click with the right mouse button has been made on the window. | |
virtual void | OnHover (Point pt, WidgetID widget) |
The mouse is hovering over a widget in the window, perform an action for it. | |
virtual bool | OnTooltip (Point pt, WidgetID widget, TooltipCloseCondition close_cond) |
Event to display a custom tooltip. | |
virtual void | OnMouseDrag (Point pt, WidgetID widget) |
An 'object' is being dragged at the provided position, highlight the target if possible. | |
virtual void | OnDragDrop (Point pt, WidgetID widget) |
A dragged 'object' has been released. | |
virtual void | OnScroll (Point delta) |
Handle the request for (viewport) scrolling. | |
virtual void | OnMouseOver (Point pt, WidgetID widget) |
The mouse is currently moving over the window or has just moved outside of the window. | |
virtual void | OnMouseWheel (int wheel) |
The mouse wheel has been turned. | |
virtual void | OnMouseLoop () |
Called for every mouse loop run, which is at least once per (game) tick. | |
virtual void | OnGameTick () |
Called once per (game) tick. | |
virtual void | OnRealtimeTick (uint delta_ms) |
Called periodically. | |
virtual void | OnTimeout () |
Called when this window's timeout has been reached. | |
virtual void | OnResize () |
Called after the window got resized. | |
virtual void | OnDropdownSelect (WidgetID widget, int index) |
A dropdown option associated to this window has been selected. | |
virtual void | OnDropdownClose (Point pt, WidgetID widget, int index, bool instant_close) |
A dropdown window associated to this window has been closed. | |
virtual void | OnEditboxChanged (WidgetID widget) |
The text in an editbox has been edited. | |
virtual void | OnQueryTextFinished (std::optional< std::string > str) |
The query window opened from this window has closed. | |
virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
Some data on this window has become invalid. | |
virtual void | OnPlaceObject (Point pt, TileIndex tile) |
The user clicked some place on the map when a tile highlight mode has been set. | |
virtual bool | OnVehicleSelect (const struct Vehicle *v) |
The user clicked on a vehicle while HT_VEHICLE has been set. | |
virtual bool | OnVehicleSelect (VehicleList::const_iterator begin, VehicleList::const_iterator end) |
The user clicked on a vehicle while HT_VEHICLE has been set. | |
virtual void | OnPlaceObjectAbort () |
The user cancelled a tile highlight mode that has been set. | |
virtual void | OnPlaceDrag (ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt) |
The user is dragging over the map when the tile highlight mode has been set. | |
virtual void | OnPlaceMouseUp (ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile) |
The user has dragged over the map when the tile highlight mode has been set. | |
virtual void | OnPlacePresize (Point pt, TileIndex tile) |
The user moves over the map when a tile highlight mode has been set when the special mouse mode has been set to 'PRESIZE' mode. | |
virtual bool | IsNewGRFInspectable () const |
Is the data related to this window NewGRF inspectable? | |
virtual void | ShowNewGRFInspectWindow () const |
Show the NewGRF inspection window. | |
template<> | |
const NWidgetBase * | GetWidget (WidgetID widnum) const |
Specialized case of Window::GetWidget for the nested widget base class. | |
Public Member Functions inherited from ZeroedMemoryAllocator | |
void * | operator new (size_t size) |
Memory allocator for a single class instance. | |
void * | operator new[] (size_t size) |
Memory allocator for an array of class instances. | |
void | operator delete (void *ptr) |
Memory release for a single class instance. | |
void | operator delete[] (void *ptr) |
Memory release for an array of class instances. | |
Static Public Member Functions | |
static int | SortButtonWidth () |
Get width of up/down arrow of sort button state. | |
static void | DeleteClosedWindows () |
Delete all closed windows. | |
Data Fields | |
WindowDesc & | window_desc |
Window description. | |
WindowFlags | flags |
Window flags. | |
WindowClass | window_class |
Window class. | |
WindowNumber | window_number |
Window number within the window class. | |
int | scale |
Scale of this window – used to determine how to resize. | |
uint8_t | timeout_timer |
Timer value of the WF_TIMEOUT for flags. | |
uint8_t | white_border_timer |
Timer value of the WF_WHITE_BORDER for flags. | |
int | left |
x position of left edge of the window | |
int | top |
y position of top edge of the window | |
int | width |
width of the window (number of pixels to the right in x direction) | |
int | height |
Height of the window (number of pixels down in y direction) | |
ResizeInfo | resize |
Resize information. | |
Owner | owner |
The owner of the content shown in this window. Company colour is acquired from this variable. | |
ViewportData * | viewport |
Pointer to viewport data, if present. | |
const NWidgetCore * | nested_focus |
Currently focused nested widget, or nullptr if no nested widget has focus. | |
std::map< WidgetID, QueryString * > | querystrings |
QueryString associated to WWT_EDITBOX widgets. | |
std::unique_ptr< NWidgetBase > | nested_root |
Root of the nested tree. | |
WidgetLookup | widget_lookup |
Indexed access to the nested widget tree. Do not access directly, use Window::GetWidget() instead. | |
NWidgetStacked * | shade_select |
Selection widget (NWID_SELECTION) to use for shading the window. If nullptr , window cannot shade. | |
Dimension | unshaded_size |
Last known unshaded size (only valid while shaded). | |
WidgetID | mouse_capture_widget |
ID of current mouse capture widget (e.g. dragged scrollbar). -1 if no widget has mouse capture. | |
Window * | parent |
Parent window. | |
WindowList::iterator | z_position |
Protected Member Functions | |
void | InitializeData (WindowNumber window_number) |
Initializes the data (except the position and initial size) of a new Window. | |
void | InitializePositionSize (int x, int y, int min_width, int min_height) |
Set the position and smallest size of the window. | |
virtual void | FindWindowPlacementAndResize (int def_width, int def_height) |
Resize window towards the default size. | |
virtual | ~Window () |
Remove window and all its child windows from the window stack. | |
Protected Attributes | |
std::vector< int > | scheduled_invalidation_data |
Data of scheduled OnInvalidateData() calls. | |
bool | scheduled_resize |
Set if window has been resized. | |
Static Private Attributes | |
static std::vector< Window * > | closed_windows |
List of closed windows to delete. | |
Data structure for an opened window.
Definition at line 273 of file window_gui.h.
Iterate all windows in whatever order is easiest.
Definition at line 927 of file window_gui.h.
Iterate all windows in Z order from back to front.
Definition at line 928 of file window_gui.h.
Iterate all windows in Z order from front to back.
Definition at line 929 of file window_gui.h.
Iterate in Z order towards back.
Definition at line 906 of file window_gui.h.
Iterate in Z order towards front.
Definition at line 905 of file window_gui.h.
|
protectedvirtual |
Remove window and all its child windows from the window stack.
Definition at line 1084 of file window.cpp.
References GetWidget(), and viewport.
Window::Window | ( | WindowDesc & | desc | ) |
Empty constructor, initialization has been moved to InitNested() called from the constructor of the derived class.
desc | The description of the window. |
Definition at line 1756 of file window.cpp.
References _z_windows.
|
virtual |
Read default values from WindowDesc configuration an apply them to the window.
Definition at line 194 of file window.cpp.
References flags, nested_root, WindowDesc::pref_sticky, WF_STICKY, window_desc, and WWT_STICKYBOX.
Referenced by FinishInitNested().
Hide the window and all its child windows, and mark them for a later deletion.
Reimplemented in SmallMapWindow, AIConfigWindow, BuildAirToolbarWindow, BuildAirportWindow, BootstrapErrorWindow, BootstrapContentDownloadStatusWindow, BootstrapAskForDownloadWindow, IConsoleWindow, DepotWindow, BuildDocksToolbarWindow, BuildDocksStationWindow, DropdownWindow, ErrmsgWindow, SaveLoadWindow, GSConfigWindow, EndGameWindow, HighScoreWindow, QueryStringWindow, QueryWindow, NetworkChatWindow, NetworkContentDownloadStatusWindow, NetworkContentListWindow, BaseNetworkContentDownloadStatusWindow, NetworkAskRelayWindow, NewGRFWindow, PickerWindow, BuildRailToolbarWindow, BuildRailStationWindow, BuildSignalWindow, BuildRoadToolbarWindow, BuildRoadStationWindow, GameOptionsWindow, StationViewWindow, SelectStationWindow< T >, TownViewWindow, VehicleViewWindow, WaypointWindow, and PickerWindowBase.
Definition at line 1047 of file window.cpp.
References _last_scroll_window, _mouseover_last_w, CloseChildWindows(), closed_windows, GetWidget(), OnFocusLost(), querystrings, ResetObjectToPlace(), SetDirty(), TileHighlightData::window_class, and TileHighlightData::window_number.
Referenced by CheckSoftLimit(), SmallMapWindow::Close(), AIConfigWindow::Close(), BuildAirToolbarWindow::Close(), BootstrapErrorWindow::Close(), BootstrapAskForDownloadWindow::Close(), IConsoleWindow::Close(), DepotWindow::Close(), BuildDocksToolbarWindow::Close(), DropdownWindow::Close(), ErrmsgWindow::Close(), SaveLoadWindow::Close(), GSConfigWindow::Close(), EndGameWindow::Close(), HighScoreWindow::Close(), QueryStringWindow::Close(), QueryWindow::Close(), NetworkChatWindow::Close(), NetworkContentListWindow::Close(), BaseNetworkContentDownloadStatusWindow::Close(), NetworkAskRelayWindow::Close(), NewGRFWindow::Close(), BuildRailToolbarWindow::Close(), BuildRoadToolbarWindow::Close(), GameOptionsWindow::Close(), StationViewWindow::Close(), SelectStationWindow< T >::Close(), TownViewWindow::Close(), VehicleViewWindow::Close(), WaypointWindow::Close(), PickerWindowBase::Close(), CloseAllNonVitalWindows(), CloseChildWindows(), CloseConstructionWindows(), CloseNonVitalWindows(), CloseWindowById(), DeleteRenameSignWindow(), DispatchLeftClickEvent(), DispatchRightClickEvent(), HideActiveNewsMessage(), BuildBridgeWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), BuyCompanyWindow::OnClick(), SetDateWindow::OnClick(), EnginePreviewWindow::OnClick(), GoalQuestionWindow::OnClick(), EndGameHighScoreBaseWindow::OnClick(), NetworkAskSurveyWindow::OnClick(), NewGRFParametersWindow::OnClick(), SavePresetWindow::OnClick(), NewsWindow::OnClick(), OskWindow::OnClick(), ScriptListWindow::OnClick(), ScriptSettingsWindow::OnClick(), SignWindow::OnClick(), RefitWindow::OnClick(), OskWindow::OnFocusLost(), EnginePreviewWindow::OnInvalidateData(), LinkGraphLegendWindow::OnInvalidateData(), ScriptListWindow::OnInvalidateData(), ScriptSettingsWindow::OnInvalidateData(), ScriptTextfileWindow::OnInvalidateData(), BuildBridgeWindow::OnKeyPress(), EndGameHighScoreBaseWindow::OnKeyPress(), TooltipsWindow::OnMouseLoop(), StationJoinerNeeded(), and UnInitWindowSystem().
void Window::CloseChildWindows | ( | WindowClass | wc = WC_INVALID | ) | const |
Close all children a window might have in a head-recursive manner.
wc | Window class of the window to remove; WC_INVALID if class does not matter |
Definition at line 1035 of file window.cpp.
References Close(), and FindChildWindow().
Referenced by Close(), GSConfigWindow::OnClick(), NewGRFParametersWindow::OnClick(), NewGRFWindow::OnClick(), OrdersWindow::OnClick(), ScriptSettingsWindow::OnClick(), GameSettingsWindow::OnClick(), TimetableWindow::OnClick(), CompanyStationsWindow::OnDropdownSelect(), GSConfigWindow::OnInvalidateData(), VehicleGroupWindow::OnInvalidateData(), NewGRFParametersWindow::OnInvalidateData(), OrdersWindow::OnInvalidateData(), ScriptSettingsWindow::OnInvalidateData(), TimetableWindow::OnInvalidateData(), NewGRFWindow::OnNewGRFsScanned(), VehicleGroupWindow::OnPaint(), and VehicleListWindow::OnPaint().
void Window::CreateNestedTree | ( | ) |
Perform the first part of the initialization of a nested widget tree.
Construct a nested widget tree in nested_root, and optionally fill the widget_lookup array to provide quick access to the uninitialized widgets. This is mainly useful for setting very basic properties.
fill_nested | Fill the widget_lookup (enabling is expensive!). |
Definition at line 1723 of file window.cpp.
References GetWidget(), MakeWindowNWidgetTree(), nested_root, WindowDesc::nwid_parts, widget_lookup, and window_desc.
Referenced by DropdownWindow::DropdownWindow(), InitNested(), NetworkChatWindow::NetworkChatWindow(), NetworkContentListWindow::NetworkContentListWindow(), SavePresetWindow::SavePresetWindow(), ScriptDebugWindow::ScriptDebugWindow(), ScriptListWindow::ScriptListWindow(), ScriptSettingsWindow::ScriptSettingsWindow(), VehicleDetailsWindow::VehicleDetailsWindow(), and WaypointWindow::WaypointWindow().
|
static |
Delete all closed windows.
Definition at line 65 of file window.cpp.
References _z_windows, and closed_windows.
Referenced by InputLoop(), and UnInitWindowSystem().
void Window::DisableAllWidgetHighlight | ( | ) |
Disable the highlighted status of all widgets.
Definition at line 224 of file window.cpp.
References CLRBITS, flags, GetWidget(), WF_HIGHLIGHTED, and widget_lookup.
Sets a widget to disabled.
widget_index | index of this widget in the window |
Definition at line 397 of file window_gui.h.
References GetWidget(), and SetWidgetDisabledState().
Referenced by TextfileWindow::AppendHistory(), CustomCurrencyWindow::OnClick(), NewGRFWindow::OnInvalidateData(), TimetableWindow::OnPaint(), BuildRailToolbarWindow::OnPlaceObjectAbort(), and BuildRoadToolbarWindow::UpdateOptionWidgetStatus().
void Window::DrawSortButtonState | ( | WidgetID | widget, |
SortButtonState | state | ||
) | const |
Draw a sort button's up or down arrow symbol.
widget | Sort button widget |
state | State of sort button |
Definition at line 764 of file widget.cpp.
References _current_text_dir, GetWidget(), SA_CENTER, SBS_DOWN, SBS_OFF, TD_LTR, widget_lookup, and Rect::WithWidth().
Referenced by ReplaceVehicleWindow::DrawWidget(), BuildBridgeWindow::DrawWidget(), BuildVehicleWindow::DrawWidget(), SaveLoadWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), IndustryDirectoryWindow::DrawWidget(), NetworkGameWindow::DrawWidget(), CompanyStationsWindow::DrawWidget(), TownDirectoryWindow::DrawWidget(), VehicleListWindow::DrawWidget(), NetworkContentListWindow::OnPaint(), and StationViewWindow::OnPaint().
void Window::DrawViewport | ( | ) | const |
Draw the viewport of this window.
Definition at line 1832 of file viewport.cpp.
References GetWidget(), left, PFE_DRAWWORLD, top, and viewport.
Referenced by NWidgetViewport::Draw().
Draw the contents of a nested widget.
r | Rectangle occupied by the widget. |
widget | Number of the widget to draw. |
Reimplemented in AIConfigWindow, BuildAirportWindow, ReplaceVehicleWindow, BootstrapErrorWindow, BootstrapAskForDownloadWindow, BuildBridgeWindow, BuildVehicleWindow, CheatWindow, CompanyFinancesWindow, SelectCompanyLiveryWindow, SelectCompanyManagerFaceWindow, CompanyInfrastructureWindow, CompanyWindow, BuyCompanyWindow, DepotWindow, BuildDocksDepotWindow, DropdownWindow, EnginePreviewWindow, ErrmsgWindow, SaveLoadWindow, FramerateWindow, FrametimeGraphWindow, GSConfigWindow, GenerateProgressWindow, GoalQuestionWindow, GraphLegendWindow, BaseGraphWindow, PaymentRatesGraphWindow, PerformanceRatingDetailWindow, IndustryProductionGraphWindow, VehicleGroupWindow, BuildIndustryWindow, IndustryDirectoryWindow, IndustryCargoesWindow, SelectGameWindow, PerformanceLeagueWindow, ScriptLeagueWindow, LinkGraphLegendWindow, LandInfoWindow, AboutWindow, TooltipsWindow, QueryWindow, MusicTrackSelectionWindow, MusicWindow, NetworkContentListWindow, BaseNetworkContentDownloadStatusWindow, NetworkGameWindow, NetworkStartServerWindow, NetworkClientListWindow, NetworkJoinStatusWindow, NetworkAskRelayWindow, NetworkAskSurveyWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFWindow, SavePresetWindow, ScanProgressWindow, NewsWindow, MessageHistoryWindow, BuildObjectWindow, OrdersWindow, OskWindow, PickerWindow, BuildRailStationWindow, BuildSignalWindow, BuildRailDepotWindow, BuildRoadDepotWindow, BuildRoadStationWindow, ScriptListWindow, ScriptSettingsWindow, ScriptDebugWindow, GameOptionsWindow, GameSettingsWindow, SignListWindow, SmallMapWindow, CompanyStationsWindow, SelectStationWindow< T >, StatusBarWindow, StoryBookWindow, SubsidyListWindow, ScenarioEditorLandscapeGenerationWindow, TextfileWindow, TimetableWindow, ScenarioEditorToolbarWindow, TownAuthorityWindow, TownViewWindow, TownDirectoryWindow, BuildHouseWindow, TransparenciesWindow, BuildTreesWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, VehicleViewWindow, and BootstrapBackground.
Definition at line 610 of file window_gui.h.
Referenced by NWidgetBackground::Draw(), and NWidgetLeaf::Draw().
void Window::DrawWidgets | ( | ) | const |
Paint all widgets of a window.
Definition at line 732 of file widget.cpp.
References _string_colourmap, _window_highlight_colour, DrawFrameRect(), Rect::Expand(), flags, FR_BORDERONLY, GetWidget(), GfxFillRect(), height, nested_root, WidgetDimensions::scaled, Rect::Shrink(), WF_HIGHLIGHTED, WF_WHITE_BORDER, widget_lookup, and width.
Referenced by OnPaint(), BuildAirportWindow::OnPaint(), ReplaceVehicleWindow::OnPaint(), BuildVehicleWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), SelectCompanyLiveryWindow::OnPaint(), SelectCompanyManagerFaceWindow::OnPaint(), CompanyWindow::OnPaint(), DepotWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), SaveLoadWindow::OnPaint(), GSConfigWindow::OnPaint(), CreateScenarioWindow::OnPaint(), GoalListWindow::OnPaint(), VehicleGroupWindow::OnPaint(), IndustryViewWindow::OnPaint(), IndustryDirectoryWindow::OnPaint(), PerformanceLeagueWindow::OnPaint(), ScriptLeagueWindow::OnPaint(), MainWindow::OnPaint(), NetworkContentListWindow::OnPaint(), NetworkGameWindow::OnPaint(), NewGRFParametersWindow::OnPaint(), OrdersWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), ScreenshotWindow::OnPaint(), ScriptSettingsWindow::OnPaint(), ScriptDebugWindow::OnPaint(), GameSettingsWindow::OnPaint(), SignListWindow::OnPaint(), CompanyStationsWindow::OnPaint(), StationViewWindow::OnPaint(), StoryBookWindow::OnPaint(), ScenarioEditorLandscapeGenerationWindow::OnPaint(), TimetableWindow::OnPaint(), MainToolbarWindow::OnPaint(), ScenarioEditorToolbarWindow::OnPaint(), TownAuthorityWindow::OnPaint(), TownViewWindow::OnPaint(), TownDirectoryWindow::OnPaint(), TransparenciesWindow::OnPaint(), RefitWindow::OnPaint(), VehicleListWindow::OnPaint(), VehicleDetailsWindow::OnPaint(), VehicleViewWindow::OnPaint(), and WaypointWindow::OnPaint().
Sets a widget to Enabled.
widget_index | index of this widget in the window |
Definition at line 406 of file window_gui.h.
References GetWidget(), and SetWidgetDisabledState().
Referenced by TextfileWindow::AppendHistory(), CustomCurrencyWindow::OnClick(), and SelectCompanyLiveryWindow::OnInvalidateData().
Window * Window::FindChildWindow | ( | WindowClass | wc = WC_INVALID | ) | const |
Find the Window whose parent pointer points to this window.
w | parent Window to find child of |
wc | Window class of the window to remove; WC_INVALID if class does not matter |
nullptr
otherwise Definition at line 1022 of file window.cpp.
References GetWidget(), and WC_INVALID.
Referenced by CloseChildWindows().
Resize window towards the default size.
Prior to construction, a position for the new window (for its default size) has been found with LocalGetWindowPlacement(). Initially, the window is constructed with minimal size. Resizing the window to its default size is done here.
def_width | default width in pixels of the window |
def_height | default height in pixels of the window |
Reimplemented in QueryWindow, NetworkChatWindow, NetworkAskRelayWindow, NetworkAskSurveyWindow, StatusBarWindow, MainToolbarWindow, and ScenarioEditorToolbarWindow.
Definition at line 1420 of file window.cpp.
References FindWindowById(), GetWidget(), height, Viewport::left, left, OnResize(), resize, ResizeWindow(), SetDirty(), ResizeInfo::step_height, ResizeInfo::step_width, Viewport::top, top, viewport, WC_MAIN_TOOLBAR, WC_STATUS_BAR, and width.
Referenced by NetworkChatWindow::FindWindowPlacementAndResize(), StatusBarWindow::FindWindowPlacementAndResize(), MainToolbarWindow::FindWindowPlacementAndResize(), ScenarioEditorToolbarWindow::FindWindowPlacementAndResize(), FinishInitNested(), and ReInit().
|
inline |
Definition at line 353 of file window_gui.h.
void Window::FinishInitNested | ( | WindowNumber | window_number = 0 | ) |
Perform the second part of the initialization of a nested widget tree.
window_number | Number of the new window. |
Definition at line 1733 of file window.cpp.
References ApplyDefaults(), FindWindowPlacementAndResize(), WindowDesc::GetDefaultWidth(), GetWidget(), InitializeData(), InitializePositionSize(), nested_root, OnInitialPosition(), and window_desc.
Referenced by DropdownWindow::DropdownWindow(), InitNested(), NetworkChatWindow::NetworkChatWindow(), NetworkContentListWindow::NetworkContentListWindow(), SavePresetWindow::SavePresetWindow(), ScriptDebugWindow::ScriptDebugWindow(), ScriptListWindow::ScriptListWindow(), ScriptSettingsWindow::ScriptSettingsWindow(), VehicleDetailsWindow::VehicleDetailsWindow(), and WaypointWindow::WaypointWindow().
|
virtual |
Get the current caret position if an edit box has the focus.
Reimplemented in IConsoleWindow.
Definition at line 378 of file window.cpp.
References QueryString::GetCaretPosition(), GetQueryString(), GetWidget(), NWidgetCore::index, nested_focus, NWidgetBase::type, and WWT_EDITBOX.
Referenced by SetCandidatePos(), and SetCompositionPos().
Get the current input text buffer.
Reimplemented in IConsoleWindow.
Definition at line 365 of file window.cpp.
References GetQueryString(), NWidgetCore::index, nested_focus, NWidgetBase::type, and WWT_EDITBOX.
QueryString * Window::GetQueryString | ( | WidgetID | widnum | ) |
Return the querystring associated to a editbox.
widnum | Editbox widget index |
Definition at line 345 of file window.cpp.
References querystrings.
const QueryString * Window::GetQueryString | ( | WidgetID | widnum | ) | const |
Return the querystring associated to a editbox.
widnum | Editbox widget index |
Definition at line 334 of file window.cpp.
References querystrings.
Referenced by DispatchLeftClickEvent(), NWidgetLeaf::Draw(), GetCaretPosition(), GetFocusedTextbuf(), GetTextBoundingRect(), GetTextCharacterAtPosition(), HandleEditBoxKey(), and InsertTextString().
int Window::GetRowFromWidget | ( | int | clickpos, |
WidgetID | widget, | ||
int | padding, | ||
int | line_height = -1 |
||
) | const |
Compute the row of a widget that a user clicked in.
clickpos | Vertical position of the mouse click. |
widget | Widget number of the widget clicked in. |
padding | Amount of empty space between the widget edge and the top of the first row. |
line_height | Height of a single row. A negative value means using the vertical resize step of the widget. |
Definition at line 213 of file window.cpp.
References GetWidget().
Referenced by TextfileWindow::CheckHyperlinkClick(), Scrollbar::GetScrolledRowFromWidget(), BaseGraphWindow::OnClick(), MusicTrackSelectionWindow::OnClick(), TownAuthorityWindow::OnClick(), and NetworkClientListWindow::OnMouseOver().
Return the Scrollbar to a widget index.
widnum | Scrollbar widget index |
Definition at line 324 of file window.cpp.
References GetWidget().
Return the Scrollbar to a widget index.
widnum | Scrollbar widget index |
Definition at line 314 of file window.cpp.
References GetWidget().
Referenced by PickerWindow::BuildPickerClassList(), TextfileWindow::CheckHyperlinkClick(), DispatchMouseWheelEvent(), FramerateWindow::DrawElementTimesColumn(), FramerateWindow::DrawWidget(), PickerWindow::DrawWidget(), DropdownWindow::DropdownWindow(), TextfileWindow::NavigateHistory(), TextfileWindow::NavigateToFile(), NetworkContentListWindow::NetworkContentListWindow(), FramerateWindow::OnClick(), FramerateWindow::OnResize(), PickerWindow::OnResize(), SavePresetWindow::SavePresetWindow(), ScriptDebugWindow::ScriptDebugWindow(), ScriptListWindow::ScriptListWindow(), ScriptSettingsWindow::ScriptSettingsWindow(), TextfileWindow::UpdateHistoryScrollpos(), and VehicleDetailsWindow::VehicleDetailsWindow().
Get the bounding rectangle for a text range if an edit box has the focus.
from | Start of the string range. |
to | End of the string range. |
Reimplemented in IConsoleWindow.
Definition at line 394 of file window.cpp.
References QueryString::GetBoundingRect(), GetQueryString(), NWidgetCore::index, nested_focus, NWidgetBase::type, and WWT_EDITBOX.
Get the character that is rendered at a position by the focused edit box.
pt | The position to test. |
Reimplemented in IConsoleWindow.
Definition at line 409 of file window.cpp.
References QueryString::GetCharAtPosition(), GetQueryString(), NWidgetCore::index, nested_focus, NWidgetBase::type, and WWT_EDITBOX.
|
inline |
Get the nested widget with number widnum from the nested widget tree.
NWID | Type of the nested widget. |
widnum | Widget number of the widget to retrieve. |
nullptr
otherwise. Definition at line 952 of file window_gui.h.
References GetWidget(), and widget_lookup.
|
inline |
Get the nested widget with number widnum from the nested widget tree.
NWID | Type of the nested widget. |
widnum | Widget number of the widget to retrieve. |
nullptr
otherwise. Definition at line 977 of file window_gui.h.
References GetWidget().
Referenced by NewGRFWindow::AddGRFToActive(), GameManualTextfileWindow::AfterLoadChangelog(), TextfileWindow::AfterLoadMarkdown(), TextfileWindow::AfterLoadText(), BuildAirToolbarWindow::AirportToolbarGlobalHotkeys(), TextfileWindow::AppendHistory(), BaseVehicleListWindow::BuildActionDropdownList(), TimetableWindow::BuildArrivalDepartureList(), BaseVehicleListWindow::BuildCargoDropDownList(), StationViewWindow::BuildCargoList(), NetworkContentListWindow::BuildContentList(), StoryBookWindow::BuildDropDownList(), GameOptionsWindow::BuildDropDownList(), StationViewWindow::BuildFlowList(), NetworkGameWindow::BuildGUINetworkGameList(), BuildObjectWindow::BuildObjectGlobalHotkeys(), PickerWindow::BuildPickerClassList(), PickerWindow::BuildPickerTypeList(), BuildRailStationWindow::BuildRailStationGlobalHotkeys(), RefitWindow::BuildRefitList(), CompanyStationsWindow::BuildStationsList(), ScriptLeagueWindow::BuildTable(), IndustryCargoesWindow::CalculatePositionInWidget(), NewGRFWindow::CanUpgradeCurrent(), ScriptDebugWindow::ChangeToScript(), TextfileWindow::CheckHyperlinkClick(), BuildRailStationWindow::CheckSelectedSize(), Close(), DropdownWindow::Close(), QueryStringWindow::Close(), NetworkContentDownloadStatusWindow::Close(), SelectStationWindow< T >::Close(), IndustryCargoesWindow::ComputeCargoDisplay(), VehicleGroupWindow::ComputeGroupInfoSize(), IndustryCargoesWindow::ComputeIndustryDisplay(), GoalListWindow::CountLines(), SubsidyListWindow::CountLines(), IndustryCargoesWindow::CountMatchingAcceptingIndustries(), IndustryCargoesWindow::CountMatchingProducingIndustries(), CreateNestedTree(), DepotWindow::DepotClick(), DisableAllWidgetHighlight(), DisableWidget(), BuildDocksToolbarWindow::DockToolbarGlobalHotkeys(), StationViewWindow::DrawAcceptedCargo(), StoryBookWindow::DrawActionElement(), TownAuthorityWindow::DrawActions(), TimetableWindow::DrawArrivalDeparturePanel(), NetworkClientListWindow::DrawButtons(), StationViewWindow::DrawCargoRatings(), NetworkClientListWindow::DrawCompany(), CompanyInfrastructureWindow::DrawCountLine(), NetworkContentListWindow::DrawDetails(), FramerateWindow::DrawElementTimesColumn(), StationViewWindow::DrawEntries(), BaseGraphWindow::DrawGraph(), VehicleGroupWindow::DrawGroupInfo(), IndustryViewWindow::DrawInfo(), GoalListWindow::DrawListColumn(), NewGRFInspectWindow::DrawMainPanelWidget(), NetworkContentListWindow::DrawMatrix(), TownAuthorityWindow::DrawRatings(), NetworkGameWindow::DrawServerLine(), BuildSignalWindow::DrawSignalSprite(), DrawSortButtonState(), NewGRFInspectWindow::DrawString(), TimetableWindow::DrawSummaryPanel(), TimetableWindow::DrawTimetablePanel(), NewGRFInspectWindow::DrawVehicleChainWidget(), VehicleDetailsWindow::DrawVehicleDetails(), DepotWindow::DrawVehicleInDepot(), BaseVehicleListWindow::DrawVehicleListItems(), DrawViewport(), AIConfigWindow::DrawWidget(), BuildAirportWindow::DrawWidget(), ReplaceVehicleWindow::DrawWidget(), BootstrapErrorWindow::DrawWidget(), BootstrapAskForDownloadWindow::DrawWidget(), BuildBridgeWindow::DrawWidget(), CheatWindow::DrawWidget(), CompanyFinancesWindow::DrawWidget(), SelectCompanyLiveryWindow::DrawWidget(), CompanyInfrastructureWindow::DrawWidget(), CompanyWindow::DrawWidget(), BuyCompanyWindow::DrawWidget(), DepotWindow::DrawWidget(), BuildDocksDepotWindow::DrawWidget(), DropdownWindow::DrawWidget(), EnginePreviewWindow::DrawWidget(), ErrmsgWindow::DrawWidget(), SaveLoadWindow::DrawWidget(), FramerateWindow::DrawWidget(), FrametimeGraphWindow::DrawWidget(), GSConfigWindow::DrawWidget(), GenerateProgressWindow::DrawWidget(), GoalQuestionWindow::DrawWidget(), GraphLegendWindow::DrawWidget(), BaseGraphWindow::DrawWidget(), PaymentRatesGraphWindow::DrawWidget(), PerformanceRatingDetailWindow::DrawWidget(), IndustryProductionGraphWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), BuildIndustryWindow::DrawWidget(), IndustryDirectoryWindow::DrawWidget(), IndustryCargoesWindow::DrawWidget(), SelectGameWindow::DrawWidget(), PerformanceLeagueWindow::DrawWidget(), ScriptLeagueWindow::DrawWidget(), LinkGraphLegendWindow::DrawWidget(), LandInfoWindow::DrawWidget(), AboutWindow::DrawWidget(), TooltipsWindow::DrawWidget(), MusicTrackSelectionWindow::DrawWidget(), MusicWindow::DrawWidget(), BaseNetworkContentDownloadStatusWindow::DrawWidget(), NetworkGameWindow::DrawWidget(), NetworkStartServerWindow::DrawWidget(), NetworkClientListWindow::DrawWidget(), NetworkJoinStatusWindow::DrawWidget(), NetworkAskRelayWindow::DrawWidget(), NetworkAskSurveyWindow::DrawWidget(), SpriteAlignerWindow::DrawWidget(), NewGRFParametersWindow::DrawWidget(), NewGRFWindow::DrawWidget(), SavePresetWindow::DrawWidget(), ScanProgressWindow::DrawWidget(), NewsWindow::DrawWidget(), MessageHistoryWindow::DrawWidget(), BuildObjectWindow::DrawWidget(), OrdersWindow::DrawWidget(), PickerWindow::DrawWidget(), BuildRailStationWindow::DrawWidget(), BuildRailDepotWindow::DrawWidget(), BuildRoadDepotWindow::DrawWidget(), BuildRoadStationWindow::DrawWidget(), ScriptListWindow::DrawWidget(), ScriptSettingsWindow::DrawWidget(), GameOptionsWindow::DrawWidget(), GameSettingsWindow::DrawWidget(), SignListWindow::DrawWidget(), CompanyStationsWindow::DrawWidget(), SelectStationWindow< T >::DrawWidget(), StatusBarWindow::DrawWidget(), StoryBookWindow::DrawWidget(), SubsidyListWindow::DrawWidget(), ScenarioEditorLandscapeGenerationWindow::DrawWidget(), TextfileWindow::DrawWidget(), ScenarioEditorToolbarWindow::DrawWidget(), TownAuthorityWindow::DrawWidget(), TownViewWindow::DrawWidget(), TownDirectoryWindow::DrawWidget(), TransparenciesWindow::DrawWidget(), RefitWindow::DrawWidget(), VehicleDetailsWindow::DrawWidget(), VehicleViewWindow::DrawWidget(), ScriptDebugWindow::DrawWidgetCompanyButton(), ScriptDebugWindow::DrawWidgetLog(), DrawWidgets(), DropdownWindow::DropdownWindow(), EnableWidget(), StoryBookWindow::EnsureStoryPageElementLayout(), StationViewWindow::EstimateDestinations(), BuildVehicleWindow::FilterByText(), NetworkContentListWindow::FilterContentList(), BuildVehicleWindow::FilterSingleEngine(), FindChildWindow(), TextfileWindow::FindHyperlinksInMarkdown(), FindWindowPlacementAndResize(), QueryWindow::FindWindowPlacementAndResize(), NetworkAskRelayWindow::FindWindowPlacementAndResize(), NetworkAskSurveyWindow::FindWindowPlacementAndResize(), StatusBarWindow::FindWindowPlacementAndResize(), FinishInitNested(), DropdownWindow::FitAvailableHeight(), ReplaceVehicleWindow::GenerateLists(), ReplaceVehicleWindow::GenerateReplaceRailList(), ReplaceVehicleWindow::GenerateReplaceVehList(), BaseVehicleListWindow::GetActionDropdownSize(), StoryBookWindow::GetAvailablePageContentWidth(), QueryString::GetBoundingRect(), BuildBridgeWindow::GetBridgeSelectString(), NetworkClientListWindow::GetButtonAtPoint(), RefitWindow::GetCapacityString(), GetCaretPosition(), IConsoleWindow::GetCaretPosition(), QueryString::GetCaretPosition(), IndustryDirectoryWindow::GetCargoTransportedSortValue(), WaypointWindow::GetCenterTile(), QueryString::GetCharAtPosition(), StoryBookWindow::GetContentHeight(), BaseGraphWindow::GetDataSetRange(), TownViewWindow::GetDesiredInfoHeight(), DropdownWindow::GetDropDownItem(), NewGRFParametersWindow::GetDummyParameterInfo(), StationViewWindow::GetEntryString(), NewGRFInspectWindow::GetFeatureIndex(), StoryBookWindow::GetHeadHeight(), BuildHouseWindow::GetHouseInformation(), BuildHouseWindow::GetHouseYear(), IndustryDirectoryWindow::GetIndustryListWidth(), IndustryDirectoryWindow::GetIndustryString(), OrdersWindow::GetOrderFromPt(), StoryBookWindow::GetPageElementHeight(), NewGRFParametersWindow::GetParameterInfo(), VehicleDetailsWindow::GetRoadVehDetailsHeight(), GetRowFromWidget(), GetScrollbar(), GetScrollbar(), StoryBookWindow::GetSelPageNum(), IConsoleWindow::GetTextBoundingRect(), IConsoleWindow::GetTextCharacterAtPosition(), EndGameHighScoreBaseWindow::GetTopLeft(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), TownDirectoryWindow::GetTownString(), BaseGraphWindow::GetValuesInterval(), GetWidget(), GetWidget(), LinkGraphOverlay::GetWidgetDpi(), BaseGraphWindow::GetYLabelWidth(), HandleActiveWidget(), StationViewWindow::HandleCargoWaitingClick(), GoalListWindow::HandleClick(), HandleScrollbarScrolling(), IndustryCargoesWindow::HasCommonValidCargo(), NewGRFParametersWindow::HasParameterInfo(), IndustryCargoesWindow::HousesCanAccept(), IndustryCargoesWindow::HousesCanSupply(), IndustryDirectoryWindow::IndustryProductionSorter(), IndustryDirectoryWindow::IndustryTypeSorter(), InitializeData(), InitializePositionSize(), InsertTextString(), IConsoleWindow::InsertTextString(), InvalidateData(), StoryBookWindow::IsFirstPageSelected(), StoryBookWindow::IsLastPageSelected(), VehicleDetailsWindow::IsVehicleServiceIntervalEnabled(), IsWidgetDisabled(), IsWidgetFocused(), IsWidgetGloballyFocused(), IsWidgetHighlighted(), IsWidgetLowered(), TextfileWindow::LoadText(), TextfileWindow::LoadTextfile(), LowerWidget(), BuildIndustryWindow::MakeCargoListString(), TextfileWindow::NavigateToFile(), NetworkChatWindow::NetworkChatWindow(), NetworkContentListWindow::NetworkContentListWindow(), AIConfigWindow::OnClick(), BuildAirportWindow::OnClick(), ReplaceVehicleWindow::OnClick(), BuildBridgeWindow::OnClick(), BuildVehicleWindow::OnClick(), CheatWindow::OnClick(), CompanyFinancesWindow::OnClick(), SelectCompanyLiveryWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), CompanyWindow::OnClick(), BuyCompanyWindow::OnClick(), SetDateWindow::OnClick(), DepotWindow::OnClick(), EnginePreviewWindow::OnClick(), SaveLoadWindow::OnClick(), FramerateWindow::OnClick(), GSConfigWindow::OnClick(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), GenerateProgressWindow::OnClick(), GoalListWindow::OnClick(), BaseGraphWindow::OnClick(), PerformanceHistoryGraphWindow::OnClick(), PaymentRatesGraphWindow::OnClick(), IndustryProductionGraphWindow::OnClick(), VehicleGroupWindow::OnClick(), BuildIndustryWindow::OnClick(), IndustryViewWindow::OnClick(), IndustryDirectoryWindow::OnClick(), IndustryCargoesWindow::OnClick(), SelectGameWindow::OnClick(), ScriptLeagueWindow::OnClick(), QueryStringWindow::OnClick(), MusicTrackSelectionWindow::OnClick(), MusicWindow::OnClick(), NetworkChatWindow::OnClick(), NetworkContentListWindow::OnClick(), NetworkGameWindow::OnClick(), NetworkStartServerWindow::OnClick(), NetworkClientListWindow::OnClick(), NewGRFInspectWindow::OnClick(), SpriteAlignerWindow::OnClick(), NewGRFParametersWindow::OnClick(), NewGRFWindow::OnClick(), SavePresetWindow::OnClick(), NewsWindow::OnClick(), MessageHistoryWindow::OnClick(), BuildObjectWindow::OnClick(), OrdersWindow::OnClick(), OskWindow::OnClick(), PickerWindow::OnClick(), BuildRailToolbarWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildRoadStationWindow::OnClick(), ScriptListWindow::OnClick(), ScriptSettingsWindow::OnClick(), ScriptDebugWindow::OnClick(), GameOptionsWindow::OnClick(), GameSettingsWindow::OnClick(), CustomCurrencyWindow::OnClick(), SignListWindow::OnClick(), SignWindow::OnClick(), CompanyStationsWindow::OnClick(), StationViewWindow::OnClick(), SelectStationWindow< T >::OnClick(), StoryBookWindow::OnClick(), SubsidyListWindow::OnClick(), ScenarioEditorLandscapeGenerationWindow::OnClick(), TextfileWindow::OnClick(), TimetableWindow::OnClick(), ScenarioEditorToolbarWindow::OnClick(), TownAuthorityWindow::OnClick(), TownViewWindow::OnClick(), TownDirectoryWindow::OnClick(), FoundTownWindow::OnClick(), TransparenciesWindow::OnClick(), BuildTreesWindow::OnClick(), RefitWindow::OnClick(), VehicleListWindow::OnClick(), VehicleDetailsWindow::OnClick(), VehicleViewWindow::OnClick(), WaypointWindow::OnClick(), NetworkClientListWindow::OnClickClientAdmin(), NetworkClientListWindow::OnClickCompanyAdmin(), NetworkClientListWindow::OnClickCompanyChat(), NetworkClientListWindow::OnClickCompanyJoin(), NetworkContentListWindow::OnConnect(), NetworkContentDownloadStatusWindow::OnDownloadProgress(), BaseNetworkContentDownloadStatusWindow::OnDownloadProgress(), DepotWindow::OnDragDrop(), VehicleGroupWindow::OnDragDrop(), NewGRFWindow::OnDragDrop(), OrdersWindow::OnDragDrop(), RefitWindow::OnDragDrop(), OnDropdownClose(), NetworkClientListWindow::OnDropdownClose(), GameSettingsWindow::OnDropdownClose(), GSConfigWindow::OnDropdownClose(), NewGRFParametersWindow::OnDropdownClose(), ScriptSettingsWindow::OnDropdownClose(), CompanyStationsWindow::OnDropdownSelect(), ReplaceVehicleWindow::OnDropdownSelect(), SelectCompanyLiveryWindow::OnDropdownSelect(), GSConfigWindow::OnDropdownSelect(), GenerateLandscapeWindow::OnDropdownSelect(), VehicleGroupWindow::OnDropdownSelect(), NetworkClientListWindow::OnDropdownSelect(), NewGRFParametersWindow::OnDropdownSelect(), NewGRFWindow::OnDropdownSelect(), OrdersWindow::OnDropdownSelect(), ScriptSettingsWindow::OnDropdownSelect(), GameOptionsWindow::OnDropdownSelect(), GameSettingsWindow::OnDropdownSelect(), MainToolbarWindow::OnDropdownSelect(), ScenarioEditorToolbarWindow::OnDropdownSelect(), VehicleListWindow::OnDropdownSelect(), VehicleDetailsWindow::OnDropdownSelect(), BuildVehicleWindow::OnEditboxChanged(), SaveLoadWindow::OnEditboxChanged(), IndustryDirectoryWindow::OnEditboxChanged(), NetworkContentListWindow::OnEditboxChanged(), NetworkGameWindow::OnEditboxChanged(), PickerWindow::OnEditboxChanged(), ScriptDebugWindow::OnEditboxChanged(), GameSettingsWindow::OnEditboxChanged(), TownDirectoryWindow::OnEditboxChanged(), DropdownWindow::OnFocusLost(), OskWindow::OnFocusLost(), VehicleGroupWindow::OnGameTick(), CompanyStationsWindow::OnGameTick(), VehicleListWindow::OnGameTick(), OnHotkey(), BuildVehicleWindow::OnHotkey(), IndustryDirectoryWindow::OnHotkey(), MainWindow::OnHotkey(), OrdersWindow::OnHotkey(), PickerWindow::OnHotkey(), BuildRailToolbarWindow::OnHotkey(), BuildRoadToolbarWindow::OnHotkey(), SignListWindow::OnHotkey(), MainToolbarWindow::OnHotkey(), ScenarioEditorToolbarWindow::OnHotkey(), TownDirectoryWindow::OnHotkey(), VehicleViewWindow::OnHotkey(), TextfileWindow::OnHyperlinkClick(), SelectCompanyManagerFaceWindow::OnInit(), IndustryCargoesWindow::OnInit(), SelectGameWindow::OnInit(), LandInfoWindow::OnInit(), BuildObjectWindow::OnInit(), BuildRailToolbarWindow::OnInit(), BuildSignalWindow::OnInit(), BuildRoadToolbarWindow::OnInit(), ScriptDebugWindow::OnInit(), SignListWindow::OnInit(), TerraformToolbarWindow::OnInit(), FoundTownWindow::OnInit(), BaseVehicleListWindow::OnInit(), OnInitialPosition(), BuildBridgeWindow::OnInitialPosition(), SetDateWindow::OnInitialPosition(), ErrmsgWindow::OnInitialPosition(), TooltipsWindow::OnInitialPosition(), NetworkChatWindow::OnInitialPosition(), NewsWindow::OnInitialPosition(), StatusBarWindow::OnInitialPosition(), TerraformToolbarWindow::OnInitialPosition(), TransparenciesWindow::OnInitialPosition(), AIConfigWindow::OnInvalidateData(), BuildAirToolbarWindow::OnInvalidateData(), BuildVehicleWindow::OnInvalidateData(), SelectCompanyLiveryWindow::OnInvalidateData(), CompanyInfrastructureWindow::OnInvalidateData(), CompanyWindow::OnInvalidateData(), BuildDocksToolbarWindow::OnInvalidateData(), EnginePreviewWindow::OnInvalidateData(), SaveLoadWindow::OnInvalidateData(), GSConfigWindow::OnInvalidateData(), GenerateLandscapeWindow::OnInvalidateData(), GoalListWindow::OnInvalidateData(), GraphLegendWindow::OnInvalidateData(), BaseGraphWindow::OnInvalidateData(), PaymentRatesGraphWindow::OnInvalidateData(), PerformanceRatingDetailWindow::OnInvalidateData(), VehicleGroupWindow::OnInvalidateData(), BuildIndustryWindow::OnInvalidateData(), IndustryViewWindow::OnInvalidateData(), IndustryCargoesWindow::OnInvalidateData(), SelectGameWindow::OnInvalidateData(), MainWindow::OnInvalidateData(), LandInfoWindow::OnInvalidateData(), MusicTrackSelectionWindow::OnInvalidateData(), MusicWindow::OnInvalidateData(), NetworkContentListWindow::OnInvalidateData(), NetworkClientListWindow::OnInvalidateData(), NewGRFInspectWindow::OnInvalidateData(), SpriteAlignerWindow::OnInvalidateData(), NewGRFParametersWindow::OnInvalidateData(), NewGRFWindow::OnInvalidateData(), NewsWindow::OnInvalidateData(), MessageHistoryWindow::OnInvalidateData(), BuildObjectWindow::OnInvalidateData(), OrdersWindow::OnInvalidateData(), OskWindow::OnInvalidateData(), PickerWindow::OnInvalidateData(), BuildRailToolbarWindow::OnInvalidateData(), BuildRailStationWindow::OnInvalidateData(), BuildSignalWindow::OnInvalidateData(), BuildRoadToolbarWindow::OnInvalidateData(), BuildRoadStationWindow::OnInvalidateData(), ScriptListWindow::OnInvalidateData(), ScriptTextfileWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), GameOptionsWindow::OnInvalidateData(), GameSettingsWindow::OnInvalidateData(), StationViewWindow::OnInvalidateData(), SelectStationWindow< T >::OnInvalidateData(), StatusBarWindow::OnInvalidateData(), StoryBookWindow::OnInvalidateData(), SubsidyListWindow::OnInvalidateData(), TextfileWindow::OnInvalidateData(), TimetableWindow::OnInvalidateData(), MainToolbarWindow::OnInvalidateData(), ScenarioEditorToolbarWindow::OnInvalidateData(), TownAuthorityWindow::OnInvalidateData(), TownViewWindow::OnInvalidateData(), FoundTownWindow::OnInvalidateData(), BuildHouseWindow::OnInvalidateData(), TransparenciesWindow::OnInvalidateData(), RefitWindow::OnInvalidateData(), VehicleListWindow::OnInvalidateData(), VehicleDetailsWindow::OnInvalidateData(), ExtraViewportWindow::OnInvalidateData(), WaypointWindow::OnInvalidateData(), BuildBridgeWindow::OnKeyPress(), IConsoleWindow::OnKeyPress(), QueryWindow::OnKeyPress(), NetworkContentListWindow::OnKeyPress(), NetworkGameWindow::OnKeyPress(), NewGRFWindow::OnKeyPress(), DepotWindow::OnMouseDrag(), VehicleGroupWindow::OnMouseDrag(), NewGRFWindow::OnMouseDrag(), OrdersWindow::OnMouseDrag(), RefitWindow::OnMouseDrag(), DropdownWindow::OnMouseLoop(), SaveLoadWindow::OnMouseOver(), SelectStationWindow< T >::OnMouseOver(), VehicleViewWindow::OnMouseOver(), MainWindow::OnMouseWheel(), BuildAirportWindow::OnPaint(), ReplaceVehicleWindow::OnPaint(), BuildVehicleWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), SelectCompanyLiveryWindow::OnPaint(), CompanyWindow::OnPaint(), IConsoleWindow::OnPaint(), DepotWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), GoalListWindow::OnPaint(), VehicleGroupWindow::OnPaint(), EndGameWindow::OnPaint(), HighScoreWindow::OnPaint(), IndustryViewWindow::OnPaint(), MainWindow::OnPaint(), NetworkContentListWindow::OnPaint(), NetworkGameWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), GameSettingsWindow::OnPaint(), StationViewWindow::OnPaint(), StoryBookWindow::OnPaint(), TimetableWindow::OnPaint(), RefitWindow::OnPaint(), VehicleListWindow::OnPaint(), VehicleDetailsWindow::OnPaint(), VehicleViewWindow::OnPaint(), BuildAirToolbarWindow::OnPlaceDrag(), BuildDocksToolbarWindow::OnPlaceDrag(), BuildObjectWindow::OnPlaceDrag(), BuildRailToolbarWindow::OnPlaceDrag(), BuildRoadToolbarWindow::OnPlaceDrag(), TerraformToolbarWindow::OnPlaceDrag(), ScenarioEditorLandscapeGenerationWindow::OnPlaceDrag(), BuildTreesWindow::OnPlaceDrag(), BuildAirToolbarWindow::OnPlaceMouseUp(), BuildDocksToolbarWindow::OnPlaceMouseUp(), BuildObjectWindow::OnPlaceMouseUp(), BuildRailToolbarWindow::OnPlaceMouseUp(), BuildRoadToolbarWindow::OnPlaceMouseUp(), TerraformToolbarWindow::OnPlaceMouseUp(), ScenarioEditorLandscapeGenerationWindow::OnPlaceMouseUp(), BuildTreesWindow::OnPlaceMouseUp(), CompanyWindow::OnPlaceObject(), BuildDocksToolbarWindow::OnPlaceObject(), BuildIndustryWindow::OnPlaceObject(), BuildObjectWindow::OnPlaceObject(), OrdersWindow::OnPlaceObject(), BuildRailToolbarWindow::OnPlaceObject(), BuildRoadToolbarWindow::OnPlaceObject(), FoundTownWindow::OnPlaceObject(), BuildHouseWindow::OnPlaceObject(), BuildDocksToolbarWindow::OnPlacePresize(), BuildVehicleWindow::OnQueryTextFinished(), CheatWindow::OnQueryTextFinished(), SelectCompanyManagerFaceWindow::OnQueryTextFinished(), CompanyWindow::OnQueryTextFinished(), DepotWindow::OnQueryTextFinished(), GSConfigWindow::OnQueryTextFinished(), GenerateLandscapeWindow::OnQueryTextFinished(), CreateScenarioWindow::OnQueryTextFinished(), VehicleGroupWindow::OnQueryTextFinished(), IndustryViewWindow::OnQueryTextFinished(), NetworkStartServerWindow::OnQueryTextFinished(), NetworkJoinStatusWindow::OnQueryTextFinished(), SpriteAlignerWindow::OnQueryTextFinished(), NewGRFParametersWindow::OnQueryTextFinished(), NewGRFWindow::OnQueryTextFinished(), OrdersWindow::OnQueryTextFinished(), ScriptSettingsWindow::OnQueryTextFinished(), GameSettingsWindow::OnQueryTextFinished(), CustomCurrencyWindow::OnQueryTextFinished(), StationViewWindow::OnQueryTextFinished(), TimetableWindow::OnQueryTextFinished(), ScenarioEditorToolbarWindow::OnQueryTextFinished(), TownViewWindow::OnQueryTextFinished(), VehicleViewWindow::OnQueryTextFinished(), WaypointWindow::OnQueryTextFinished(), FramerateWindow::OnRealtimeTick(), SelectGameWindow::OnRealtimeTick(), NewsWindow::OnRealtimeTick(), NetworkContentListWindow::OnReceiveContentInfo(), CompanyWindow::OnResize(), DepotWindow::OnResize(), FramerateWindow::OnResize(), IndustryViewWindow::OnResize(), SelectGameWindow::OnResize(), MainWindow::OnResize(), NewsWindow::OnResize(), GameOptionsWindow::OnResize(), TownViewWindow::OnResize(), VehicleDetailsWindow::OnResize(), VehicleViewWindow::OnResize(), ExtraViewportWindow::OnResize(), WaypointWindow::OnResize(), DepotWindow::OnRightClick(), MainWindow::OnScroll(), ExtraViewportWindow::OnScroll(), DepotWindow::OnTimeout(), SaveLoadWindow::OnTimeout(), ScenarioEditorLandscapeGenerationWindow::OnTimeout(), ReplaceVehicleWindow::OnTooltip(), IndustryCargoesWindow::OnTooltip(), LinkGraphLegendWindow::OnTooltip(), NetworkClientListWindow::OnTooltip(), BuildRailToolbarWindow::OnTooltip(), VehicleDetailsWindow::OnTooltip(), DepotWindow::OnVehicleSelect(), DepotWindow::OnVehicleSelect(), OrdersWindow::OnVehicleSelect(), NetworkContentListWindow::OpenExternalSearch(), OrdersWindow::OrderClick_Delete(), OrdersWindow::OrderClick_FullLoad(), OrdersWindow::OrderClick_Goto(), OrdersWindow::OrderClick_NearestDepot(), OrdersWindow::OrderClick_Nonstop(), OrdersWindow::OrderClick_Refit(), OrdersWindow::OrderClick_Service(), OrdersWindow::OrderClick_Skip(), OrdersWindow::OrderClick_StopSharing(), OrdersWindow::OrderClick_Unload(), OrdersWindow::OrderGetSel(), PerformanceLeagueWindow::PerformanceSorter(), IndustryCargoesWindow::PlaceIndustry(), ProcessHighlightedInvalidations(), BuildRailToolbarWindow::RailToolbarGlobalHotkeys(), RaiseButtons(), RaiseWidget(), RaiseWidgetsWhenLowered(), SelectGameWindow::ReadIntroGameViewportCommands(), NetworkClientListWindow::RebuildList(), NetworkClientListWindow::RebuildListCompany(), GSConfigWindow::RebuildVisibleSettings(), ScriptSettingsWindow::RebuildVisibleSettings(), StationViewWindow::RecalcDestinations(), TextfileWindow::ReflowContent(), MainWindow::RefreshLinkGraph(), RefitWindow::RefreshScrollbar(), StoryBookWindow::RefreshSelectedPage(), ReInit(), ReplaceVehicleWindow::ReplaceClick_StartReplace(), BuildRoadToolbarWindow::RoadTramToolbarGlobalHotkeys(), SavePresetWindow::SavePresetWindow(), FrametimeGraphWindow::Scinterlate(), ScriptDebugWindow::ScriptDebugGlobalHotkeys(), ScriptDebugWindow::ScriptDebugWindow(), IConsoleWindow::Scroll(), StationViewWindow::SearchNonStop(), SelectCompanyManagerFaceWindow::SelectDisplayPlanes(), BuildAirportWindow::SelectFirstAvailableAirport(), VehicleGroupWindow::SelectGroup(), StationViewWindow::SelectGroupBy(), StoryBookWindow::SelectNextPage(), VehicleViewWindow::SelectPlane(), StoryBookWindow::SelectPrevPage(), StationViewWindow::SelectSortBy(), IndustryDirectoryWindow::SetAcceptedCargoFilter(), Scrollbar::SetCapacityFromWidget(), BaseVehicleListWindow::SetCargoFilter(), IndustryDirectoryWindow::SetCargoFilterArray(), LinkGraphOverlay::SetCargoMask(), LinkGraphOverlay::SetCompanyMask(), SetDateWindow::SetDateWindow(), SelectCompanyManagerFaceWindow::SetFaceStringParameters(), SignListWindow::SetFilterString(), SetFocusedWidget(), TextfileWindow::SetFontNames(), IndustryDirectoryWindow::SetProducedCargoFilter(), StoryBookWindow::SetSelectedPage(), RefitWindow::SetSelection(), SetShaded(), BuildSignalWindow::SetSignalUIMode(), BuildAirportWindow::SetStringParameters(), ReplaceVehicleWindow::SetStringParameters(), BuildVehicleWindow::SetStringParameters(), SelectCompanyLiveryWindow::SetStringParameters(), CompanyWindow::SetStringParameters(), BuyCompanyWindow::SetStringParameters(), SetDateWindow::SetStringParameters(), FrametimeGraphWindow::SetStringParameters(), GenerateLandscapeWindow::SetStringParameters(), GoalListWindow::SetStringParameters(), GoalQuestionWindow::SetStringParameters(), VehicleGroupWindow::SetStringParameters(), BuildIndustryWindow::SetStringParameters(), IndustryCargoesWindow::SetStringParameters(), MusicTrackSelectionWindow::SetStringParameters(), NetworkStartServerWindow::SetStringParameters(), NetworkClientListWindow::SetStringParameters(), SpriteAlignerWindow::SetStringParameters(), NewGRFTextfileWindow::SetStringParameters(), NewGRFWindow::SetStringParameters(), BuildObjectWindow::SetStringParameters(), OrdersWindow::SetStringParameters(), BuildRailToolbarWindow::SetStringParameters(), BuildRoadToolbarWindow::SetStringParameters(), ScriptListWindow::SetStringParameters(), ScriptSettingsWindow::SetStringParameters(), ScriptTextfileWindow::SetStringParameters(), ScriptDebugWindow::SetStringParameters(), GameOptionsWindow::SetStringParameters(), GameSettingsWindow::SetStringParameters(), CustomCurrencyWindow::SetStringParameters(), CompanyStationsWindow::SetStringParameters(), StoryBookWindow::SetStringParameters(), TimetableWindow::SetStringParameters(), VehicleListWindow::SetStringParameters(), TextfileWindow::SetupScrollbars(), DepotWindow::SetupWidgetData(), CompanyFinancesWindow::SetupWidgets(), SetWidgetDisabledState(), SetWidgetHighlight(), SetWidgetLoweredState(), SetWidgetsDisabledState(), SetWidgetsLoweredState(), NewsWindow::SetWindowTop(), IndustryCargoesWindow::ShortenCargoColumn(), StationViewWindow::ShowCargo(), SetDateWindow::ShowDateDropDown(), ShowDropDownList(), SignListWindow::SignListGlobalHotkeys(), BuildBridgeWindow::SortBridgeList(), NetworkContentListWindow::SortContentList(), CompanyStationsWindow::StationRatingMaxSorter(), CompanyStationsWindow::StationRatingMinSorter(), CompanyStationsWindow::StationWaitingAvailableSorter(), CompanyStationsWindow::StationWaitingTotalSorter(), ScenarioEditorLandscapeGenerationWindow::TerraformToolbarEditorGlobalHotkeys(), TerraformToolbarWindow::TerraformToolbarGlobalHotkeys(), ToggleWidgetLoweredState(), TownDirectoryWindow::TownPopulationSorter(), TownDirectoryWindow::TownRatingSorter(), ScriptDebugWindow::UpdateAIButtonsState(), BuildObjectWindow::UpdateButtons(), NetworkContentListWindow::UpdateFilterState(), ScriptDebugWindow::UpdateGSButtonState(), ScriptDebugWindow::UpdateLogScroll(), BuildTreesWindow::UpdateMode(), ScanProgressWindow::UpdateNewGRFScanStatus(), OskWindow::UpdateOskState(), LinkGraphLegendWindow::UpdateOverlayCargoes(), LinkGraphLegendWindow::UpdateOverlayCompanies(), PaymentRatesGraphWindow::UpdatePaymentRates(), StoryBookWindow::UpdatePrevNextDisabledState(), FrametimeGraphWindow::UpdateScale(), TimetableWindow::UpdateSelectionStates(), DropdownWindow::UpdateSizeAndPosition(), BaseGraphWindow::UpdateStatistics(), IndustryProductionGraphWindow::UpdateStatistics(), BuildAirportWindow::UpdateWidgetSize(), ReplaceVehicleWindow::UpdateWidgetSize(), BootstrapErrorWindow::UpdateWidgetSize(), BootstrapAskForDownloadWindow::UpdateWidgetSize(), BuildBridgeWindow::UpdateWidgetSize(), BuildVehicleWindow::UpdateWidgetSize(), CheatWindow::UpdateWidgetSize(), CompanyFinancesWindow::UpdateWidgetSize(), SelectCompanyLiveryWindow::UpdateWidgetSize(), SelectCompanyManagerFaceWindow::UpdateWidgetSize(), CompanyInfrastructureWindow::UpdateWidgetSize(), CompanyWindow::UpdateWidgetSize(), BuyCompanyWindow::UpdateWidgetSize(), SetDateWindow::UpdateWidgetSize(), DepotWindow::UpdateWidgetSize(), EnginePreviewWindow::UpdateWidgetSize(), ErrmsgWindow::UpdateWidgetSize(), SaveLoadWindow::UpdateWidgetSize(), FramerateWindow::UpdateWidgetSize(), FrametimeGraphWindow::UpdateWidgetSize(), GenerateLandscapeWindow::UpdateWidgetSize(), CreateScenarioWindow::UpdateWidgetSize(), GenerateProgressWindow::UpdateWidgetSize(), GoalListWindow::UpdateWidgetSize(), GoalQuestionWindow::UpdateWidgetSize(), BaseGraphWindow::UpdateWidgetSize(), PaymentRatesGraphWindow::UpdateWidgetSize(), PerformanceRatingDetailWindow::UpdateWidgetSize(), IndustryProductionGraphWindow::UpdateWidgetSize(), VehicleGroupWindow::UpdateWidgetSize(), BuildIndustryWindow::UpdateWidgetSize(), IndustryDirectoryWindow::UpdateWidgetSize(), IndustryCargoesWindow::UpdateWidgetSize(), PerformanceLeagueWindow::UpdateWidgetSize(), ScriptLeagueWindow::UpdateWidgetSize(), LinkGraphLegendWindow::UpdateWidgetSize(), LandInfoWindow::UpdateWidgetSize(), AboutWindow::UpdateWidgetSize(), QueryStringWindow::UpdateWidgetSize(), MusicTrackSelectionWindow::UpdateWidgetSize(), MusicWindow::UpdateWidgetSize(), NetworkContentListWindow::UpdateWidgetSize(), BaseNetworkContentDownloadStatusWindow::UpdateWidgetSize(), NetworkGameWindow::UpdateWidgetSize(), NetworkStartServerWindow::UpdateWidgetSize(), NetworkClientListWindow::UpdateWidgetSize(), NetworkJoinStatusWindow::UpdateWidgetSize(), NetworkAskRelayWindow::UpdateWidgetSize(), NetworkAskSurveyWindow::UpdateWidgetSize(), NewGRFInspectWindow::UpdateWidgetSize(), SpriteAlignerWindow::UpdateWidgetSize(), NewGRFParametersWindow::UpdateWidgetSize(), NewGRFWindow::UpdateWidgetSize(), SavePresetWindow::UpdateWidgetSize(), ScanProgressWindow::UpdateWidgetSize(), NewsWindow::UpdateWidgetSize(), MessageHistoryWindow::UpdateWidgetSize(), BuildObjectWindow::UpdateWidgetSize(), OrdersWindow::UpdateWidgetSize(), PickerWindow::UpdateWidgetSize(), BuildRailStationWindow::UpdateWidgetSize(), BuildSignalWindow::UpdateWidgetSize(), BuildRoadStationWindow::UpdateWidgetSize(), GameOptionsWindow::UpdateWidgetSize(), GameSettingsWindow::UpdateWidgetSize(), CustomCurrencyWindow::UpdateWidgetSize(), SignListWindow::UpdateWidgetSize(), CompanyStationsWindow::UpdateWidgetSize(), StationViewWindow::UpdateWidgetSize(), SelectStationWindow< T >::UpdateWidgetSize(), StatusBarWindow::UpdateWidgetSize(), StoryBookWindow::UpdateWidgetSize(), SubsidyListWindow::UpdateWidgetSize(), TimetableWindow::UpdateWidgetSize(), ScenarioEditorToolbarWindow::UpdateWidgetSize(), TownAuthorityWindow::UpdateWidgetSize(), TownDirectoryWindow::UpdateWidgetSize(), BuildTreesWindow::UpdateWidgetSize(), VehicleListWindow::UpdateWidgetSize(), VehicleDetailsWindow::UpdateWidgetSize(), NewGRFWindow::UpgradeCurrent(), NewGRFInspectWindow::ValidateChainIndex(), WaypointWindow::WaypointWindow(), and ~Window().
|
inline |
Specialized case of Window::GetWidget for the nested widget base class.
Definition at line 963 of file window_gui.h.
References widget_lookup.
Do all things to make a button look clicked and mark it to be unclicked in a few ticks.
widget | the widget to "click" |
Definition at line 590 of file window.cpp.
References LowerWidget(), SetTimeout(), and SetWidgetDirty().
Referenced by DispatchLeftClickEvent(), ReplaceVehicleWindow::OnClick(), SaveLoadWindow::OnClick(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), BuildIndustryWindow::OnClick(), NetworkStartServerWindow::OnClick(), ScenarioEditorLandscapeGenerationWindow::OnClick(), and DepotWindow::OnDragDrop().
EventState Window::HandleEditBoxKey | ( | WidgetID | wid, |
char32_t | key, | ||
uint16_t | keycode | ||
) |
Process keypress for editbox widget.
wid | Editbox widget. |
key | the Unicode value of the key. |
keycode | the untranslated key code including shift state. |
Definition at line 2480 of file window.cpp.
References QueryString::ACTION_CLEAR, QueryString::ACTION_DESELECT, QueryString::ACTION_NOTHING, Textbuf::bytes, QueryString::cancel_button, Textbuf::DeleteAll(), ES_HANDLED, ES_NOT_HANDLED, GetQueryString(), HKPR_CANCEL, HKPR_CONFIRM, HKPR_CURSOR, HKPR_EDITING, HKPR_NOT_HANDLED, InvalidateData(), QueryString::ok_button, OnClick(), OnEditboxChanged(), SetWidgetDirty(), UnfocusFocusedWidget(), WC_OSK, WID_OSK_CANCEL, WID_OSK_OK, and window_class.
Referenced by HandleKeypress().
|
protected |
Initializes the data (except the position and initial size) of a new Window.
window_number | Number being assigned to the new window |
nullptr
), nested_root and nested_array_size must be initialized. In addition, widget_lookup is either nullptr
, or already initialized. Definition at line 1364 of file window.cpp.
References _current_text_dir, BringWindowToFront(), WindowDesc::cls, WindowDesc::default_pos, EditBoxInGlobalFocus(), flags, GetWidget(), INVALID_OWNER, nested_focus, nested_root, OnInit(), owner, resize, SetFocusedWindow(), SetWhiteBorder(), ST_SMALLEST, ResizeInfo::step_height, ResizeInfo::step_width, TD_RTL, WC_DROPDOWN_MENU, WDP_CENTER, WF_CENTERED, window_class, window_desc, window_number, and WWT_EDITBOX.
Referenced by FinishInitNested().
Set the position and smallest size of the window.
x | Offset in pixels from the left of the screen of the new window. |
y | Offset in pixels from the top of the screen of the new window. |
sm_width | Smallest width in pixels of the window. |
sm_height | Smallest height in pixels of the window. |
Definition at line 1402 of file window.cpp.
References GetWidget(), height, left, top, and width.
Referenced by FinishInitNested(), and ReInit().
void Window::InitNested | ( | WindowNumber | window_number = 0 | ) |
Perform complete initialization of the Window with nested widgets, to allow use.
window_number | Number of the new window. |
Definition at line 1746 of file window.cpp.
References CreateNestedTree(), and FinishInitNested().
Referenced by BaseNetworkContentDownloadStatusWindow::BaseNetworkContentDownloadStatusWindow(), BootstrapAskForDownloadWindow::BootstrapAskForDownloadWindow(), ScanProgressWindow::ScanProgressWindow(), and SetDateWindow::SetDateWindow().
|
virtual |
Insert a text string at the cursor position into the edit box widget.
wid | Edit box widget. |
str | Text string to insert. |
Reimplemented in IConsoleWindow.
Definition at line 2638 of file window.cpp.
References GetQueryString(), GetWidget(), Textbuf::InsertString(), OnEditboxChanged(), and SetWidgetDirty().
Referenced by HandleTextInput().
Mark this window's data as invalid (in need of re-computing)
data | The data to invalidate with |
gui_scope | Whether the function is called from GUI scope. |
Definition at line 3159 of file window.cpp.
References GetWidget(), OnInvalidateData(), scheduled_invalidation_data, and SetDirty().
Referenced by NewGRFWindow::AddGRFToActive(), ScriptDebugWindow::ChangeToScript(), ChangeVehicleWindow(), DoZoomInOutWindow(), HandleEditBoxKey(), InvalidateWindowClassesData(), InvalidateWindowData(), NetworkContentListWindow::NetworkContentListWindow(), NewGRFConfirmationCallback(), AIConfigWindow::OnClick(), SaveLoadWindow::OnClick(), GSConfigWindow::OnClick(), GenerateLandscapeWindow::OnClick(), NetworkContentListWindow::OnClick(), NewGRFInspectWindow::OnClick(), SpriteAlignerWindow::OnClick(), NewGRFParametersWindow::OnClick(), NewGRFWindow::OnClick(), BuildObjectWindow::OnClick(), OskWindow::OnClick(), PickerWindow::OnClick(), BuildSignalWindow::OnClick(), ScriptDebugWindow::OnClick(), GameSettingsWindow::OnClick(), SignListWindow::OnClick(), TextfileWindow::OnClick(), RefitWindow::OnClick(), NetworkContentListWindow::OnConnect(), NetworkContentListWindow::OnDownloadComplete(), NewGRFWindow::OnDragDrop(), RefitWindow::OnDragDrop(), GenerateLandscapeWindow::OnDropdownSelect(), NewGRFWindow::OnDropdownSelect(), GameOptionsWindow::OnDropdownSelect(), GameSettingsWindow::OnDropdownSelect(), BuildVehicleWindow::OnEditboxChanged(), SaveLoadWindow::OnEditboxChanged(), IndustryDirectoryWindow::OnEditboxChanged(), NetworkContentListWindow::OnEditboxChanged(), PickerWindow::OnEditboxChanged(), GameSettingsWindow::OnEditboxChanged(), TownDirectoryWindow::OnEditboxChanged(), NewGRFWindow::OnEditboxChanged(), ScriptDebugWindow::OnInit(), NetworkContentListWindow::OnKeyPress(), NewGRFWindow::OnKeyPress(), GenerateLandscapeWindow::OnQueryTextFinished(), NetworkClientListWindow::OnQueryTextFinished(), NewGRFWindow::OnQueryTextFinished(), NetworkContentListWindow::OnReceiveContentInfo(), SaveLoadWindow::OnTimeout(), ResetAllSettingsConfirmationCallback(), SignListWindow::SetFilterString(), and ShowIndustryCargoesWindow().
Is the data related to this window NewGRF inspectable?
Reimplemented in IndustryViewWindow, LandInfoWindow, and VehicleViewWindow.
Definition at line 853 of file window_gui.h.
Referenced by NWidgetLeaf::SetupSmallestSize().
|
inline |
Is window shaded currently?
Definition at line 563 of file window_gui.h.
References NWidgetStacked::shown_plane, and SZSP_HORIZONTAL.
Referenced by BringWindowToFrontById(), DispatchLeftClickEvent(), NWidgetLeaf::Draw(), MaybeBringWindowToFront(), CompanyFinancesWindow::OnClick(), OnHotkey(), ReplaceVehicleWindow::OnPaint(), BuildVehicleWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), CompanyWindow::OnPaint(), GoalListWindow::OnPaint(), IndustryViewWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), SignListWindow::OnPaint(), StationViewWindow::OnPaint(), TownAuthorityWindow::OnPaint(), FramerateWindow::OnRealtimeTick(), and UpdateWindows().
Gets the enabled/disabled status of a widget.
widget_index | index of this widget in the window |
Definition at line 416 of file window_gui.h.
References GetWidget().
Referenced by BuildRailClick_Remove(), PerformanceRatingDetailWindow::DrawWidget(), LinkGraphLegendWindow::DrawWidget(), ScriptDebugWindow::DrawWidgetCompanyButton(), HandlePlacePushButton(), PerformanceRatingDetailWindow::OnClick(), LinkGraphLegendWindow::OnClick(), NetworkGameWindow::OnClick(), PickerWindow::OnClick(), BuildRoadToolbarWindow::OnClick(), ScriptDebugWindow::OnClick(), MainToolbarWindow::OnClick(), DepotWindow::OnDragDrop(), DepotWindow::OnTimeout(), LinkGraphLegendWindow::OnTooltip(), RailToolbar_CtrlChanged(), RoadToolbar_CtrlChanged(), LinkGraphLegendWindow::SetOverlay(), and LinkGraphLegendWindow::UpdateOverlayCompanies().
Check if given widget is focused within this window.
widget_index | : index of the widget in the window to check |
Definition at line 426 of file window_gui.h.
References GetWidget(), and NWidgetCore::index.
Referenced by IsWidgetGloballyFocused(), and NetworkContentListWindow::OnKeyPress().
Check if given widget has user input focus.
This means that both the window has focus and that the given widget has focus within the window.
widget_index | : index of the widget in the window to check |
Definition at line 437 of file window_gui.h.
References GetWidget(), and IsWidgetFocused().
Gets the highlighted status of a widget.
widget_index | index of this widget in the window |
Definition at line 272 of file window.cpp.
References GetWidget().
Referenced by DispatchLeftClickEvent().
Gets the lowered state of a widget.
widget_index | index of this widget in the window |
Definition at line 497 of file window_gui.h.
References GetWidget().
Referenced by BuildRailClick_Remove(), TextfileWindow::CheckHyperlinkClick(), BuildAirToolbarWindow::Close(), BuildDocksToolbarWindow::Close(), BuildRailToolbarWindow::Close(), BuildRoadToolbarWindow::Close(), BuildSignalWindow::DrawWidget(), TextfileWindow::DrawWidget(), HandlePlacePushButton(), IndustryCargoesWindow::NotifySmallmap(), CompanyWindow::OnClick(), DepotWindow::OnClick(), IndustryCargoesWindow::OnClick(), StationViewWindow::OnClick(), TownViewWindow::OnClick(), WaypointWindow::OnClick(), BuildRailToolbarWindow::OnCTRLStateChange(), ScenarioEditorLandscapeGenerationWindow::OnPaint(), BuildRailToolbarWindow::OnPlaceDrag(), BuildRailToolbarWindow::OnPlaceMouseUp(), BuildRoadToolbarWindow::OnPlaceMouseUp(), BuildRoadToolbarWindow::OnPlaceObject(), BuildAirToolbarWindow::OnPlaceObjectAbort(), BuildDocksToolbarWindow::OnPlaceObjectAbort(), BuildRailToolbarWindow::OnPlaceObjectAbort(), BuildRoadToolbarWindow::OnPlaceObjectAbort(), BuildRailToolbarWindow::OnRealtimeTick(), BuildRoadToolbarWindow::OnRealtimeTick(), SaveLoadWindow::OnTimeout(), RailToolbar_CtrlChanged(), RaiseWidgetWhenLowered(), TextfileWindow::ReflowContent(), RoadToolbar_CtrlChanged(), TextfileWindow::SetupScrollbars(), ToggleRailButton_Remove(), ToggleRoadButton_Remove(), BuildRoadToolbarWindow::UpdateOptionWidgetStatus(), LinkGraphLegendWindow::UpdateOverlayCargoes(), and LinkGraphLegendWindow::UpdateOverlayCompanies().
Marks a widget as lowered.
widget_index | index of this widget in the window |
Definition at line 466 of file window_gui.h.
References GetWidget(), and SetWidgetLoweredState().
Referenced by BuildRailStationWindow::CheckSelectedSize(), HandleButtonClick(), HandlePlacePushButton(), SelectCompanyLiveryWindow::OnClick(), CompanyWindow::OnClick(), BuildDocksStationWindow::OnClick(), BuildDocksDepotWindow::OnClick(), PerformanceRatingDetailWindow::OnClick(), SpriteAlignerWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildRailDepotWindow::OnClick(), BuildRoadDepotWindow::OnClick(), BuildRoadStationWindow::OnClick(), CompanyStationsWindow::OnClick(), StationViewWindow::OnClick(), BuildRailStationWindow::OnInit(), PerformanceRatingDetailWindow::OnInvalidateData(), BuildSignalWindow::OnInvalidateData(), VehicleDetailsWindow::OnPaint(), VehicleViewWindow::OnPaint(), and BuildTreesWindow::UpdateMode().
A click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. |
widget | the clicked widget. |
click_count | Number of fast consecutive clicks at same position |
Reimplemented in AIConfigWindow, BuildAirToolbarWindow, BuildAirportWindow, ReplaceVehicleWindow, BootstrapErrorWindow, BootstrapAskForDownloadWindow, BuildBridgeWindow, BuildVehicleWindow, CheatWindow, CompanyFinancesWindow, SelectCompanyLiveryWindow, SelectCompanyManagerFaceWindow, CompanyWindow, BuyCompanyWindow, SetDateWindow, DepotWindow, BuildDocksToolbarWindow, BuildDocksStationWindow, BuildDocksDepotWindow, DropdownWindow, EnginePreviewWindow, SaveLoadWindow, FramerateWindow, GSConfigWindow, GenerateLandscapeWindow, CreateScenarioWindow, GenerateProgressWindow, GoalListWindow, GoalQuestionWindow, GraphLegendWindow, BaseGraphWindow, PerformanceHistoryGraphWindow, PaymentRatesGraphWindow, PerformanceRatingDetailWindow, IndustryProductionGraphWindow, VehicleGroupWindow, HelpWindow, EndGameHighScoreBaseWindow, BuildIndustryWindow, IndustryViewWindow, IndustryDirectoryWindow, IndustryCargoesWindow, SelectGameWindow, ScriptLeagueWindow, LinkGraphLegendWindow, LandInfoWindow, QueryStringWindow, QueryWindow, MusicTrackSelectionWindow, MusicWindow, NetworkChatWindow, NetworkContentDownloadStatusWindow, NetworkContentListWindow, NetworkGameWindow, NetworkStartServerWindow, NetworkClientListWindow, NetworkJoinStatusWindow, NetworkAskRelayWindow, NetworkAskSurveyWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFWindow, SavePresetWindow, NewsWindow, MessageHistoryWindow, BuildObjectWindow, OrdersWindow, OskWindow, PickerWindow, BuildRailToolbarWindow, BuildRailStationWindow, BuildSignalWindow, BuildRailDepotWindow, BuildRoadToolbarWindow, BuildRoadDepotWindow, BuildRoadStationWindow, ScreenshotWindow, ScriptListWindow, ScriptSettingsWindow, ScriptDebugWindow, GameOptionsWindow, GameSettingsWindow, CustomCurrencyWindow, SignListWindow, SignWindow, SmallMapWindow, CompanyStationsWindow, StationViewWindow, SelectStationWindow< T >, StatusBarWindow, StoryBookWindow, SubsidyListWindow, TerraformToolbarWindow, ScenarioEditorLandscapeGenerationWindow, TextfileWindow, TimetableWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, TownAuthorityWindow, TownViewWindow, TownDirectoryWindow, FoundTownWindow, TransparenciesWindow, BuildTreesWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, VehicleViewWindow, ExtraViewportWindow, and WaypointWindow.
Definition at line 670 of file window_gui.h.
Referenced by DispatchLeftClickEvent(), HandleActiveWidget(), HandleEditBoxKey(), OskWindow::OnClick(), and OnHotkey().
|
inlinevirtual |
The state of the control key has changed.
Reimplemented in DepotWindow, BuildRailToolbarWindow, and BuildRoadToolbarWindow.
Definition at line 661 of file window_gui.h.
References ES_NOT_HANDLED.
Referenced by HandleCtrlChanged().
A dragged 'object' has been released.
pt | the point inside the window where the release took place. |
widget | the widget where the release took place. |
Reimplemented in DepotWindow, VehicleGroupWindow, NewGRFWindow, OrdersWindow, and RefitWindow.
Definition at line 708 of file window_gui.h.
Referenced by HandleMouseDragDrop().
A dropdown window associated to this window has been closed.
pt | the point inside the window the mouse resides on after closure. |
widget | the widget (button) that the dropdown is associated with. |
index | the element in the dropdown that is selected. |
instant_close | whether the dropdown was configured to close on mouse up. |
Reimplemented in NetworkClientListWindow, GameSettingsWindow, GSConfigWindow, NewGRFParametersWindow, and ScriptSettingsWindow.
Definition at line 287 of file window.cpp.
References GetWidget(), GetWidgetFromPos(), NWID_BUTTON_DROPDOWN, OnDropdownSelect(), RaiseWidget(), and SetWidgetDirty().
Referenced by DropdownWindow::Close(), NetworkClientListWindow::OnDropdownClose(), and GameSettingsWindow::OnDropdownClose().
A dropdown option associated to this window has been selected.
widget | the widget (button) that the dropdown is associated with. |
index | the element in the dropdown that is selected. |
Reimplemented in CompanyStationsWindow, BuildAirportWindow, ReplaceVehicleWindow, BuildBridgeWindow, BuildVehicleWindow, SelectCompanyLiveryWindow, SetDateWindow, GSConfigWindow, GenerateLandscapeWindow, CreateScenarioWindow, VehicleGroupWindow, IndustryDirectoryWindow, IndustryCargoesWindow, MusicTrackSelectionWindow, NetworkStartServerWindow, NetworkClientListWindow, NewGRFParametersWindow, NewGRFWindow, OrdersWindow, ScriptSettingsWindow, GameOptionsWindow, GameSettingsWindow, StationViewWindow, StoryBookWindow, TextfileWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, TownDirectoryWindow, VehicleListWindow, and VehicleDetailsWindow.
Definition at line 763 of file window_gui.h.
Referenced by OnDropdownClose(), and DropdownWindow::OnMouseLoop().
The text in an editbox has been edited.
widget | The widget of the editbox. |
Reimplemented in BuildVehicleWindow, SaveLoadWindow, IndustryDirectoryWindow, NetworkContentListWindow, NetworkGameWindow, PickerWindow, ScriptDebugWindow, GameSettingsWindow, TownDirectoryWindow, NetworkChatWindow, NewGRFWindow, OskWindow, and SignListWindow.
Definition at line 771 of file window_gui.h.
Referenced by HandleEditBoxKey(), InsertTextString(), and OskWindow::OnEditboxChanged().
|
virtual |
The window has gained focus.
Called when window gains focus.
Reimplemented in IConsoleWindow.
Definition at line 508 of file window.cpp.
References VideoDriver::EditBoxGainedFocus(), VideoDriver::GetInstance(), nested_focus, NWidgetBase::type, and WWT_EDITBOX.
Referenced by SetFocusedWindow().
The window has lost focus.
Called when window loses focus.
closing | True iff the window has lost focus in the process of closing. |
Reimplemented in DropdownWindow, OskWindow, and IConsoleWindow.
Definition at line 516 of file window.cpp.
References VideoDriver::EditBoxLostFocus(), VideoDriver::GetInstance(), nested_focus, NWidgetBase::type, and WWT_EDITBOX.
Referenced by Close(), and SetFocusedWindow().
Called once per (game) tick.
Reimplemented in BaseGraphWindow, PaymentRatesGraphWindow, PerformanceRatingDetailWindow, VehicleGroupWindow, PerformanceLeagueWindow, CompanyStationsWindow, and VehicleListWindow.
Definition at line 739 of file window_gui.h.
Referenced by CallWindowGameTickEvent().
|
virtual |
A hotkey has been pressed.
hotkey | Hotkey index, by default a widget index of a button or editbox. |
Reimplemented in BuildVehicleWindow, IndustryDirectoryWindow, MainWindow, OrdersWindow, PickerWindow, BuildRailToolbarWindow, BuildRoadToolbarWindow, SignListWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, TownDirectoryWindow, and VehicleViewWindow.
Definition at line 565 of file window.cpp.
References ES_HANDLED, ES_NOT_HANDLED, GetWidget(), IsShaded(), OnClick(), SetFocusedWidget(), SetFocusedWindow(), and WWT_EDITBOX.
Referenced by BuildAirToolbarWindow::AirportToolbarGlobalHotkeys(), BuildObjectWindow::BuildObjectGlobalHotkeys(), BuildRailStationWindow::BuildRailStationGlobalHotkeys(), BuildDocksToolbarWindow::DockToolbarGlobalHotkeys(), HandleKeypress(), HandleToolbarHotkey(), BuildRailToolbarWindow::OnHotkey(), BuildRoadToolbarWindow::OnHotkey(), VehicleViewWindow::OnHotkey(), BuildRailToolbarWindow::RailToolbarGlobalHotkeys(), BuildRoadToolbarWindow::RoadTramToolbarGlobalHotkeys(), ScriptDebugWindow::ScriptDebugGlobalHotkeys(), SignListWindow::SignListGlobalHotkeys(), ScenarioEditorLandscapeGenerationWindow::TerraformToolbarEditorGlobalHotkeys(), and TerraformToolbarWindow::TerraformToolbarGlobalHotkeys().
The mouse is hovering over a widget in the window, perform an action for it.
pt | The point where the mouse is hovering. |
widget | The widget where the mouse is hovering. |
Definition at line 686 of file window_gui.h.
Referenced by DispatchHoverEvent().
Notification that the nested widget tree gets initialized.
The event can be used to perform general computations.
Reimplemented in BuildVehicleWindow, CheatWindow, SelectCompanyManagerFaceWindow, IConsoleWindow, DepotWindow, PaymentRatesGraphWindow, IndustryProductionGraphWindow, BuildIndustryWindow, IndustryViewWindow, IndustryDirectoryWindow, IndustryCargoesWindow, SelectGameWindow, LandInfoWindow, NetworkContentListWindow, NetworkGameWindow, NetworkClientListWindow, BuildObjectWindow, BuildRailToolbarWindow, BuildRailStationWindow, BuildSignalWindow, BuildRoadToolbarWindow, ScriptDebugWindow, GameSettingsWindow, SignListWindow, SmallMapWindow, SubsidyListWindow, TerraformToolbarWindow, TownAuthorityWindow, FoundTownWindow, RefitWindow, and BaseVehicleListWindow.
Definition at line 582 of file window_gui.h.
Referenced by InitializeData(), BuildObjectWindow::OnInit(), BuildRailStationWindow::OnInit(), and ReInit().
Compute the initial position of the window.
sm_width | Smallest width of the window. |
sm_height | Smallest height of the window. |
window_number | The window number of the new window. |
Reimplemented in BuildBridgeWindow, SetDateWindow, DropdownWindow, ErrmsgWindow, TooltipsWindow, NetworkChatWindow, NewsWindow, StatusBarWindow, TerraformToolbarWindow, and TransparenciesWindow.
Definition at line 1711 of file window.cpp.
References GetWidget(), LocalGetWindowPlacement(), window_desc, and window_number.
Referenced by FinishInitNested(), and ReInit().
Some data on this window has become invalid.
data | information about the changed data. |
gui_scope | Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See InvalidateWindowData() for details. |
Reimplemented in AIConfigWindow, BuildAirToolbarWindow, ReplaceVehicleWindow, BuildVehicleWindow, SelectCompanyLiveryWindow, CompanyInfrastructureWindow, CompanyWindow, DepotWindow, BuildDocksToolbarWindow, EnginePreviewWindow, ErrmsgWindow, SaveLoadWindow, GSConfigWindow, GenerateLandscapeWindow, GoalListWindow, GraphLegendWindow, BaseGraphWindow, PaymentRatesGraphWindow, PerformanceRatingDetailWindow, VehicleGroupWindow, BuildIndustryWindow, IndustryViewWindow, IndustryDirectoryWindow, IndustryCargoesWindow, SelectGameWindow, PerformanceLeagueWindow, ScriptLeagueWindow, LinkGraphLegendWindow, MainWindow, LandInfoWindow, MusicTrackSelectionWindow, MusicWindow, NetworkChatWindow, NetworkContentListWindow, NetworkGameWindow, NetworkClientListWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFWindow, NewsWindow, MessageHistoryWindow, BuildObjectWindow, OrdersWindow, OskWindow, PickerWindow, BuildRailToolbarWindow, BuildRailStationWindow, BuildSignalWindow, BuildRoadToolbarWindow, BuildRoadStationWindow, ScriptListWindow, ScriptSettingsWindow, ScriptTextfileWindow, ScriptDebugWindow, GameOptionsWindow, GameSettingsWindow, SignListWindow, SmallMapWindow, CompanyStationsWindow, StationViewWindow, SelectStationWindow< T >, StatusBarWindow, StoryBookWindow, SubsidyListWindow, TextfileWindow, TimetableWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, TownAuthorityWindow, TownViewWindow, TownDirectoryWindow, FoundTownWindow, BuildHouseWindow, TransparenciesWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, VehicleViewWindow, ExtraViewportWindow, WaypointWindow, and CompanyFinancesWindow.
Definition at line 786 of file window_gui.h.
Referenced by InvalidateData(), and ProcessScheduledInvalidations().
|
inlinevirtual |
A key has been pressed.
key | the Unicode value of the key. |
keycode | the untranslated key code including shift state. |
Reimplemented in BuildBridgeWindow, IConsoleWindow, SaveLoadWindow, EndGameHighScoreBaseWindow, QueryWindow, NetworkChatWindow, NetworkContentListWindow, NetworkGameWindow, and NewGRFWindow.
Definition at line 652 of file window_gui.h.
References ES_NOT_HANDLED.
Referenced by HandleKeypress().
An 'object' is being dragged at the provided position, highlight the target if possible.
pt | The point inside the window that the mouse hovers over. |
widget | The widget the mouse hovers over. |
Reimplemented in DepotWindow, VehicleGroupWindow, NewGRFWindow, OrdersWindow, and RefitWindow.
Definition at line 701 of file window_gui.h.
Referenced by HandleMouseDragDrop().
Called for every mouse loop run, which is at least once per (game) tick.
Reimplemented in IConsoleWindow, DepotWindow, DropdownWindow, ErrmsgWindow, VehicleGroupWindow, TooltipsWindow, GameOptionsWindow, and VehicleListWindow.
Definition at line 734 of file window_gui.h.
The mouse is currently moving over the window or has just moved outside of the window.
In the latter case pt is (-1, -1).
pt | the point inside the window that the mouse hovers over. |
widget | the widget the mouse hovers over. |
Reimplemented in SaveLoadWindow, NetworkClientListWindow, SmallMapWindow, SelectStationWindow< T >, and VehicleViewWindow.
Definition at line 722 of file window_gui.h.
Referenced by HandleMouseOver().
The mouse wheel has been turned.
wheel | the amount of movement of the mouse wheel. |
Reimplemented in IConsoleWindow, IndustryViewWindow, MainWindow, SmallMapWindow, TownViewWindow, VehicleViewWindow, and ExtraViewportWindow.
Definition at line 728 of file window_gui.h.
The window must be repainted.
Reimplemented in BuildAirportWindow, ReplaceVehicleWindow, BuildVehicleWindow, CompanyFinancesWindow, SelectCompanyLiveryWindow, SelectCompanyManagerFaceWindow, CompanyWindow, IConsoleWindow, DepotWindow, BuildDocksStationWindow, SaveLoadWindow, GSConfigWindow, CreateScenarioWindow, GoalListWindow, VehicleGroupWindow, EndGameWindow, HighScoreWindow, IndustryViewWindow, IndustryDirectoryWindow, PerformanceLeagueWindow, ScriptLeagueWindow, MainWindow, NetworkContentListWindow, NetworkGameWindow, NewGRFParametersWindow, OrdersWindow, BuildRailStationWindow, BuildRoadStationWindow, ScreenshotWindow, ScriptSettingsWindow, ScriptDebugWindow, GameSettingsWindow, SignListWindow, SmallMapWindow, CompanyStationsWindow, StationViewWindow, StoryBookWindow, ScenarioEditorLandscapeGenerationWindow, TimetableWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, TownAuthorityWindow, TownViewWindow, TownDirectoryWindow, TransparenciesWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, VehicleViewWindow, and WaypointWindow.
Definition at line 599 of file window_gui.h.
References DrawWidgets().
Referenced by DrawOverlappedWindow().
|
inlinevirtual |
The user is dragging over the map when the tile highlight mode has been set.
select_method | the method of selection (allowed directions) |
select_proc | what will be created when the drag is over. |
pt | the exact point on the map where the mouse is. |
Reimplemented in BuildAirToolbarWindow, BuildDocksToolbarWindow, BuildObjectWindow, BuildRailToolbarWindow, BuildRoadToolbarWindow, TerraformToolbarWindow, ScenarioEditorLandscapeGenerationWindow, and BuildTreesWindow.
Definition at line 825 of file window_gui.h.
Referenced by VpHandlePlaceSizingDrag().
|
inlinevirtual |
The user has dragged over the map when the tile highlight mode has been set.
select_method | the method of selection (allowed directions) |
select_proc | what should be created. |
pt | the exact point on the map where the mouse was released. |
start_tile | the begin tile of the drag. |
end_tile | the end tile of the drag. |
Reimplemented in BuildAirToolbarWindow, BuildDocksToolbarWindow, BuildObjectWindow, BuildRailToolbarWindow, BuildRoadToolbarWindow, TerraformToolbarWindow, ScenarioEditorLandscapeGenerationWindow, and BuildTreesWindow.
Definition at line 836 of file window_gui.h.
Referenced by PlaceRail_Bridge(), PlaceRoad_Bridge(), and VpHandlePlaceSizingDrag().
The user clicked some place on the map when a tile highlight mode has been set.
pt | the exact point on the map that has been clicked. |
tile | the tile on the map that has been clicked. |
Reimplemented in BuildAirToolbarWindow, CompanyWindow, BuildDocksToolbarWindow, BuildIndustryWindow, BuildObjectWindow, OrdersWindow, BuildRailToolbarWindow, BuildRoadToolbarWindow, StoryBookWindow, TerraformToolbarWindow, ScenarioEditorLandscapeGenerationWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, FoundTownWindow, BuildHouseWindow, and BuildTreesWindow.
Definition at line 794 of file window_gui.h.
The user cancelled a tile highlight mode that has been set.
Reimplemented in BuildAirToolbarWindow, CompanyWindow, DepotWindow, BuildDocksToolbarWindow, VehicleGroupWindow, BuildIndustryWindow, BuildObjectWindow, OrdersWindow, BuildRailToolbarWindow, BuildRoadToolbarWindow, StoryBookWindow, TerraformToolbarWindow, ScenarioEditorLandscapeGenerationWindow, MainToolbarWindow, ScenarioEditorToolbarWindow, FoundTownWindow, and BuildTreesWindow.
Definition at line 815 of file window_gui.h.
Referenced by SetObjectToPlace().
The user moves over the map when a tile highlight mode has been set when the special mouse mode has been set to 'PRESIZE' mode.
An example of this is the tile highlight for dock building.
pt | the exact point on the map where the mouse is. |
tile | the tile on the map where the mouse is. |
Reimplemented in BuildRailToolbarWindow, BuildRoadToolbarWindow, and BuildDocksToolbarWindow.
Definition at line 845 of file window_gui.h.
The query window opened from this window has closed.
str | the new value of the string, std::nullopt if the window was cancelled or an empty string when the default button was pressed, i.e. str->empty() . |
Reimplemented in BuildVehicleWindow, CheatWindow, SelectCompanyManagerFaceWindow, CompanyWindow, DepotWindow, GSConfigWindow, GenerateLandscapeWindow, CreateScenarioWindow, VehicleGroupWindow, IndustryViewWindow, NetworkGameWindow, NetworkStartServerWindow, NetworkClientListWindow, NetworkJoinStatusWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFWindow, OrdersWindow, ScriptSettingsWindow, GameSettingsWindow, CustomCurrencyWindow, StationViewWindow, TimetableWindow, ScenarioEditorToolbarWindow, TownViewWindow, VehicleViewWindow, and WaypointWindow.
Definition at line 779 of file window_gui.h.
Referenced by QueryStringWindow::Close(), and SavePresetWindow::OnClick().
Called periodically.
Reimplemented in BuildAirportWindow, BuildDocksStationWindow, FramerateWindow, FrametimeGraphWindow, SelectGameWindow, NewsWindow, BuildRailToolbarWindow, BuildRailStationWindow, BuildRoadToolbarWindow, BuildRoadStationWindow, and SelectStationWindow< T >.
Definition at line 744 of file window_gui.h.
Referenced by CallWindowRealtimeTickEvent().
Called after the window got resized.
For nested windows with a viewport, call NWidgetViewport::UpdateViewportCoordinates.
Reimplemented in ReplaceVehicleWindow, BuildBridgeWindow, BuildVehicleWindow, SelectCompanyLiveryWindow, CompanyWindow, DepotWindow, SaveLoadWindow, FramerateWindow, GSConfigWindow, GoalListWindow, PaymentRatesGraphWindow, IndustryProductionGraphWindow, VehicleGroupWindow, BuildIndustryWindow, IndustryViewWindow, IndustryDirectoryWindow, IndustryCargoesWindow, SelectGameWindow, MainWindow, NetworkContentListWindow, NetworkGameWindow, NetworkClientListWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFWindow, SavePresetWindow, NewsWindow, MessageHistoryWindow, OrdersWindow, PickerWindow, ScriptListWindow, ScriptSettingsWindow, ScriptDebugWindow, GameOptionsWindow, GameSettingsWindow, SignListWindow, CompanyStationsWindow, StationViewWindow, SelectStationWindow< T >, StoryBookWindow, SubsidyListWindow, TextfileWindow, TimetableWindow, TownViewWindow, TownDirectoryWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, VehicleViewWindow, ExtraViewportWindow, and WaypointWindow.
Definition at line 756 of file window_gui.h.
Referenced by FindWindowPlacementAndResize(), ProcessScheduledResize(), and ResizeWindow().
A click with the right mouse button has been made on the window.
pt | the point inside the window that has been clicked. |
widget | the clicked widget. |
Reimplemented in DepotWindow, ExtraViewportWindow, and SmallMapWindow.
Definition at line 679 of file window_gui.h.
Referenced by DispatchRightClickEvent().
Handle the request for (viewport) scrolling.
delta | the amount the viewport must be scrolled. |
Reimplemented in MainWindow, SmallMapWindow, and ExtraViewportWindow.
Definition at line 714 of file window_gui.h.
Referenced by HandleViewportScroll().
Called when this window's timeout has been reached.
Reimplemented in CheatWindow, DepotWindow, SaveLoadWindow, GenerateLandscapeWindow, CreateScenarioWindow, BuildIndustryWindow, IndustryViewWindow, NetworkStartServerWindow, GameSettingsWindow, CustomCurrencyWindow, StoryBookWindow, ScenarioEditorLandscapeGenerationWindow, MainToolbarWindow, and ScenarioEditorToolbarWindow.
Definition at line 749 of file window_gui.h.
|
inlinevirtual |
Event to display a custom tooltip.
pt | The point where the mouse is located. |
widget | The widget where the mouse is located. |
Reimplemented in ReplaceVehicleWindow, IndustryCargoesWindow, LinkGraphLegendWindow, MainWindow, NetworkClientListWindow, BuildRailToolbarWindow, and VehicleDetailsWindow.
Definition at line 694 of file window_gui.h.
Referenced by DispatchHoverEvent(), and DispatchRightClickEvent().
The user clicked on a vehicle while HT_VEHICLE has been set.
v | clicked vehicle |
Definition at line 802 of file window_gui.h.
Referenced by VehicleClicked(), and VehicleClicked().
|
inlinevirtual |
The user clicked on a vehicle while HT_VEHICLE has been set.
v | clicked vehicle |
Reimplemented in DepotWindow, and OrdersWindow.
Definition at line 810 of file window_gui.h.
|
inlinedelete |
Helper allocation function to disallow something.
Don't allow arrays; arrays of Windows are pointless as you need to destruct them all at the same time too, which is kinda hard.
size | the amount of space not to allocate |
void Window::ProcessHighlightedInvalidations | ( | ) |
Process all invalidation of highlighted widgets.
Definition at line 3184 of file window.cpp.
References flags, GetWidget(), WF_HIGHLIGHTED, and widget_lookup.
Referenced by UpdateWindows().
void Window::ProcessScheduledInvalidations | ( | ) |
Process all scheduled invalidations.
Definition at line 3172 of file window.cpp.
References OnInvalidateData(), scheduled_invalidation_data, WC_INVALID, and window_class.
Referenced by UpdateWindows().
void Window::ProcessScheduledResize | ( | ) |
Process scheduled OnResize() event.
Definition at line 3145 of file window.cpp.
References OnResize(), and scheduled_resize.
Referenced by UpdateWindows().
Raise the buttons of the window.
autoraise | Raise only the push buttons of the window. |
Definition at line 525 of file window.cpp.
References GetWidget(), nested_root, NWidgetCore::SetLowered(), widget_lookup, WWT_DEFSIZEBOX, WWT_EDITBOX, and WWT_LAST.
Referenced by CompanyWindow::OnClick(), BuildIndustryWindow::OnClick(), CompanyWindow::OnPlaceObject(), BuildAirToolbarWindow::OnPlaceObjectAbort(), CompanyWindow::OnPlaceObjectAbort(), BuildDocksToolbarWindow::OnPlaceObjectAbort(), BuildIndustryWindow::OnPlaceObjectAbort(), BuildRailToolbarWindow::OnPlaceObjectAbort(), BuildRoadToolbarWindow::OnPlaceObjectAbort(), TerraformToolbarWindow::OnPlaceObjectAbort(), ScenarioEditorLandscapeGenerationWindow::OnPlaceObjectAbort(), FoundTownWindow::OnPlaceObjectAbort(), BuildIndustryWindow::OnTimeout(), and BuildTreesWindow::UpdateMode().
Marks a widget as raised.
widget_index | index of this widget in the window |
Definition at line 475 of file window_gui.h.
References GetWidget(), and SetWidgetLoweredState().
Referenced by BuildRailStationWindow::CheckSelectedSize(), SelectCompanyLiveryWindow::OnClick(), BuildDocksStationWindow::OnClick(), BuildDocksDepotWindow::OnClick(), CreateScenarioWindow::OnClick(), PerformanceRatingDetailWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildSignalWindow::OnClick(), BuildRailDepotWindow::OnClick(), BuildRoadDepotWindow::OnClick(), BuildRoadStationWindow::OnClick(), CompanyStationsWindow::OnClick(), OnDropdownClose(), GraphLegendWindow::OnInvalidateData(), PerformanceRatingDetailWindow::OnInvalidateData(), SpriteAlignerWindow::OnInvalidateData(), VehicleGroupWindow::OnPaint(), DepotWindow::OnPlaceObjectAbort(), DepotWindow::OnTimeout(), RaiseWidgetWhenLowered(), ResetSignalVariant(), and BuildRoadToolbarWindow::UpdateOptionWidgetStatus().
|
inline |
Raises the widgets and sets widgets dirty that are lowered.
widgets | list of widgets |
Definition at line 542 of file window_gui.h.
References GetWidget(), and RaiseWidgetWhenLowered().
Referenced by GenerateLandscapeWindow::OnTimeout(), CreateScenarioWindow::OnTimeout(), and NetworkStartServerWindow::OnTimeout().
Marks a widget as raised and dirty (redraw), when it is marked as lowered.
widget_index | index of this widget in the window |
Definition at line 484 of file window_gui.h.
References IsWidgetLowered(), RaiseWidget(), and SetWidgetDirty().
Referenced by IndustryCargoesWindow::OnInvalidateData(), ScenarioEditorLandscapeGenerationWindow::OnTimeout(), MainToolbarWindow::OnTimeout(), and RaiseWidgetsWhenLowered().
Re-initialize a window, and optionally change its size.
rx | Horizontal resize of the window. |
ry | Vertical resize of the window. |
reposition | If set, reposition the window to default location. |
Definition at line 952 of file window.cpp.
References _current_text_dir, _gui_scale, FindWindowPlacementAndResize(), WindowDesc::GetDefaultWidth(), GetWidget(), height, InitializePositionSize(), nested_root, OnInit(), OnInitialPosition(), resize, ResizeWindow(), scale, SetDirty(), ST_SMALLEST, ResizeInfo::step_height, ResizeInfo::step_width, TD_RTL, width, window_desc, and window_number.
Referenced by TextfileWindow::AfterLoadText(), TextfileWindow::LoadText(), TextfileWindow::LoadTextfile(), BuildRailToolbarWindow::ModifyRailType(), BuildRoadToolbarWindow::ModifyRoadType(), CompanyFinancesWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), BuildSignalWindow::OnClick(), StationViewWindow::OnClick(), CompanyInfrastructureWindow::OnInvalidateData(), ScriptLeagueWindow::OnInvalidateData(), LandInfoWindow::OnInvalidateData(), MusicTrackSelectionWindow::OnInvalidateData(), MusicWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), StationViewWindow::OnInvalidateData(), TimetableWindow::OnInvalidateData(), RefitWindow::OnInvalidateData(), VehicleDetailsWindow::OnInvalidateData(), ReplaceVehicleWindow::OnPaint(), BuildVehicleWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), CompanyWindow::OnPaint(), DepotWindow::OnPaint(), IndustryViewWindow::OnPaint(), NetworkGameWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), StationViewWindow::OnPaint(), CompanyWindow::OnResize(), SelectGameWindow::OnResize(), NewsWindow::OnResize(), GameOptionsWindow::OnResize(), and SetShaded().
void Window::ScheduleResize | ( | ) |
Mark this window as resized and in need of OnResize() event.
Definition at line 3137 of file window.cpp.
References scheduled_resize.
Referenced by ResizeWindow().
Set focus within this window to the given widget.
The function however doesn't change which window has focus.
widget_index | Index of the widget in the window to set the focus to. |
Definition at line 486 of file window.cpp.
References VideoDriver::EditBoxGainedFocus(), VideoDriver::EditBoxLostFocus(), VideoDriver::GetInstance(), GetWidget(), nested_focus, NWidgetBase::SetDirty(), NWidgetBase::type, and WWT_EDITBOX.
Referenced by DispatchLeftClickEvent(), NetworkChatWindow::NetworkChatWindow(), NetworkContentListWindow::NetworkContentListWindow(), FoundTownWindow::OnClick(), OnHotkey(), BuildVehicleWindow::OnHotkey(), IndustryDirectoryWindow::OnHotkey(), PickerWindow::OnHotkey(), SignListWindow::OnHotkey(), TownDirectoryWindow::OnHotkey(), and SavePresetWindow::SavePresetWindow().
Set the shaded state of the window to make_shaded.
make_shaded | If true , shade the window (roll up until just the title bar is visible), else unshade/unroll the window to its original size. |
Definition at line 995 of file window.cpp.
References GetWidget(), height, nested_focus, ReInit(), NWidgetStacked::SetDisplayedPlane(), shade_select, NWidgetStacked::shown_plane, SZSP_HORIZONTAL, UnfocusFocusedWidget(), unshaded_size, and width.
Referenced by BringWindowToFrontById(), DispatchLeftClickEvent(), DispatchMouseWheelEvent(), and CompanyFinancesWindow::OnClick().
Initialize string parameters for a widget.
Calls to this function are made during initialization to measure the size (that is as part of InitNested()), during drawing, and while re-initializing the window. Only for widgets that render text initializing is requested.
widget | Widget number. |
Reimplemented in AIConfigWindow, BuildAirportWindow, ReplaceVehicleWindow, BuildVehicleWindow, CompanyFinancesWindow, SelectCompanyLiveryWindow, SelectCompanyManagerFaceWindow, CompanyInfrastructureWindow, CompanyWindow, BuyCompanyWindow, SetDateWindow, DepotWindow, ErrmsgWindow, FramerateWindow, FrametimeGraphWindow, GenerateLandscapeWindow, CreateScenarioWindow, GoalListWindow, GoalQuestionWindow, IndustryProductionGraphWindow, VehicleGroupWindow, GameManualTextfileWindow, BuildIndustryWindow, IndustryViewWindow, IndustryDirectoryWindow, IndustryCargoesWindow, ScriptLeagueWindow, AboutWindow, QueryStringWindow, QueryWindow, MusicTrackSelectionWindow, NetworkChatWindow, ContentTextfileWindow, NetworkStartServerWindow, NetworkClientListWindow, NetworkAskRelayWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFTextfileWindow, NewGRFWindow, NewsWindow, BuildObjectWindow, OrdersWindow, OskWindow, BuildRailToolbarWindow, BuildSignalWindow, BuildRoadToolbarWindow, ScriptListWindow, ScriptSettingsWindow, ScriptTextfileWindow, ScriptDebugWindow, BaseSetTextfileWindow, GameOptionsWindow, GameSettingsWindow, CustomCurrencyWindow, SignListWindow, SignWindow, SmallMapWindow, CompanyStationsWindow, StationViewWindow, StoryBookWindow, TimetableWindow, ScenarioEditorToolbarWindow, TownAuthorityWindow, TownViewWindow, TownDirectoryWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, VehicleViewWindow, ExtraViewportWindow, and WaypointWindow.
Definition at line 632 of file window_gui.h.
Referenced by NWidgetBackground::Draw(), NWidgetLeaf::Draw(), BuildObjectWindow::SetStringParameters(), NWidgetBackground::SetupSmallestSize(), and NWidgetLeaf::SetupSmallestSize().
|
inline |
Set the timeout flag of the window and initiate the timer.
Definition at line 361 of file window_gui.h.
References TIMEOUT_DURATION, and WF_TIMEOUT.
Referenced by DispatchLeftClickEvent(), HandleButtonClick(), CheatWindow::OnClick(), IndustryViewWindow::OnClick(), GameSettingsWindow::OnClick(), CustomCurrencyWindow::OnClick(), StationViewWindow::OnClick(), and StoryBookWindow::OnPageElementClick().
|
inline |
Set the timeout flag of the window and initiate the timer.
Definition at line 370 of file window_gui.h.
References WF_WHITE_BORDER, and WHITE_BORDER_DURATION.
Referenced by BringWindowToFrontById(), InitializeData(), and MaybeBringWindowToFront().
Invalidate a widget, i.e.
mark it as being changed and in need of redraw.
widget_index | the widget to redraw. |
Definition at line 551 of file window.cpp.
References widget_lookup.
Referenced by VehicleGroupWindow::DirtyHighlightedGroupWidget(), HandleActiveWidget(), HandleButtonClick(), StationViewWindow::HandleCargoWaitingClick(), HandleEditBoxKey(), HandleZoomMessage(), InsertTextString(), CompanyWindow::OnClick(), DepotWindow::OnClick(), SaveLoadWindow::OnClick(), IndustryCargoesWindow::OnClick(), MusicWindow::OnClick(), SavePresetWindow::OnClick(), GameOptionsWindow::OnClick(), TransparenciesWindow::OnClick(), RefitWindow::OnClick(), DepotWindow::OnCTRLStateChange(), NewGRFWindow::OnDragDrop(), OrdersWindow::OnDragDrop(), OnDropdownClose(), OskWindow::OnEditboxChanged(), GoalListWindow::OnInvalidateData(), OskWindow::OnInvalidateData(), StoryBookWindow::OnInvalidateData(), DepotWindow::OnMouseDrag(), NewGRFWindow::OnMouseDrag(), OrdersWindow::OnMouseDrag(), RefitWindow::OnMouseDrag(), SaveLoadWindow::OnMouseOver(), NetworkClientListWindow::OnMouseOver(), VehicleViewWindow::OnMouseOver(), StoryBookWindow::OnPageElementClick(), StoryBookWindow::OnPaint(), StoryBookWindow::OnPlaceObject(), DepotWindow::OnPlaceObjectAbort(), VehicleGroupWindow::OnPlaceObjectAbort(), OrdersWindow::OnPlaceObjectAbort(), BuildRailToolbarWindow::OnPlaceObjectAbort(), BuildRoadToolbarWindow::OnPlaceObjectAbort(), StoryBookWindow::OnPlaceObjectAbort(), GenerateLandscapeWindow::OnQueryTextFinished(), CreateScenarioWindow::OnQueryTextFinished(), NetworkStartServerWindow::OnQueryTextFinished(), DepotWindow::OnTimeout(), StoryBookWindow::OnTimeout(), ScenarioEditorToolbarWindow::OnTimeout(), OrdersWindow::OrderClick_Goto(), OrdersWindow::OrderClick_Nonstop(), OrdersWindow::OrderClick_Unload(), RaiseWidgetWhenLowered(), StoryBookWindow::RefreshSelectedPage(), SetWindowWidgetDirty(), BuildBridgeWindow::SortBridgeList(), CompanyStationsWindow::SortStationsList(), ToggleRailButton_Remove(), ToggleRoadButton_Remove(), ScriptDebugWindow::UpdateLogScroll(), BuildRoadToolbarWindow::UpdateOptionWidgetStatus(), and StoryBookWindow::UpdatePrevNextDisabledState().
Sets the enabled/disabled status of a widget.
By default, widgets are enabled. On certain conditions, they have to be disabled.
widget_index | index of this widget in the window |
disab_stat | status to use ie: disabled = true, enabled = false |
Definition at line 387 of file window_gui.h.
References GetWidget().
Referenced by NetworkContentListWindow::BuildContentList(), RefitWindow::BuildRefitList(), DisableWidget(), EnableWidget(), HandleZoomMessage(), TextfileWindow::NavigateHistory(), NetworkContentListWindow::NetworkContentListWindow(), GameOptionsWindow::OnClick(), RefitWindow::OnClick(), AIConfigWindow::OnInvalidateData(), BuildAirToolbarWindow::OnInvalidateData(), SaveLoadWindow::OnInvalidateData(), GSConfigWindow::OnInvalidateData(), GenerateLandscapeWindow::OnInvalidateData(), GoalListWindow::OnInvalidateData(), PerformanceRatingDetailWindow::OnInvalidateData(), LinkGraphLegendWindow::OnInvalidateData(), MusicTrackSelectionWindow::OnInvalidateData(), NetworkContentListWindow::OnInvalidateData(), NetworkClientListWindow::OnInvalidateData(), NewGRFInspectWindow::OnInvalidateData(), NewGRFParametersWindow::OnInvalidateData(), NewGRFWindow::OnInvalidateData(), BuildRailToolbarWindow::OnInvalidateData(), BuildSignalWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), GameOptionsWindow::OnInvalidateData(), GameSettingsWindow::OnInvalidateData(), StoryBookWindow::OnInvalidateData(), WaypointWindow::OnInvalidateData(), ReplaceVehicleWindow::OnPaint(), BuildVehicleWindow::OnPaint(), CompanyFinancesWindow::OnPaint(), SelectCompanyLiveryWindow::OnPaint(), CompanyWindow::OnPaint(), CreateScenarioWindow::OnPaint(), NetworkGameWindow::OnPaint(), BuildRailStationWindow::OnPaint(), StationViewWindow::OnPaint(), TimetableWindow::OnPaint(), MainToolbarWindow::OnPaint(), ScenarioEditorToolbarWindow::OnPaint(), TownAuthorityWindow::OnPaint(), VehicleListWindow::OnPaint(), VehicleViewWindow::OnPaint(), WaypointWindow::OnPaint(), BuildRoadToolbarWindow::OnPlaceObjectAbort(), BuildIndustryWindow::SetButtons(), TextfileWindow::SetupScrollbars(), SetWidgetsDisabledState(), BuildRoadToolbarWindow::UpdateOptionWidgetStatus(), OskWindow::UpdateOskState(), and StoryBookWindow::UpdatePrevNextDisabledState().
void Window::SetWidgetHighlight | ( | WidgetID | widget_index, |
TextColour | highlighted_colour | ||
) |
Sets the highlighted status of a widget.
widget_index | index of this widget in the window |
highlighted_colour | Colour of highlight, or TC_INVALID to disable. |
Definition at line 242 of file window.cpp.
References CLRBITS, flags, GetWidget(), valid, WF_HIGHLIGHTED, and widget_lookup.
Referenced by DispatchLeftClickEvent().
Sets the lowered/raised status of a widget.
widget_index | index of this widget in the window |
lowered_stat | status to use ie: lowered = true, raised = false |
Definition at line 447 of file window_gui.h.
References GetWidget().
Referenced by LowerWidget(), BuildAirportWindow::OnClick(), ReplaceVehicleWindow::OnClick(), BuildVehicleWindow::OnClick(), LinkGraphLegendWindow::OnClick(), MusicWindow::OnClick(), SpriteAlignerWindow::OnClick(), BuildRailStationWindow::OnClick(), GameOptionsWindow::OnClick(), SignListWindow::OnClick(), TownAuthorityWindow::OnClick(), FoundTownWindow::OnClick(), BuildRailStationWindow::OnInit(), GenerateLandscapeWindow::OnInvalidateData(), SelectGameWindow::OnInvalidateData(), MusicTrackSelectionWindow::OnInvalidateData(), MusicWindow::OnInvalidateData(), PickerWindow::OnInvalidateData(), BuildSignalWindow::OnInvalidateData(), ScriptDebugWindow::OnInvalidateData(), GameOptionsWindow::OnInvalidateData(), TransparenciesWindow::OnInvalidateData(), DepotWindow::OnMouseDrag(), GameOptionsWindow::OnMouseLoop(), SelectCompanyManagerFaceWindow::OnPaint(), CreateScenarioWindow::OnPaint(), NetworkGameWindow::OnPaint(), OrdersWindow::OnPaint(), StationViewWindow::OnPaint(), TimetableWindow::OnPaint(), TownAuthorityWindow::OnPaint(), TownViewWindow::OnPaint(), VehicleViewWindow::OnPaint(), WaypointWindow::OnPaint(), DepotWindow::OnPlaceObjectAbort(), RaiseWidget(), LinkGraphLegendWindow::SetOverlay(), SetWidgetsLoweredState(), BuildRoadToolbarWindow::UpdateOptionWidgetStatus(), and OskWindow::UpdateOskState().
|
inline |
Sets the enabled/disabled status of a list of widgets.
By default, widgets are enabled. On certain conditions, they have to be disabled.
disab_stat | status to use ie: disabled = true, enabled = false |
widgets | list of widgets |
Definition at line 521 of file window_gui.h.
References GetWidget(), and SetWidgetDisabledState().
Referenced by ScriptDebugWindow::OnInit(), SelectCompanyLiveryWindow::OnInvalidateData(), BuildDocksToolbarWindow::OnInvalidateData(), GenerateLandscapeWindow::OnInvalidateData(), SpriteAlignerWindow::OnInvalidateData(), NewGRFWindow::OnInvalidateData(), BuildRoadToolbarWindow::OnInvalidateData(), GameOptionsWindow::OnInvalidateData(), BuildVehicleWindow::OnPaint(), SelectCompanyManagerFaceWindow::OnPaint(), DepotWindow::OnPaint(), VehicleGroupWindow::OnPaint(), MainToolbarWindow::OnPaint(), VehicleListWindow::OnPaint(), VehicleDetailsWindow::OnPaint(), and ScriptDebugWindow::UpdateLogScroll().
|
inline |
Sets the lowered/raised status of a list of widgets.
lowered_stat | status to use ie: lowered = true, raised = false |
widgets | list of widgets |
Definition at line 532 of file window_gui.h.
References GetWidget(), and SetWidgetLoweredState().
Referenced by VehicleDetailsWindow::OnClick(), SpriteAlignerWindow::OnInvalidateData(), SelectCompanyManagerFaceWindow::OnPaint(), and ScenarioEditorToolbarWindow::OnTimeout().
Show the NewGRF inspection window.
When this function is called it is up to the window to call and pass the right parameters to the ShowInspectWindow function.
Reimplemented in IndustryViewWindow, LandInfoWindow, and VehicleViewWindow.
Definition at line 861 of file window_gui.h.
Referenced by DispatchLeftClickEvent(), and NewGRFInspectWindow::OnClick().
|
static |
Get width of up/down arrow of sort button state.
Definition at line 781 of file widget.cpp.
Referenced by ReplaceVehicleWindow::UpdateWidgetSize(), BuildBridgeWindow::UpdateWidgetSize(), BuildVehicleWindow::UpdateWidgetSize(), SaveLoadWindow::UpdateWidgetSize(), VehicleGroupWindow::UpdateWidgetSize(), IndustryDirectoryWindow::UpdateWidgetSize(), NetworkGameWindow::UpdateWidgetSize(), CompanyStationsWindow::UpdateWidgetSize(), TownDirectoryWindow::UpdateWidgetSize(), and VehicleListWindow::UpdateWidgetSize().
Invert the lowered/raised status of a widget.
widget_index | index of this widget in the window |
Definition at line 456 of file window_gui.h.
References GetWidget().
Referenced by DepotWindow::OnClick(), GraphLegendWindow::OnClick(), IndustryCargoesWindow::OnClick(), LinkGraphLegendWindow::OnClick(), BuildRailStationWindow::OnClick(), BuildRoadToolbarWindow::OnClick(), CompanyStationsWindow::OnClick(), TextfileWindow::OnClick(), ToggleRailButton_Remove(), and ToggleRoadButton_Remove().
void Window::UnfocusFocusedWidget | ( | ) |
Makes no widget on this window have focus.
The function however doesn't change which window has focus.
Definition at line 470 of file window.cpp.
References VideoDriver::EditBoxLostFocus(), VideoDriver::GetInstance(), nested_focus, NWidgetBase::SetDirty(), NWidgetBase::type, and WWT_EDITBOX.
Referenced by HandleEditBoxKey(), and SetShaded().
void Window::UpdateQueryStringSize | ( | ) |
Update size of all QueryStrings of this window.
Definition at line 354 of file window.cpp.
References querystrings, and Textbuf::UpdateSize().
|
inlinevirtual |
Update size and resize step of a widget in the window.
After retrieval of the minimal size and the resize-steps of a widget, this function is called to allow further refinement, typically by computing the real maximal size of the content. Afterwards, size is taken to be the minimal size of the widget and resize is taken to contain the resize steps. For the convenience of the callee, padding contains the amount of padding between the content and the edge of the widget. This should be added to the returned size.
widget | Widget number. | |
[in,out] | size | Size of the widget. |
padding | Recommended amount of space between the widget content and the widget edge. | |
[in,out] | fill | Fill step of the widget. |
[in,out] | resize | Resize step of the widget. |
Reimplemented in AIConfigWindow, BuildAirportWindow, ReplaceVehicleWindow, BootstrapErrorWindow, BootstrapAskForDownloadWindow, BuildBridgeWindow, BuildVehicleWindow, CheatWindow, CompanyFinancesWindow, SelectCompanyLiveryWindow, SelectCompanyManagerFaceWindow, CompanyInfrastructureWindow, CompanyWindow, BuyCompanyWindow, SetDateWindow, DepotWindow, BuildDocksDepotWindow, DropdownWindow, EnginePreviewWindow, ErrmsgWindow, SaveLoadWindow, FramerateWindow, FrametimeGraphWindow, GSConfigWindow, GenerateLandscapeWindow, CreateScenarioWindow, GenerateProgressWindow, GoalListWindow, GoalQuestionWindow, BaseGraphWindow, PaymentRatesGraphWindow, PerformanceRatingDetailWindow, IndustryProductionGraphWindow, VehicleGroupWindow, BuildIndustryWindow, IndustryViewWindow, IndustryDirectoryWindow, IndustryCargoesWindow, SelectGameWindow, PerformanceLeagueWindow, ScriptLeagueWindow, LinkGraphLegendWindow, LandInfoWindow, AboutWindow, TooltipsWindow, QueryStringWindow, QueryWindow, MusicTrackSelectionWindow, MusicWindow, NetworkContentListWindow, BaseNetworkContentDownloadStatusWindow, NetworkGameWindow, NetworkStartServerWindow, NetworkClientListWindow, NetworkJoinStatusWindow, NetworkAskRelayWindow, NetworkAskSurveyWindow, NewGRFInspectWindow, SpriteAlignerWindow, NewGRFParametersWindow, NewGRFWindow, SavePresetWindow, ScanProgressWindow, NewsWindow, MessageHistoryWindow, BuildObjectWindow, OrdersWindow, PickerWindow, BuildRailStationWindow, BuildSignalWindow, BuildRailDepotWindow, BuildRoadDepotWindow, BuildRoadStationWindow, ScriptListWindow, ScriptSettingsWindow, ScriptDebugWindow, GameOptionsWindow, GameSettingsWindow, CustomCurrencyWindow, SignListWindow, CompanyStationsWindow, StationViewWindow, SelectStationWindow< T >, StatusBarWindow, StoryBookWindow, SubsidyListWindow, ScenarioEditorLandscapeGenerationWindow, TextfileWindow, TimetableWindow, ScenarioEditorToolbarWindow, TownAuthorityWindow, TownViewWindow, TownDirectoryWindow, BuildTreesWindow, RefitWindow, VehicleListWindow, VehicleDetailsWindow, and VehicleViewWindow.
Definition at line 624 of file window_gui.h.
Referenced by NWidgetStacked::SetupSmallestSize(), NWidgetMatrix::SetupSmallestSize(), NWidgetBackground::SetupSmallestSize(), and NWidgetLeaf::SetupSmallestSize().
|
staticprivate |
List of closed windows to delete.
Definition at line 275 of file window_gui.h.
Referenced by Close(), and DeleteClosedWindows().
WindowFlags Window::flags |
Window flags.
Definition at line 300 of file window_gui.h.
Referenced by ApplyDefaults(), CheckSoftLimit(), CloseNonVitalWindows(), CloseWindowById(), DisableAllWidgetHighlight(), DispatchLeftClickEvent(), DispatchRightClickEvent(), NWidgetLeaf::Draw(), VehicleViewWindow::DrawWidget(), DrawWidgets(), DropdownWindow::DropdownWindow(), StoryBookWindow::GetPageElementFloat(), HandleAutoscroll(), HandleWindowDragging(), InitializeData(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), NetworkStartServerWindow::OnClick(), GameSettingsWindow::OnClick(), SelectGameWindow::OnResize(), GameOptionsWindow::OnResize(), ProcessHighlightedInvalidations(), RelocateAllWindows(), SetWidgetHighlight(), StartWindowDrag(), StartWindowSizing(), and WaypointWindow::WaypointWindow().
int Window::height |
Height of the window (number of pixels down in y direction)
Definition at line 312 of file window_gui.h.
Referenced by GameOptionsWindow::BuildDropDownList(), VehicleGroupWindow::ComputeGroupInfoSize(), DispatchLeftClickEvent(), BaseGraphWindow::DrawGraph(), VehicleGroupWindow::DrawGroupInfo(), DrawOverlappedWindow(), IndustryCargoesWindow::DrawWidget(), ScenarioEditorToolbarWindow::DrawWidget(), RefitWindow::DrawWidget(), DrawWidgets(), StoryBookWindow::EnsureStoryPageElementLayout(), FindWindowFromPt(), FindWindowPlacementAndResize(), QueryWindow::FindWindowPlacementAndResize(), NetworkAskRelayWindow::FindWindowPlacementAndResize(), NetworkAskSurveyWindow::FindWindowPlacementAndResize(), GetAutoPlacePosition(), IConsoleWindow::GetCaretPosition(), StoryBookWindow::GetHeadHeight(), GetMainViewTop(), IConsoleWindow::GetTextBoundingRect(), GetToolbarAlignedWindowPosition(), HandleWindowDragging(), IConsoleResize(), InitializePositionSize(), IsGoodAutoPlace1(), IsGoodAutoPlace2(), LocalGetWindowPlacement(), MaybeBringWindowToFront(), NetworkChatWindow::NetworkChatWindow(), GameOptionsWindow::OnDropdownSelect(), IndustryCargoesWindow::OnInit(), SetDateWindow::OnInitialPosition(), NetworkChatWindow::OnInitialPosition(), IConsoleWindow::OnKeyPress(), IConsoleWindow::OnPaint(), PositionWindow(), PreventHiding(), TextfileWindow::ReflowContent(), ReInit(), RelocateAllWindows(), ResizeWindow(), IConsoleWindow::Scroll(), SetCandidatePos(), SetDirty(), SetShaded(), GameOptionsWindow::SetStringParameters(), TextfileWindow::SetupScrollbars(), NewsWindow::SetWindowTop(), ShowTerraformToolbar(), BuildIndustryWindow::UpdateWidgetSize(), NetworkGameWindow::UpdateWidgetSize(), NetworkClientListWindow::UpdateWidgetSize(), and NewGRFInspectWindow::UpdateWidgetSize().
int Window::left |
x position of left edge of the window
Definition at line 309 of file window_gui.h.
Referenced by DropdownWindow::Close(), VehicleGroupWindow::DrawGroupInfo(), DrawOverlappedWindow(), DrawViewport(), PerformanceLeagueWindow::DrawWidget(), RefitWindow::DrawWidget(), EnsureVisibleCaption(), FindWindowFromPt(), FindWindowPlacementAndResize(), QueryWindow::FindWindowPlacementAndResize(), NetworkAskRelayWindow::FindWindowPlacementAndResize(), NetworkAskSurveyWindow::FindWindowPlacementAndResize(), GetAutoPlacePosition(), NetworkClientListWindow::GetButtonAtPoint(), GetToolbarAlignedWindowPosition(), HandleActiveWidget(), HandleMouseDragDrop(), HandleMouseOver(), HandleWindowDragging(), InitializePositionSize(), InitializeWindowViewport(), IsGoodAutoPlace1(), IsGoodAutoPlace2(), LocalGetWindowPlacement(), MaybeBringWindowToFront(), SetDateWindow::OnInitialPosition(), PositionWindow(), PreventHiding(), RelocateAllWindows(), ResizeWindow(), SetCandidatePos(), SetCompositionPos(), SetDirty(), NWidgetBase::SetDirty(), SetScreenshotWindowVisibility(), NewsWindow::SetWindowTop(), ShowTerraformToolbar(), StartWindowDrag(), DropdownWindow::UpdateSizeAndPosition(), NWidgetViewport::UpdateViewportCoordinates(), and PerformanceRatingDetailWindow::UpdateWidgetSize().
WidgetID Window::mouse_capture_widget |
ID of current mouse capture widget (e.g. dragged scrollbar). -1 if no widget has mouse capture.
Definition at line 326 of file window_gui.h.
Referenced by NWidgetScrollbar::Draw(), HandleActiveWidget(), HandleScrollbarScrolling(), MusicWindow::OnClick(), GameOptionsWindow::OnClick(), and ScrollbarClickPositioning().
const NWidgetCore* Window::nested_focus |
Currently focused nested widget, or nullptr
if no nested widget has focus.
Definition at line 319 of file window_gui.h.
Referenced by EditBoxInGlobalFocus(), GetCaretPosition(), GetFocusedTextbuf(), GetTextBoundingRect(), GetTextCharacterAtPosition(), HandleKeypress(), HandleTextInput(), InitializeData(), OnFocus(), OnFocusLost(), PickerWindow::OnHotkey(), SetCandidatePos(), SetFocusedWidget(), SetFocusedWindow(), SetShaded(), and UnfocusFocusedWidget().
std::unique_ptr<NWidgetBase> Window::nested_root |
Root of the nested tree.
Definition at line 321 of file window_gui.h.
Referenced by ApplyDefaults(), CreateNestedTree(), DispatchHoverEvent(), DispatchLeftClickEvent(), DispatchRightClickEvent(), DrawWidgets(), EnsureVisibleCaption(), FinishInitNested(), GetWidgetFromPos(), HandleMouseOver(), HandleWindowDragging(), InitializeData(), RaiseButtons(), ReInit(), and ResizeWindow().
Owner Window::owner |
The owner of the content shown in this window. Company colour is acquired from this variable.
Definition at line 316 of file window_gui.h.
Referenced by VehicleGroupWindow::BuildGroupList(), CompanyStationsWindow::BuildStationsList(), DepotWindow::Close(), StationViewWindow::Close(), WaypointWindow::Close(), NWidgetLeaf::Draw(), NewsWindow::DrawWidget(), CompanyStationsWindow::DrawWidget(), InitializeData(), DepotWindow::OnClick(), VehicleGroupWindow::OnClick(), StationViewWindow::OnClick(), VehicleGroupWindow::OnPaint(), VehicleListWindow::OnPaint(), CompanyWindow::OnResize(), VehicleGroupWindow::SelectGroup(), VehicleDetailsWindow::VehicleDetailsWindow(), and WaypointWindow::WaypointWindow().
Window* Window::parent |
Parent window.
Definition at line 328 of file window_gui.h.
Referenced by DropdownWindow::Close(), QueryStringWindow::Close(), QueryWindow::Close(), DropdownWindow::DropdownWindow(), QueryWindow::FindWindowPlacementAndResize(), NetworkAskRelayWindow::FindWindowPlacementAndResize(), NetworkAskSurveyWindow::FindWindowPlacementAndResize(), ReplaceVehicleWindow::GenerateReplaceVehList(), IsOSKOpenedFor(), MaybeBringWindowToFront(), NetworkContentDownloadStatusWindow::NetworkContentDownloadStatusWindow(), QueryWindow::OnClick(), OskWindow::OnClick(), OskWindow::OnEditboxChanged(), SetDateWindow::OnInitialPosition(), OskWindow::OnInvalidateData(), QueryWindow::OnKeyPress(), VehicleGroupWindow::OnMouseDrag(), DropdownWindow::OnMouseLoop(), StationViewWindow::SearchNonStop(), SetDateWindow::SetDateWindow(), StationViewWindow::SetDisplayedRow(), ShowQuery(), ShowVehicleRefitWindow(), UpdateOSKOriginalText(), and DropdownWindow::UpdateSizeAndPosition().
std::map<WidgetID, QueryString*> Window::querystrings |
QueryString associated to WWT_EDITBOX widgets.
Definition at line 320 of file window_gui.h.
Referenced by Close(), GetQueryString(), GetQueryString(), NetworkChatWindow::NetworkChatWindow(), NetworkContentListWindow::NetworkContentListWindow(), SavePresetWindow::SavePresetWindow(), ScriptDebugWindow::ScriptDebugWindow(), and UpdateQueryStringSize().
ResizeInfo Window::resize |
Resize information.
Definition at line 314 of file window_gui.h.
Referenced by DispatchLeftClickEvent(), BaseGraphWindow::DrawGraph(), TownAuthorityWindow::DrawRatings(), NetworkGameWindow::DrawServerLine(), BuildBridgeWindow::DrawWidget(), SelectCompanyLiveryWindow::DrawWidget(), DepotWindow::DrawWidget(), SaveLoadWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), BuildIndustryWindow::DrawWidget(), IndustryDirectoryWindow::DrawWidget(), NetworkGameWindow::DrawWidget(), SignListWindow::DrawWidget(), SelectStationWindow< T >::DrawWidget(), TownDirectoryWindow::DrawWidget(), VehicleListWindow::DrawWidget(), ScriptDebugWindow::DrawWidgetLog(), FindWindowPlacementAndResize(), HandleWindowDragging(), InitializeData(), BuildVehicleWindow::OnPaint(), ReInit(), AIConfigWindow::UpdateWidgetSize(), ReplaceVehicleWindow::UpdateWidgetSize(), BuildBridgeWindow::UpdateWidgetSize(), BuildVehicleWindow::UpdateWidgetSize(), SelectCompanyLiveryWindow::UpdateWidgetSize(), DepotWindow::UpdateWidgetSize(), SaveLoadWindow::UpdateWidgetSize(), FramerateWindow::UpdateWidgetSize(), GSConfigWindow::UpdateWidgetSize(), GoalListWindow::UpdateWidgetSize(), BaseGraphWindow::UpdateWidgetSize(), PaymentRatesGraphWindow::UpdateWidgetSize(), IndustryProductionGraphWindow::UpdateWidgetSize(), VehicleGroupWindow::UpdateWidgetSize(), BuildIndustryWindow::UpdateWidgetSize(), IndustryDirectoryWindow::UpdateWidgetSize(), IndustryCargoesWindow::UpdateWidgetSize(), QueryStringWindow::UpdateWidgetSize(), NetworkContentListWindow::UpdateWidgetSize(), NetworkGameWindow::UpdateWidgetSize(), NetworkClientListWindow::UpdateWidgetSize(), NewGRFInspectWindow::UpdateWidgetSize(), SpriteAlignerWindow::UpdateWidgetSize(), NewGRFParametersWindow::UpdateWidgetSize(), NewGRFWindow::UpdateWidgetSize(), SavePresetWindow::UpdateWidgetSize(), NewsWindow::UpdateWidgetSize(), MessageHistoryWindow::UpdateWidgetSize(), BuildObjectWindow::UpdateWidgetSize(), OrdersWindow::UpdateWidgetSize(), PickerWindow::UpdateWidgetSize(), BuildRailStationWindow::UpdateWidgetSize(), BuildRoadStationWindow::UpdateWidgetSize(), ScriptListWindow::UpdateWidgetSize(), ScriptSettingsWindow::UpdateWidgetSize(), ScriptDebugWindow::UpdateWidgetSize(), GameSettingsWindow::UpdateWidgetSize(), SignListWindow::UpdateWidgetSize(), CompanyStationsWindow::UpdateWidgetSize(), StationViewWindow::UpdateWidgetSize(), SelectStationWindow< T >::UpdateWidgetSize(), SubsidyListWindow::UpdateWidgetSize(), TextfileWindow::UpdateWidgetSize(), TimetableWindow::UpdateWidgetSize(), TownAuthorityWindow::UpdateWidgetSize(), TownDirectoryWindow::UpdateWidgetSize(), RefitWindow::UpdateWidgetSize(), VehicleListWindow::UpdateWidgetSize(), and VehicleDetailsWindow::UpdateWidgetSize().
int Window::scale |
Scale of this window – used to determine how to resize.
Definition at line 304 of file window_gui.h.
Referenced by ReInit().
|
protected |
Data of scheduled OnInvalidateData() calls.
Definition at line 282 of file window_gui.h.
Referenced by InvalidateData(), and ProcessScheduledInvalidations().
|
protected |
Set if window has been resized.
Definition at line 283 of file window_gui.h.
Referenced by ProcessScheduledResize(), and ScheduleResize().
NWidgetStacked* Window::shade_select |
Selection widget (NWID_SELECTION) to use for shading the window. If nullptr
, window cannot shade.
Definition at line 323 of file window_gui.h.
Referenced by SetShaded().
uint8_t Window::timeout_timer |
Timer value of the WF_TIMEOUT for flags.
Definition at line 306 of file window_gui.h.
Referenced by GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), NetworkStartServerWindow::OnClick(), and GameSettingsWindow::OnClick().
int Window::top |
y position of top edge of the window
Definition at line 310 of file window_gui.h.
Referenced by DropdownWindow::Close(), DrawOverlappedWindow(), DrawViewport(), NewGRFWindow::DrawWidget(), OrdersWindow::DrawWidget(), EnsureVisibleCaption(), FindWindowFromPt(), FindWindowPlacementAndResize(), QueryWindow::FindWindowPlacementAndResize(), NetworkAskRelayWindow::FindWindowPlacementAndResize(), NetworkAskSurveyWindow::FindWindowPlacementAndResize(), GetAutoPlacePosition(), DropdownWindow::GetDropDownItem(), GetMainViewBottom(), GetMainViewTop(), GetToolbarAlignedWindowPosition(), HandleActiveWidget(), HandleMouseDragDrop(), HandleMouseOver(), HandleWindowDragging(), InitializePositionSize(), InitializeWindowViewport(), IsGoodAutoPlace1(), IsGoodAutoPlace2(), LocalGetWindowPlacement(), MaybeBringWindowToFront(), SetDateWindow::OnInitialPosition(), NewsWindow::OnInvalidateData(), BuildAirportWindow::OnPaint(), BuildDocksStationWindow::OnPaint(), BuildRailStationWindow::OnPaint(), BuildRoadStationWindow::OnPaint(), PositionWindow(), PreventHiding(), RelocateAllWindows(), ResizeWindow(), SetCandidatePos(), SetCompositionPos(), SetDirty(), NWidgetBase::SetDirty(), NewsWindow::SetWindowTop(), IndustryCargoesWindow::ShortenCargoColumn(), ShowTerraformToolbar(), StartWindowDrag(), and NWidgetViewport::UpdateViewportCoordinates().
Dimension Window::unshaded_size |
Last known unshaded size (only valid while shaded).
Definition at line 324 of file window_gui.h.
Referenced by MaybeBringWindowToFront(), and SetShaded().
ViewportData* Window::viewport |
Pointer to viewport data, if present.
Definition at line 318 of file window_gui.h.
Referenced by ChangeVehicleViewports(), ChangeVehicleWindow(), DEF_CONSOLE_CMD(), DoZoomInOutWindow(), SmallMapWindow::DrawMapIndicators(), DrawViewport(), EnsureVisibleCaption(), FindWindowPlacementAndResize(), LinkGraphOverlay::GetStationMiddle(), HandleAutoscroll(), HandleViewportScroll(), InitializeWindowViewport(), IsPtInWindowViewport(), ViewportSign::MarkDirty(), ExtraViewportWindow::OnClick(), MainWindow::OnHotkey(), MainToolbarWindow::OnInvalidateData(), ScenarioEditorToolbarWindow::OnInvalidateData(), ExtraViewportWindow::OnInvalidateData(), MainWindow::OnMouseWheel(), IndustryViewWindow::OnResize(), MainWindow::OnResize(), NewsWindow::OnResize(), TownViewWindow::OnResize(), VehicleViewWindow::OnResize(), ExtraViewportWindow::OnResize(), WaypointWindow::OnResize(), MainWindow::OnScroll(), ExtraViewportWindow::OnScroll(), MainWindow::OnTooltip(), PositionWindow(), MainWindow::RefreshLinkGraph(), ScrollWindowTo(), SetupScreenshotViewport(), NewsWindow::SetWindowTop(), SmallMapWindow::SmallMapCenterOnCurrentPos(), NWidgetViewport::UpdateViewportCoordinates(), UpdateViewportPosition(), UpdateWindows(), and ~Window().
uint8_t Window::white_border_timer |
Timer value of the WF_WHITE_BORDER for flags.
Definition at line 307 of file window_gui.h.
WidgetLookup Window::widget_lookup |
Indexed access to the nested widget tree. Do not access directly, use Window::GetWidget() instead.
Definition at line 322 of file window_gui.h.
Referenced by CreateNestedTree(), DisableAllWidgetHighlight(), DrawSortButtonState(), DrawWidgets(), GetWidget(), GetWidget(), ScenarioEditorLandscapeGenerationWindow::OnTimeout(), ProcessHighlightedInvalidations(), RaiseButtons(), SetWidgetDirty(), and SetWidgetHighlight().
int Window::width |
width of the window (number of pixels to the right in x direction)
Definition at line 311 of file window_gui.h.
Referenced by GameOptionsWindow::BuildDropDownList(), IndustryCargoesWindow::CalculatePositionInWidget(), VehicleGroupWindow::ComputeGroupInfoSize(), DispatchLeftClickEvent(), NWidgetLeaf::Draw(), StoryBookWindow::DrawActionElement(), NetworkClientListWindow::DrawButtons(), VehicleGroupWindow::DrawGroupInfo(), DrawOverlappedWindow(), TimetableWindow::DrawTimetablePanel(), NewGRFInspectWindow::DrawVehicleChainWidget(), OrdersWindow::DrawWidget(), PickerWindow::DrawWidget(), RefitWindow::DrawWidget(), DrawWidgets(), FindWindowFromPt(), FindWindowPlacementAndResize(), QueryWindow::FindWindowPlacementAndResize(), NetworkAskRelayWindow::FindWindowPlacementAndResize(), NetworkAskSurveyWindow::FindWindowPlacementAndResize(), GetAutoPlacePosition(), NetworkClientListWindow::GetButtonAtPoint(), IConsoleWindow::GetCaretPosition(), TownViewWindow::GetDesiredInfoHeight(), IndustryDirectoryWindow::GetIndustryListWidth(), IConsoleWindow::GetTextBoundingRect(), IConsoleWindow::GetTextCharacterAtPosition(), GetToolbarAlignedWindowPosition(), HandleWindowDragging(), IConsoleResize(), InitializePositionSize(), IsGoodAutoPlace1(), IsGoodAutoPlace2(), LocalGetWindowPlacement(), MaybeBringWindowToFront(), GameSettingsWindow::OnClick(), GameOptionsWindow::OnDropdownSelect(), SetDateWindow::OnInitialPosition(), IConsoleWindow::OnPaint(), DepotWindow::OnPaint(), MainWindow::OnPaint(), PositionWindow(), PreventHiding(), ReInit(), RelocateAllWindows(), ResizeWindow(), SetCandidatePos(), SetDirty(), SetShaded(), GameOptionsWindow::SetStringParameters(), NewsWindow::SetWindowTop(), ShowTerraformToolbar(), BuildVehicleWindow::UpdateWidgetSize(), CheatWindow::UpdateWidgetSize(), CompanyFinancesWindow::UpdateWidgetSize(), SelectCompanyLiveryWindow::UpdateWidgetSize(), CompanyInfrastructureWindow::UpdateWidgetSize(), CompanyWindow::UpdateWidgetSize(), GenerateProgressWindow::UpdateWidgetSize(), BaseGraphWindow::UpdateWidgetSize(), PerformanceRatingDetailWindow::UpdateWidgetSize(), VehicleGroupWindow::UpdateWidgetSize(), PerformanceLeagueWindow::UpdateWidgetSize(), ScriptLeagueWindow::UpdateWidgetSize(), LandInfoWindow::UpdateWidgetSize(), AboutWindow::UpdateWidgetSize(), TooltipsWindow::UpdateWidgetSize(), ScanProgressWindow::UpdateWidgetSize(), GameOptionsWindow::UpdateWidgetSize(), GameSettingsWindow::UpdateWidgetSize(), StationViewWindow::UpdateWidgetSize(), TimetableWindow::UpdateWidgetSize(), ScenarioEditorToolbarWindow::UpdateWidgetSize(), TownAuthorityWindow::UpdateWidgetSize(), VehicleListWindow::UpdateWidgetSize(), and VehicleDetailsWindow::UpdateWidgetSize().
WindowClass Window::window_class |
Window class.
Definition at line 301 of file window_gui.h.
Referenced by BringWindowToFront(), CheckSoftLimit(), DispatchLeftClickEvent(), BuildRoadStationWindow::DrawWidget(), EditBoxInGlobalFocus(), FocusedWindowIsConsole(), GetAutoPlacePosition(), BuildRoadStationWindow::GetRoadStationTypeByWindowClass(), HandleAutoscroll(), HandleEditBoxKey(), HandleKeypress(), HandlePlacePushButton(), HandleTextInput(), InitializeData(), InvalidateWindowClassesData(), InvalidateWindowData(), IsGoodAutoPlace1(), IsGoodAutoPlace2(), MaybeBringWindowToFront(), MayBeShown(), BuildRoadStationWindow::OnPaint(), PositionWindow(), ProcessScheduledInvalidations(), ReInitAllWindows(), RelocateAllWindows(), SetCandidatePos(), SetFocusedWindow(), SetObjectToPlaceWnd(), SetWindowClassesDirty(), SetWindowDirty(), SetWindowWidgetDirty(), ShowQuery(), ShowScriptDebugWindow(), and BuildTreesWindow::UpdateMode().
WindowDesc& Window::window_desc |
Window description.
Definition at line 299 of file window_gui.h.
Referenced by ApplyDefaults(), CloseAllNonVitalWindows(), CloseConstructionWindows(), CloseNonVitalWindows(), CreateNestedTree(), DispatchLeftClickEvent(), DispatchRightClickEvent(), FinishInitNested(), HandleKeypress(), HandleToolbarHotkey(), InitializeData(), MaybeBringWindowToFront(), OnInitialPosition(), and ReInit().
WindowNumber Window::window_number |
Window number within the window class.
Definition at line 302 of file window_gui.h.
Referenced by RefitWindow::BuildRefitList(), ChangeTimetableStartCallback(), ChangeVehicleWindow(), DepotWindow::Close(), EndGameWindow::Close(), TownViewWindow::Close(), WaypointWindow::Close(), DispatchLeftClickEvent(), DoSelectCompanyManagerFace(), IndustryViewWindow::DrawInfo(), NewGRFInspectWindow::DrawMainPanelWidget(), NewGRFInspectWindow::DrawVehicleChainWidget(), ReplaceVehicleWindow::DrawWidget(), CompanyFinancesWindow::DrawWidget(), SelectCompanyLiveryWindow::DrawWidget(), SelectCompanyManagerFaceWindow::DrawWidget(), CompanyInfrastructureWindow::DrawWidget(), CompanyWindow::DrawWidget(), EnginePreviewWindow::DrawWidget(), RefitWindow::DrawWidget(), ReplaceVehicleWindow::GenerateReplaceVehList(), DepotWindow::GetDepotIndex(), NewGRFInspectWindow::GetFeatureIndex(), CompanyInfrastructureWindow::GetTotalMaintenanceCost(), GoalListWindow::HandleClick(), HandlePlacePushButton(), NewGRFInspectWindow::HasChainIndex(), InitializeData(), InvalidateWindowData(), IndustryViewWindow::IsNewGRFInspectable(), ReplaceVehicleWindow::OnClick(), CompanyFinancesWindow::OnClick(), SelectCompanyLiveryWindow::OnClick(), CompanyWindow::OnClick(), DepotWindow::OnClick(), GoalQuestionWindow::OnClick(), IndustryViewWindow::OnClick(), NewGRFInspectWindow::OnClick(), TownViewWindow::OnClick(), RefitWindow::OnClick(), WaypointWindow::OnClick(), ReplaceVehicleWindow::OnDropdownSelect(), SelectCompanyLiveryWindow::OnDropdownSelect(), VehicleViewWindow::OnHotkey(), OnInitialPosition(), SelectCompanyLiveryWindow::OnInvalidateData(), EnginePreviewWindow::OnInvalidateData(), IndustryViewWindow::OnInvalidateData(), OrdersWindow::OnInvalidateData(), TimetableWindow::OnInvalidateData(), RefitWindow::OnInvalidateData(), StoryBookWindow::OnPageElementClick(), CompanyFinancesWindow::OnPaint(), SelectCompanyLiveryWindow::OnPaint(), CompanyWindow::OnPaint(), DepotWindow::OnPaint(), HighScoreWindow::OnPaint(), CompanyWindow::OnQueryTextFinished(), IndustryViewWindow::OnQueryTextFinished(), NewGRFInspectWindow::OnQueryTextFinished(), TownViewWindow::OnQueryTextFinished(), WaypointWindow::OnQueryTextFinished(), IndustryViewWindow::OnResize(), RefitWindow::OnResize(), ReInit(), SetObjectToPlaceWnd(), ReplaceVehicleWindow::SetStringParameters(), CompanyFinancesWindow::SetStringParameters(), SelectCompanyLiveryWindow::SetStringParameters(), CompanyInfrastructureWindow::SetStringParameters(), CompanyWindow::SetStringParameters(), GoalListWindow::SetStringParameters(), IndustryViewWindow::SetStringParameters(), NewGRFInspectWindow::SetStringParameters(), TownAuthorityWindow::SetStringParameters(), RefitWindow::SetStringParameters(), CompanyFinancesWindow::SetupWidgets(), SetWindowDirty(), SetWindowWidgetDirty(), IndustryViewWindow::ShowNewGRFInspectWindow(), ShowScriptDebugWindow(), BuildVehicleWindow::UpdateFilterByTile(), BuildTreesWindow::UpdateMode(), ReplaceVehicleWindow::UpdateWidgetSize(), SelectCompanyLiveryWindow::UpdateWidgetSize(), CompanyInfrastructureWindow::UpdateWidgetSize(), EnginePreviewWindow::UpdateWidgetSize(), NewGRFInspectWindow::UpdateWidgetSize(), RefitWindow::UpdateWidgetSize(), NewGRFInspectWindow::ValidateChainIndex(), VehicleDetailsWindow::VehicleDetailsWindow(), and WaypointWindow::WaypointWindow().
WindowList::iterator Window::z_position |
Definition at line 329 of file window_gui.h.