Main toolbar. More...
Public Member Functions | |
| MainToolbarWindow (const WindowDesc *desc) | |
| virtual void | OnPaint () |
| The window must be repainted. | |
| virtual void | OnClick (Point pt, int widget, int click_count) |
| A click with the left mouse button has been made on the window. | |
| virtual void | OnDropdownSelect (int widget, int index) |
| A dropdown option associated to this window has been selected. | |
| virtual EventState | OnKeyPress (uint16 key, uint16 keycode) |
| A key has been pressed. | |
| virtual void | OnPlaceObject (Point pt, TileIndex tile) |
| The user clicked some place on the map when a tile highlight mode has been set. | |
| virtual void | OnTick () |
| Called once per (game) tick. | |
| virtual void | OnTimeout () |
| Called when this window's timeout has been reached. | |
| virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
| Some data on this window has become invalid. | |
Data Fields | |
| CallBackFunction | last_started_action |
| Last started user action. | |
Static Public Attributes | |
| static Hotkey< MainToolbarWindow > | maintoolbar_hotkeys [] |
Main toolbar.
Definition at line 1512 of file toolbar_gui.cpp.
| virtual void MainToolbarWindow::OnClick | ( | Point | pt, | |
| int | widget, | |||
| int | click_count | |||
| ) | [inline, virtual] |
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 from Window.
Definition at line 1542 of file toolbar_gui.cpp.
References Window::IsWidgetDisabled().
| virtual void MainToolbarWindow::OnDropdownSelect | ( | int | widget, | |
| int | index | |||
| ) | [inline, virtual] |
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 from Window.
Definition at line 1547 of file toolbar_gui.cpp.
References last_started_action.
| virtual void MainToolbarWindow::OnInvalidateData | ( | int | data = 0, |
|
| bool | gui_scope = true | |||
| ) | [inline, virtual] |
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 from Window.
Definition at line 1644 of file toolbar_gui.cpp.
References FindWindowById(), HandleZoomMessage(), Window::viewport, WC_MAIN_WINDOW, WID_TN_ZOOM_IN, and WID_TN_ZOOM_OUT.
| virtual EventState MainToolbarWindow::OnKeyPress | ( | uint16 | key, | |
| uint16 | keycode | |||
| ) | [inline, virtual] |
A key has been pressed.
| key | the Unicode value of the key. | |
| keycode | the untranslated key code including shift state. |
Reimplemented from Window.
Definition at line 1553 of file toolbar_gui.cpp.
References _local_company, _networking, CanBuildVehicleInfrastructure(), CheckHotkeyMatch(), MenuClickSaveLoad(), ShowAIDebugWindow(), ShowBuildAirToolbar(), ShowBuildDocksToolbar(), ShowBuildRailToolbar(), ShowBuildRoadToolbar(), ShowCheatWindow(), ShowCompany(), ShowCompanyFinances(), ShowCompanyStations(), ShowExtraViewPortWindowForTileUnderCursor(), ShowGameOptions(), ShowSaveLoadDialog(), ShowSignList(), ShowSmallMap(), ShowTerraformToolbar(), SLD_LOAD_GAME, ToolbarFastForwardClick(), VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
| virtual void MainToolbarWindow::OnPaint | ( | ) | [inline, virtual] |
The window must be repainted.
Reimplemented from Window.
Definition at line 1527 of file toolbar_gui.cpp.
References _local_company, CanBuildVehicleInfrastructure(), COMPANY_SPECTATOR, Window::DrawWidgets(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetNumItems(), Window::SetWidgetDisabledState(), Window::SetWidgetsDisabledState(), VEH_AIRCRAFT, VEH_TRAIN, WID_TN_AIR, WID_TN_AIRCRAFTS, WID_TN_FINANCES, WID_TN_LANDSCAPE, WID_TN_RAILS, WID_TN_ROADS, WID_TN_ROADVEHS, WID_TN_SHIPS, WID_TN_STATIONS, WID_TN_TRAINS, WID_TN_WATER, and WIDGET_LIST_END.
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 from Window.
Definition at line 1599 of file toolbar_gui.cpp.
References last_started_action, PlaceProc_Sign(), and ShowLandInfo().
1.7.1