12 #ifndef VEHICLE_GUI_BASE_H 13 #define VEHICLE_GUI_BASE_H 29 enum ActionDropdownItem {
37 static const StringID vehicle_depot_name[];
38 static const StringID vehicle_sorter_names[];
47 void SortVehicleList();
48 void BuildVehicleList();
Base types for having sorted lists in GUIs.
DropDownList * BuildActionDropdownList(bool show_autoreplace, bool show_group)
Display the Action dropdown window.
The information about a vehicle list.
Window(WindowDesc *desc)
Empty constructor, initialization has been moved to InitNested() called from the constructor of the d...
High level window description.
Functions and type for generating vehicle lists.
void SetSortFuncs(SortFunction *const *n_funcs)
Hand the array of sort function pointers to the sort list.
GUIVehicleList vehicles
The list of vehicles.
Functions, definitions and such used only by the GUI.
Data structure for an opened window.
void DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const
Draw all the vehicle list items.
VehicleType
Available vehicle types.
uint32 VehicleID
The type all our vehicle IDs have.
Simple vector template class, with automatic delete.
static VehicleListIdentifier UnPack(uint32 data)
Decode a packed vehicle list identifier into a new one.
Types related to the drop down widget.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
uint GetVehicleListHeight(VehicleType type, uint divisor=1)
Get the height of a vehicle in the vehicle list GUIs.
int CDECL SortFunction(const T *, const T *)
Signature of sort function.
VehicleListIdentifier vli
Identifier of the vehicle list we want to currently show.
Data structure describing how to show the list (what sort direction and criteria).
int32 WindowNumber
Number to differentiate different windows of the same class.
Specification of a rectangle with absolute coordinates of all edges.
byte unitnumber_digits
The number of digits of the highest unit number.
Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group)
Compute the size for the Action dropdown.
Listing * sorting
Pointer to the vehicle type related sorting.
Dimensions (a width and height) of a rectangle in 2D.