OpenTTD Source: CargoFilterCriteria Namespace Reference

OpenTTD Source 15.3

Variables
CargoFilterCriteria Namespace Reference

Special cargo filter criteria. More...

## Variables
static constexpr CargoType | CF_ANY = NUM_CARGO
| Show all items independent of carried cargo (i.e. no filtering)
static constexpr CargoType | CF_NONE = NUM_CARGO + 1
| Show only items which do not carry cargo (e.g. train engines)
static constexpr CargoType | CF_ENGINES = NUM_CARGO + 2
| Show only engines (for rail vehicles only)
static constexpr CargoType | CF_FREIGHT = NUM_CARGO + 3
| Show only vehicles which carry any freight (non-passenger) cargo.
static constexpr CargoType | CF_NO_RATING = NUM_CARGO + 4
| Show items with no rating (station list)
static constexpr CargoType | CF_SELECT_ALL = NUM_CARGO + 5
| Select all items (station list)
static constexpr CargoType | CF_EXPAND_LIST = NUM_CARGO + 6
| Expand list to show all items (station list)

## Detailed Description

Special cargo filter criteria.

These are used by user interface code only and must not be assigned to any entity. Not all values are valid for every UI filter.

## Variable Documentation

## ◆ CF_ANY

constexpr CargoType CargoFilterCriteria::CF_ANY = NUM_CARGO
| staticconstexpr

Show all items independent of carried cargo (i.e. no filtering)

Definition at line 93 of file cargo_type.h.

Referenced by BaseVehicleListWindow::BuildCargoDropDownList(), CargoAndEngineFilter(), CargoFilter(), CargoFilterSingle(), IndustryDirectoryWindow::DrawWidget(), IndustryDirectoryWindow::GetCargoTransportedSortValue(), IndustryDirectoryWindow::GetIndustryString(), IndustryDirectoryWindow::IndustryProductionSorter(), BuildVehicleWindow::OnDropdownSelect(), IndustryDirectoryWindow::SetAcceptedCargoFilter(), BaseVehicleListWindow::SetCargoFilter(), BuildVehicleWindow::SetCargoFilterArray(), IndustryDirectoryWindow::SetCargoFilterArray(), BaseVehicleListWindow::SetCargoFilterArray(), and IndustryDirectoryWindow::SetProducedCargoFilter().

## ◆ CF_ENGINES

constexpr CargoType CargoFilterCriteria::CF_ENGINES = NUM_CARGO + 2
| staticconstexpr

Show only engines (for rail vehicles only)

Definition at line 95 of file cargo_type.h.

Referenced by CargoAndEngineFilter().

## ◆ CF_EXPAND_LIST

constexpr CargoType CargoFilterCriteria::CF_EXPAND_LIST = NUM_CARGO + 6
| staticconstexpr

Expand list to show all items (station list)

Definition at line 100 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().

## ◆ CF_FREIGHT

constexpr CargoType CargoFilterCriteria::CF_FREIGHT = NUM_CARGO + 3
| staticconstexpr

Show only vehicles which carry any freight (non-passenger) cargo.

Definition at line 96 of file cargo_type.h.

Referenced by BaseVehicleListWindow::BuildCargoDropDownList(), and CargoFilterSingle().

## ◆ CF_NO_RATING

constexpr CargoType CargoFilterCriteria::CF_NO_RATING = NUM_CARGO + 4
| staticconstexpr

Show items with no rating (station list)

Definition at line 98 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().

## ◆ CF_NONE

constexpr CargoType CargoFilterCriteria::CF_NONE = NUM_CARGO + 1
| staticconstexpr

Show only items which do not carry cargo (e.g. train engines)

Definition at line 94 of file cargo_type.h.

Referenced by BaseVehicleListWindow::BuildCargoDropDownList(), CargoAndEngineFilter(), CargoFilter(), CargoFilterSingle(), IndustryDirectoryWindow::DrawWidget(), IndustryDirectoryWindow::GetCargoTransportedSortValue(), IndustryDirectoryWindow::GetIndustryString(), and IndustryDirectoryWindow::IndustryProductionSorter().

## ◆ CF_SELECT_ALL

constexpr CargoType CargoFilterCriteria::CF_SELECT_ALL = NUM_CARGO + 5
| staticconstexpr

Select all items (station list)

Definition at line 99 of file cargo_type.h.

Referenced by CompanyStationsWindow::OnDropdownSelect().