OpenTTD Source 20241224-master-gf74b0cf984
|
Functions/definitions that have something to do with groups. More...
Go to the source code of this file.
Data Structures | |
struct | GUIGroupListItem |
Typedefs | |
using | GUIGroupList = GUIList< GUIGroupListItem > |
Functions | |
void | ShowCompanyGroup (CompanyID company, VehicleType veh, GroupID group=INVALID_GROUP, bool need_existing_window=false) |
Show the group window for the given company and vehicle type. | |
void | ShowCompanyGroupForVehicle (const Vehicle *v) |
Show the group window for the given vehicle. | |
void | DeleteGroupHighlightOfVehicle (const Vehicle *v) |
Removes the highlight of a vehicle in a group window. | |
void | BuildGuiGroupList (GUIGroupList &dst, bool fold, Owner owner, VehicleType veh_type) |
Build GUI group list, a sorted hierarchical list of groups for owner and vehicle type. | |
Functions/definitions that have something to do with groups.
Definition in file group_gui.h.
using GUIGroupList = GUIList<GUIGroupListItem> |
Definition at line 28 of file group_gui.h.
void BuildGuiGroupList | ( | GUIGroupList & | dst, |
bool | fold, | ||
Owner | owner, | ||
VehicleType | veh_type | ||
) |
Build GUI group list, a sorted hierarchical list of groups for owner and vehicle type.
dst | Destination list, owned by the caller. |
fold | Whether to handle group folding/hiding. |
owner | Owner of groups. |
veh_type | Vehicle type of groups. |
Definition at line 156 of file group_gui.cpp.
References GUIList< T, P, F >::ForceResort(), GetString(), GuiGroupListAddChildren(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, INVALID_GROUP, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_group_pool >::Iterate(), Group::number, SetDParam(), GUIList< T, P, F >::Sort(), and StrNaturalCompare().
Referenced by VehicleGroupWindow::BuildGroupList().
void DeleteGroupHighlightOfVehicle | ( | const Vehicle * | v | ) |
Removes the highlight of a vehicle in a group window.
*v | Vehicle to remove all highlights from |
Definition at line 1252 of file group_gui.cpp.
References _special_mouse_mode, FindVehicleGroupWindow(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, Vehicle::owner, BaseVehicle::type, VehicleGroupWindow::UnselectVehicle(), and WSM_DRAGDROP.
Referenced by Vehicle::PreDestructor().
void ShowCompanyGroup | ( | CompanyID | company, |
VehicleType | vehicle_type, | ||
GroupID | group, | ||
bool | need_existing_window | ||
) |
Show the group window for the given company and vehicle type.
company | The company to show the window for. |
vehicle_type | The type of vehicle to show it for. |
group | The group to be selected. Defaults to INVALID_GROUP. |
need_existing_window | Whether the existing window is needed. Defaults to false. |
Definition at line 1175 of file group_gui.cpp.
References WindowDesc::cls, GetWindowClassForVehicleType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), VehicleListIdentifier::Pack(), VehicleGroupWindow::SelectGroup(), and VEH_TRAIN.
Referenced by ShowCompanyGroupForVehicle().
void ShowCompanyGroupForVehicle | ( | const Vehicle * | v | ) |
Show the group window for the given vehicle.
v | The vehicle to show the window for. |
Definition at line 1194 of file group_gui.cpp.
References Vehicle::group_id, Vehicle::owner, ShowCompanyGroup(), and BaseVehicle::type.
Referenced by NewsWindow::OnClick(), VehicleListWindow::OnClick(), and VehicleViewWindow::OnClick().