OpenTTD Source: src/group_type.h File Reference

OpenTTD Source 15.0-beta1

Typedefs | Variables
group_type.h File Reference

Types of a group. More...

Go to the source code of this file.

## Typedefs
typedef uint16_t | GroupID
| Type for all group identifiers.

## Variables
static const GroupID | NEW_GROUP = 0xFFFC
| Sentinel for a to-be-created group.
static const GroupID | ALL_GROUP = 0xFFFD
| All vehicles are in this group.
static const GroupID | DEFAULT_GROUP = 0xFFFE
| Ungrouped vehicles are in this group.
static const GroupID | INVALID_GROUP = 0xFFFF
| Sentinel for invalid groups.
static const uint | MAX_LENGTH_GROUP_NAME_CHARS = 32
| The maximum length of a group name in characters including '\0'.

## Detailed Description

Types of a group.

Definition in file group_type.h.

## Typedef Documentation

## ◆ GroupID

typedef uint16_t GroupID

Type for all group identifiers.

Definition at line 13 of file group_type.h.

## Variable Documentation

## ◆ ALL_GROUP

const GroupID ALL_GROUP = 0xFFFD
| static

All vehicles are in this group.

Definition at line 16 of file group_type.h.

Referenced by VehicleGroupWindow::ComputeGroupInfoSize(), VehicleGroupWindow::DrawWidget(), EngineReplacement(), GenerateVehicleSortList(), GroupStatistics::GetAllGroup(), InvalidateAutoreplaceWindow(), IsAllGroupID(), ERNWChunkHandler::Load(), ReplaceVehicleWindow::OnClick(), VehicleGroupWindow::OnClick(), VehicleListWindow::OnDropdownSelect(), VehicleGroupWindow::OnInvalidateData(), VehicleGroupWindow::SelectGroup(), and ReplaceVehicleWindow::SetStringParameters().

## ◆ DEFAULT_GROUP

const GroupID DEFAULT_GROUP = 0xFFFE
| static

Ungrouped vehicles are in this group.

Definition at line 17 of file group_type.h.

Referenced by OrderBackup::ClearGroup(), CmdBuildRailVehicle(), CmdBuildRailWagon(), CmdMoveRailVehicle(), CmdRemoveAllVehiclesGroup(), BaseVehicleListWindow::DrawVehicleListItems(), BuildVehicleWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), EngineReplacement(), FormatString(), ERNWChunkHandler::Load(), VEHSChunkHandler::Load(), VehicleGroupWindow::OnClick(), VehicleGroupWindow::OnMouseDrag(), VehicleGroupWindow::SelectGroup(), ReplaceVehicleWindow::SetStringParameters(), UpdateTrainGroupID(), and Vehicle::Vehicle().

## ◆ INVALID_GROUP

const GroupID INVALID_GROUP = 0xFFFF
| static

Sentinel for invalid groups.

Definition at line 18 of file group_type.h.

Referenced by BuildGuiGroupList(), CmdAddVehicleGroup(), CmdAlterGroup(), CmdCreateGroup(), VehicleGroupWindow::DirtyHighlightedGroupWidget(), GetEngineLivery(), GroupIsInGroup(), GRPSChunkHandler::Load(), SelectCompanyLiveryWindow::OnClick(), CompanyWindow::OnClick(), VehicleGroupWindow::OnClick(), VehicleGroupWindow::OnDragDrop(), SelectCompanyLiveryWindow::OnInvalidateData(), VehicleGroupWindow::OnInvalidateData(), VehicleGroupWindow::OnMouseDrag(), SelectCompanyLiveryWindow::OnPaint(), VehicleGroupWindow::OnPlaceObjectAbort(), VehicleGroupWindow::OnQueryTextFinished(), VehicleGroupWindow::SelectGroup(), SelectCompanyLiveryWindow::SetStringParameters(), and UpdateCompanyGroupLiveries().

## ◆ MAX_LENGTH_GROUP_NAME_CHARS

const uint MAX_LENGTH_GROUP_NAME_CHARS = 32
| static

The maximum length of a group name in characters including '\0'.

Definition at line 20 of file group_type.h.

Referenced by CmdAlterGroup().

## ◆ NEW_GROUP

const GroupID NEW_GROUP = 0xFFFC
| static

Sentinel for a to-be-created group.

Definition at line 15 of file group_type.h.

Referenced by CmdAddVehicleGroup(), VehicleGroupWindow::DrawGroupInfo(), VehicleGroupWindow::DrawWidget(), VehicleGroupWindow::OnDropdownSelect(), VehicleListWindow::OnDropdownSelect(), and VehicleGroupWindow::OnMouseDrag().