OpenTTD Source: CargoesRow Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
CargoesRow Struct Reference

A single row of CargoesField. More...

## Public Member Functions
void | ConnectIndustryProduced (int column)
| Connect industry production cargoes to the cargo column after it.
void | MakeCargoLabel (int column, bool accepting)
| Construct a CFT_CARGO_LABEL field.
void | ConnectIndustryAccepted (int column)
| Connect industry accepted cargoes to the cargo column before it.

## Data Fields
CargoesField | columns [5]
| One row of fields.

## Detailed Description

A single row of CargoesField.

Definition at line 2393 of file industry_gui.cpp.

## Member Function Documentation

## ◆ ConnectIndustryAccepted()

void CargoesRow::ConnectIndustryAccepted | ( | int | column | ) |
| inline

Connect industry accepted cargoes to the cargo column before it.

Parameters

  column | Column of the industry.

Definition at line 2459 of file industry_gui.cpp.

References IndustrySpec::accepts_cargo, CargoesField::cargo, CFT_CARGO, CFT_INDUSTRY, CargoesField::ConnectCargo(), CargoesField::cust_cargoes, GetIndustrySpec(), HasBit(), CargoesField::ind_type, CargoesField::industry, lengthof, MAX_CARGOES, CargoesField::max_cargoes, CargoesField::num_cargoes, NUM_INDUSTRYTYPES, CargoesField::other_accepted, HouseSpec::Specs(), CargoesField::type, and CargoesField::vertical_cargoes.

## ◆ ConnectIndustryProduced()

void CargoesRow::ConnectIndustryProduced | ( | int | column | ) |
| inline

Connect industry production cargoes to the cargo column after it.

Parameters

  column | Column of the industry.

Definition at line 2400 of file industry_gui.cpp.

References CargoesField::cargo, CFT_CARGO, CFT_INDUSTRY, CargoesField::ConnectCargo(), CargoSpec::Get(), GetIndustrySpec(), HasBit(), CargoesField::ind_type, CargoesField::industry, MAX_CARGOES, CargoesField::max_cargoes, CargoesField::num_cargoes, NUM_INDUSTRYTYPES, CargoesField::other_produced, CargoesField::supp_cargoes, CargoSpec::town_production_effect, TPE_MAIL, TPE_PASSENGERS, CargoesField::type, and CargoesField::vertical_cargoes.

## ◆ MakeCargoLabel()

void CargoesRow::MakeCargoLabel | ( | int | column,
|  | bool | accepting
| ) |  |
| inline

Construct a CFT_CARGO_LABEL field.

Parameters

  column | Column to create the new field.
  accepting | Display accepted cargo (if `false`, display produced cargo).

Definition at line 2438 of file industry_gui.cpp.

References CargoesField::cargo, CFT_CARGO, CFT_EMPTY, CargoesField::ConnectCargo(), CargoesField::MakeCargoLabel(), MAX_CARGOES, CargoesField::num_cargoes, CargoesField::type, and CargoesField::vertical_cargoes.

## Field Documentation

## ◆ columns

CargoesField CargoesRow::columns[5]

One row of fields.

Definition at line 2394 of file industry_gui.cpp.

Referenced by IndustryCargoesWindow::ComputeCargoDisplay(), and IndustryCargoesWindow::ComputeIndustryDisplay().

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

- src/industry_gui.cpp