Container for the scenario editor's toolbar. More...
Private Member Functions | |
| void | SetupSmallestSize (Window *w, bool init_array) |
| Compute smallest size needed by the widget. | |
| const byte * | GetButtonArrangement (uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const |
| Get the arrangement of the buttons for the toolbar. | |
Private Attributes | |
| uint | panel_widths [2] |
| The width of the two panels (the text panel and date panel). | |
Container for the scenario editor's toolbar.
Definition at line 1248 of file toolbar_gui.cpp.
| const byte* NWidgetScenarioToolbarContainer::GetButtonArrangement | ( | uint & | width, | |
| uint & | arrangable_count, | |||
| uint & | button_count, | |||
| uint & | spacer_count | |||
| ) | const [inline, private, virtual] |
Get the arrangement of the buttons for the toolbar.
| width | the new width of the toolbar | |
| arrangable_count | output of the number of visible items | |
| button_count | output of the number of visible buttons | |
| spacer_count | output of the number of spacers |
Implements NWidgetToolbarContainer.
Definition at line 1266 of file toolbar_gui.cpp.
References lengthof, panel_widths, NWidgetBase::smallest_x, and NWidgetToolbarContainer::spacers.
| void NWidgetScenarioToolbarContainer::SetupSmallestSize | ( | Window * | w, | |
| bool | init_array | |||
| ) | [inline, private, virtual] |
Compute smallest size needed by the widget.
The smallest size of a widget is the smallest size that a widget needs to display itself properly. In addition, filling and resizing of the widget are computed. The function calls Window::UpdateWidgetSize for each leaf widget and background widget without child with a non-negative index.
| w | Window owning the widget. | |
| init_array | Initialize the w->nested_array. |
Reimplemented from NWidgetToolbarContainer.
Definition at line 1251 of file toolbar_gui.cpp.
References NWidgetContainer::head, lengthof, NWidgetBase::next, NWID_SPACER, and panel_widths.
1.7.1