OpenTTD Source: src/toolbar_gui.h File Reference

OpenTTD Source 15.0-RC2

Enumerations | Functions | Variables
toolbar_gui.h File Reference

Stuff related to the (main) toolbar. More...

Go to the source code of this file.

## Enumerations
enum | MainToolbarHotkeys : int32_t { MTHK_PAUSE , MTHK_FASTFORWARD , MTHK_SETTINGS , MTHK_SAVEGAME , MTHK_LOADGAME , MTHK_SMALLMAP , MTHK_TOWNDIRECTORY , MTHK_SUBSIDIES , MTHK_STATIONS , MTHK_FINANCES , MTHK_COMPANIES , MTHK_STORY , MTHK_GOAL , MTHK_GRAPHS , MTHK_LEAGUE , MTHK_INDUSTRIES , MTHK_TRAIN_LIST , MTHK_ROADVEH_LIST , MTHK_SHIP_LIST , MTHK_AIRCRAFT_LIST , MTHK_ZOOM_IN , MTHK_ZOOM_OUT , MTHK_BUILD_RAIL , MTHK_BUILD_ROAD , MTHK_BUILD_TRAM , MTHK_BUILD_DOCKS , MTHK_BUILD_AIRPORT , MTHK_BUILD_TREES , MTHK_MUSIC , MTHK_LANDINFO , MTHK_SCRIPT_DEBUG , MTHK_SMALL_SCREENSHOT , MTHK_ZOOMEDIN_SCREENSHOT , MTHK_DEFAULTZOOM_SCREENSHOT , MTHK_GIANT_SCREENSHOT , MTHK_CHEATS , MTHK_TERRAFORM , MTHK_EXTRA_VIEWPORT , MTHK_CLIENT_LIST , MTHK_SIGN_LIST }

## Functions
void | AllocateToolbar ()
| Allocate the toolbar.
void | ToggleBoundingBoxes ()
| Toggle drawing of sprites' bounding boxes.
void | ToggleDirtyBlocks ()
| Toggle drawing of the dirty blocks.
void | ToggleWidgetOutlines ()
| Toggle drawing of widget outlines.

## Variables
uint | _toolbar_width
| Width of the toolbar, shared by statusbar.

## Detailed Description

Stuff related to the (main) toolbar.

Definition in file toolbar_gui.h.

## Enumeration Type Documentation

## ◆ MainToolbarHotkeys

enum MainToolbarHotkeys : int32_t

Definition at line 13 of file toolbar_gui.h.

## Function Documentation

## ◆ AllocateToolbar()

void AllocateToolbar | ( |  | ) |

Allocate the toolbar.

Definition at line 2572 of file toolbar_gui.cpp.

References ROADTYPE_ROAD, and ROADTYPE_TRAM.

Referenced by ShowVitalWindows().

## ◆ ToggleBoundingBoxes()

void ToggleBoundingBoxes | ( |  | ) |

Toggle drawing of sprites' bounding boxes.

Note
  has only an effect when newgrf_developer_tools are active.

Function is found here and not in viewport.cpp in order to avoid importing the settings structs to there.

Definition at line 1086 of file toolbar_gui.cpp.

References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.

Referenced by MenuClickHelp(), and MainWindow::OnHotkey().

## ◆ ToggleDirtyBlocks()

void ToggleDirtyBlocks | ( |  | ) |

Toggle drawing of the dirty blocks.

Note
  has only an effect when newgrf_developer_tools are active.

Function is found here and not in viewport.cpp in order to avoid importing the settings structs to there.

Definition at line 1103 of file toolbar_gui.cpp.

References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.

Referenced by MenuClickHelp(), and MainWindow::OnHotkey().

## ◆ ToggleWidgetOutlines()

void ToggleWidgetOutlines | ( |  | ) |

Toggle drawing of widget outlines.

Note
  has only an effect when newgrf_developer_tools are active.

Definition at line 1117 of file toolbar_gui.cpp.

References _settings_client, ClientSettings::gui, MarkWholeScreenDirty(), and GUISettings::newgrf_developer_tools.

Referenced by MenuClickHelp(), and MainWindow::OnHotkey().

## Variable Documentation

## ◆ _toolbar_width

uint _toolbar_width
| extern

Width of the toolbar, shared by statusbar.

Definition at line 78 of file toolbar_gui.cpp.

Referenced by NetworkChatWindow::FindWindowPlacementAndResize(), StatusBarWindow::FindWindowPlacementAndResize(), MainToolbarWindow::FindWindowPlacementAndResize(), ScenarioEditorToolbarWindow::FindWindowPlacementAndResize(), RelocateAllWindows(), NWidgetToolbarContainer::SetupSmallestSize(), and NWidgetScenarioToolbarContainer::SetupSmallestSize().