# VehicleListWindow Struct Reference

Window for the (old) vehicle listing. More...

Inheritance diagram for VehicleListWindow:

## Public Member Functions
| VehicleListWindow (const WindowDesc *desc, WindowNumber window_number)
virtual void | OnPaint ()
| This window is currently being repainted.
virtual void | OnClick (Point pt, int widget)
| 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 void | OnTick ()
| Called once per (game) tick.
virtual void | OnResize (Point new_size, Point delta)
| Called when the window got resized.
virtual void | OnInvalidateData (int data)
| Some data on this window has become invalid.

## Detailed Description

Window for the (old) vehicle listing.

bitmask for w->window_number 0-7 CompanyID (owner) 8-10 window type (use flags in vehicle_gui.h) 11-15 vehicle type (using VEH_, but can be compressed to fewer bytes if needed) 16-31 StationID or OrderID depending on window type (bit 8-10)

Definition at line 808 of file vehicle_gui.cpp.

## Member Function Documentation

virtual void VehicleListWindow::OnClick | ( | Point | pt,
|  | int | widget |
| ) |  |  | `[inline, virtual]`

A click with the left mouse button has been made on the window.

Parameters:

  | pt | the point inside the window that has been clicked.
  | widget | the clicked widget.

Reimplemented from Window.

Definition at line 1013 of file vehicle_gui.cpp.

References Scrollbar::cap, CMD_MASS_START_STOP, DoCommandP(), GB(), INVALID_STRING_ID, INVALID_TILE, Scrollbar::pos, Window::resize, Window::SetDirty(), ShowVehicleViewWindow(), ResizeInfo::step_height, Window::vscroll, and Point::y.

virtual void VehicleListWindow::OnDropdownSelect | ( | int | widget,
|  | int | index |
| ) |  |  | `[inline, virtual]`

A dropdown option associated to this window has been selected.

Parameters:

  | 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 1070 of file vehicle_gui.cpp.

References DEFAULT_GROUP, DEPOT_MASS_SEND, DEPOT_SERVICE, DoCommandP(), GB(), and Window::SetDirty().

virtual void VehicleListWindow::OnResize | ( | Point | new_size,
|  | Point | delta |
| ) |  |  | `[inline, virtual]`

Called when the window got resized.

Parameters:

  | new_size | the new size of the window.
  | delta | the amount of which the window size changed.

Reimplemented from Window.

Definition at line 1113 of file vehicle_gui.cpp.

References Scrollbar::cap, Window::resize, ResizeInfo::step_height, Window::vscroll, and Point::y.

virtual void VehicleListWindow::OnInvalidateData | ( | int | data | ) | `[inline, virtual]`

Some data on this window has become invalid.

Parameters:

  | data | information about the changed data.

Reimplemented from Window.

Definition at line 1119 of file vehicle_gui.cpp.

References GB(), HasBit(), and SB().

The documentation for this struct was generated from the following file:

- src/vehicle_gui.cpp