OpenTTD Source  1.11.2
industry_gui.cpp File Reference
#include "stdafx.h"
#include "error.h"
#include "gui.h"
#include "settings_gui.h"
#include "sound_func.h"
#include "window_func.h"
#include "textbuf_gui.h"
#include "command_func.h"
#include "viewport_func.h"
#include "industry.h"
#include "town.h"
#include "cheat_type.h"
#include "newgrf_industries.h"
#include "newgrf_text.h"
#include "newgrf_debug.h"
#include "network/network.h"
#include "strings_func.h"
#include "company_func.h"
#include "tilehighlight_func.h"
#include "string_func.h"
#include "sortlist_type.h"
#include "widgets/dropdown_func.h"
#include "company_base.h"
#include "core/geometry_func.hpp"
#include "core/random_func.hpp"
#include "core/backup_type.hpp"
#include "genworld.h"
#include "smallmap_gui.h"
#include "widgets/dropdown_type.h"
#include "widgets/industry_widget.h"
#include "clear_map.h"
#include "table/strings.h"
#include <bitset>
#include "safeguards.h"

Go to the source code of this file.

Data Structures

struct  CargoSuffix
 Transfer storage of cargo suffix information. More...
 
class  BuildIndustryWindow
 Build (fund or prospect) a new industry,. More...
 
class  IndustryViewWindow
 
class  IndustryDirectoryWindow
 The list of industries. More...
 
struct  CargoesField
 Data about a single field in the IndustryCargoesWindow panel. More...
 
struct  CargoesRow
 A single row of CargoesField. More...
 
struct  IndustryCargoesWindow
 Window displaying the cargo connections around an industry (or cargo). More...
 

Typedefs

typedef GUIList< const Industry *, const std::pair< CargoID, CargoID > & > GUIIndustryList
 

Enumerations

enum  CargoSuffixType { CST_FUND, CST_VIEW, CST_DIR }
 Cargo suffix type (for which window is it requested) More...
 
enum  CargoSuffixDisplay { CSD_CARGO, CSD_CARGO_AMOUNT, CSD_CARGO_TEXT, CSD_CARGO_AMOUNT_TEXT }
 Ways of displaying the cargo. More...
 
enum  CargoSuffixInOut { CARGOSUFFIX_OUT = 0, CARGOSUFFIX_IN = 1 }
 
enum  CargoFilterSpecialType { CF_ANY = CT_NO_REFIT, CF_NONE = CT_INVALID }
 Special cargo filter criteria. More...
 
enum  CargoesFieldType {
  CFT_EMPTY, CFT_SMALL_EMPTY, CFT_INDUSTRY, CFT_CARGO,
  CFT_CARGO_LABEL, CFT_HEADER
}
 Available types of field. More...
 

Functions

static void ShowIndustryCargoesWindow (IndustryType id)
 Open the industry and cargoes window. More...
 
static void GetCargoSuffix (uint cargo, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, CargoSuffix &suffix)
 Gets the string to display after the cargo name (using callback 37) More...
 
template<typename TC , typename TS >
static void GetAllCargoSuffixes (CargoSuffixInOut use_input, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, const TC &cargoes, TS &suffixes)
 Gets all strings to display after the cargoes of industries (using callback 37) More...
 
static bool IndustryTypeNameSorter (const IndustryType &a, const IndustryType &b)
 Sort industry types by their name.
 
void SortIndustryTypes ()
 Initialize the list of sorted industry types.
 
void CcBuildIndustry (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
 Command callback. More...
 
void ShowBuildIndustryWindow ()
 
static void UpdateIndustryProduction (Industry *i)
 
static bool IsProductionAlterable (const Industry *i)
 
void ShowIndustryViewWindow (int industry)
 
static bool CDECL CargoFilter (const Industry *const *industry, const std::pair< CargoID, CargoID > &cargoes)
 Cargo filter functions. More...
 
void ShowIndustryDirectory ()
 
void ShowIndustryCargoesWindow ()
 Open the industry and cargoes window with an industry.
 

Variables

bool _ignore_restrictions
 
std::bitset< NUM_INDUSTRYTYPES_displayed_industries
 Communication from the industry chain window to the smallmap window about what industries to display.
 
std::array< IndustryType, NUM_INDUSTRYTYPES_sorted_industry_types
 Industry types sorted by name.
 
static const NWidgetPart _nested_build_industry_widgets []
 
static WindowDesc _build_industry_desc (WDP_AUTO, "build_industry", 170, 212, WC_BUILD_INDUSTRY, WC_NONE, WDF_CONSTRUCTION, _nested_build_industry_widgets, lengthof(_nested_build_industry_widgets))
 Window definition of the dynamic place industries gui.
 
static const NWidgetPart _nested_industry_view_widgets []
 Widget definition of the view industry gui. More...
 
static WindowDesc _industry_view_desc (WDP_AUTO, "view_industry", 260, 120, WC_INDUSTRY_VIEW, WC_NONE, 0, _nested_industry_view_widgets, lengthof(_nested_industry_view_widgets))
 Window definition of the view industry gui.
 
static const NWidgetPart _nested_industry_directory_widgets []
 Widget definition of the industry directory gui. More...
 
static GUIIndustryList::FilterFunction *const _filter_funcs [] = { &CargoFilter }
 
static WindowDesc _industry_directory_desc (WDP_AUTO, "list_industries", 428, 190, WC_INDUSTRY_DIRECTORY, WC_NONE, 0, _nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets))
 Window definition of the industry directory gui.
 
static const NWidgetPart _nested_industry_cargoes_widgets []
 Widgets of the industry cargoes window. More...
 
static WindowDesc _industry_cargoes_desc (WDP_AUTO, "industry_cargoes", 300, 210, WC_INDUSTRY_CARGOES, WC_NONE, 0, _nested_industry_cargoes_widgets, lengthof(_nested_industry_cargoes_widgets))
 Window description for the industry cargoes window.
 
static const uint MAX_CARGOES = 16
 Maximum number of cargoes carried in a CFT_CARGO field in CargoesField.
 

Detailed Description

GUIs related to industries.

Definition in file industry_gui.cpp.

Enumeration Type Documentation

◆ CargoesFieldType

Available types of field.

Enumerator
CFT_EMPTY 

Empty field.

CFT_SMALL_EMPTY 

Empty small field (for the header).

CFT_INDUSTRY 

Display industry.

CFT_CARGO 

Display cargo connections.

CFT_CARGO_LABEL 

Display cargo labels.

CFT_HEADER 

Header text.

Definition at line 1830 of file industry_gui.cpp.

◆ CargoFilterSpecialType

Special cargo filter criteria.

Enumerator
CF_ANY 

Show all industries (i.e. no filtering)

CF_NONE 

Show only industries which do not produce/accept cargo.

Definition at line 1232 of file industry_gui.cpp.

◆ CargoSuffixDisplay

Ways of displaying the cargo.

Enumerator
CSD_CARGO 

Display the cargo without sub-type (cb37 result 401).

CSD_CARGO_AMOUNT 

Display the cargo and amount (if useful), but no sub-type (cb37 result 400 or fail).

CSD_CARGO_TEXT 

Display then cargo and supplied string (cb37 result 800-BFF).

CSD_CARGO_AMOUNT_TEXT 

Display then cargo, amount, and string (cb37 result 000-3FF).

Definition at line 59 of file industry_gui.cpp.

◆ CargoSuffixType

Cargo suffix type (for which window is it requested)

Enumerator
CST_FUND 

Fund-industry window.

CST_VIEW 

View-industry window.

CST_DIR 

Industry-directory window.

Definition at line 52 of file industry_gui.cpp.

Function Documentation

◆ CargoFilter()

static bool CDECL CargoFilter ( const Industry *const *  industry,
const std::pair< CargoID, CargoID > &  cargoes 
)
static

Cargo filter functions.

Check whether an industry accepts and produces a certain cargo pair.

Parameters
industryThe industry whose cargoes will being checked.
cargoesThe accepted and produced cargo pair to look for.
Returns
bool Whether the given cargoes accepted and produced by the industry.

Definition at line 1244 of file industry_gui.cpp.

References CF_ANY, and CF_NONE.

◆ CcBuildIndustry()

void CcBuildIndustry ( const CommandCost result,
TileIndex  tile,
uint32  p1,
uint32  p2,
uint32  cmd 
)

Command callback.

In case of failure to build an industry, show an error message.

Parameters
resultResult of the command.
tileTile where the industry is placed.
p1Additional data of the CMD_BUILD_INDUSTRY command.
p2Additional data of the CMD_BUILD_INDUSTRY command.
cmdUnused.

Definition at line 226 of file industry_gui.cpp.

References IndustrySpec::enabled, GB(), CommandCost::GetErrorMessage(), GetIndustrySpec(), IndustrySpec::name, NUM_INDUSTRYTYPES, SetDParam(), ShowErrorMessage(), CommandCost::Succeeded(), TILE_SIZE, TileX(), TileY(), and WL_INFO.

◆ GetAllCargoSuffixes()

template<typename TC , typename TS >
static void GetAllCargoSuffixes ( CargoSuffixInOut  use_input,
CargoSuffixType  cst,
const Industry ind,
IndustryType  ind_type,
const IndustrySpec indspec,
const TC &  cargoes,
TS &  suffixes 
)
inlinestatic

Gets all strings to display after the cargoes of industries (using callback 37)

Parameters
use_inputget suffixes for output cargoes or input cargoes?
cstthe cargo suffix type (for which window is it requested).
See also
CargoSuffixType
Parameters
indthe industry (nullptr if in fund window)
ind_typethe industry type
indspecthe industry spec
cargoesarray with cargotypes. for CT_INVALID no suffix will be determined
suffixesis filled with the suffixes

Definition at line 147 of file industry_gui.cpp.

References IndustrySpec::behaviour, GRFFile::cargo_map, CSD_CARGO, CT_INVALID, GetCargoSuffix(), IndustrySpec::grf_prop, GRFFilePropsBase< Tcnt >::grffile, INDUSTRYBEH_CARGOTYPES_UNLIMITED, and lengthof.

Referenced by IndustryDirectoryWindow::GetIndustryString().

◆ GetCargoSuffix()

static void GetCargoSuffix ( uint  cargo,
CargoSuffixType  cst,
const Industry ind,
IndustryType  ind_type,
const IndustrySpec indspec,
CargoSuffix suffix 
)
static

Gets the string to display after the cargo name (using callback 37)

Parameters
cargothe cargo for which the suffix is requested, meaning depends on presence of flag 18 in prop 1A
cstthe cargo suffix type (for which window is it requested).
See also
CargoSuffixType
Parameters
indthe industry (nullptr if in fund window)
ind_typethe industry type
indspecthe industry spec
suffixis filled with the string to display

Definition at line 83 of file industry_gui.cpp.

References CALLBACK_FAILED, IndustrySpec::callback_mask, CBID_INDUSTRY_CARGO_SUFFIX, CBM_IND_CARGO_SUFFIX, CSD_CARGO_AMOUNT, CST_FUND, CargoSuffix::display, GB(), GetIndustryCallback(), IndustrySpec::grf_prop, GRFFilePropsBase< Tcnt >::grffile, HasBit(), INVALID_TILE, Industry::location, StartTextRefStackUsage(), CargoSuffix::text, and OrthogonalTileArea::tile.

Referenced by GetAllCargoSuffixes().

◆ ShowIndustryCargoesWindow()

static void ShowIndustryCargoesWindow ( IndustryType  id)
static

Open the industry and cargoes window.

Parameters
idIndustry type to display, NUM_INDUSTRYTYPES selects a default industry type.

Definition at line 3069 of file industry_gui.cpp.

References _sorted_industry_types, BringWindowToFrontById(), IndustrySpec::enabled, GetIndustrySpec(), Window::InvalidateData(), NUM_INDUSTRYTYPES, and WC_INDUSTRY_CARGOES.

Referenced by ShowIndustryCargoesWindow().

Variable Documentation

◆ _nested_build_industry_widgets

const NWidgetPart _nested_build_industry_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_FUND_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
SetDataTip(STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES, STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES_TOOLTIP),
SetDataTip(STR_FUND_INDUSTRY_REMOVE_ALL_INDUSTRIES, STR_FUND_INDUSTRY_REMOVE_ALL_INDUSTRIES_TOOLTIP),
NWidget(WWT_MATRIX, COLOUR_DARK_GREEN, WID_DPI_MATRIX_WIDGET), SetMatrixDataTip(1, 0, STR_FUND_INDUSTRY_SELECTION_TOOLTIP), SetFill(1, 0), SetResize(1, 1), SetScrollbar(WID_DPI_SCROLLBAR),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_DPI_INFOPANEL), SetResize(1, 0),
NWidget(WWT_TEXTBTN, COLOUR_DARK_GREEN, WID_DPI_DISPLAY_WIDGET), SetFill(1, 0), SetResize(1, 0),
SetDataTip(STR_INDUSTRY_DISPLAY_CHAIN, STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_DARK_GREEN, WID_DPI_FUND_WIDGET), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_NULL),
NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN),
}

Definition at line 240 of file industry_gui.cpp.

◆ _nested_industry_cargoes_widgets

const NWidgetPart _nested_industry_cargoes_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_IC_CAPTION), SetDataTip(STR_INDUSTRY_CARGOES_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_DEFSIZEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
SetDataTip(STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP, STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP),
NWidget(WWT_PANEL, COLOUR_BROWN), SetFill(1, 0), SetResize(0, 0), EndContainer(),
NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_IC_IND_DROPDOWN), SetFill(0, 0), SetResize(0, 0),
SetDataTip(STR_INDUSTRY_CARGOES_SELECT_INDUSTRY, STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP),
SetDataTip(STR_INDUSTRY_CARGOES_SELECT_CARGO, STR_INDUSTRY_CARGOES_SELECT_CARGO_TOOLTIP),
NWidget(WWT_RESIZEBOX, COLOUR_BROWN),
}

Widgets of the industry cargoes window.

Definition at line 1793 of file industry_gui.cpp.

◆ _nested_industry_directory_widgets

const NWidgetPart _nested_industry_directory_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INDUSTRY_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_DEFSIZEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_ID_DROPDOWN_ORDER), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_ID_DROPDOWN_CRITERIA), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_ID_FILTER_BY_ACC_CARGO), SetMinimalSize(225, 12), SetFill(0, 1), SetDataTip(STR_INDUSTRY_DIRECTORY_ACCEPTED_CARGO_FILTER, STR_TOOLTIP_FILTER_CRITERIA),
NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_ID_FILTER_BY_PROD_CARGO), SetMinimalSize(225, 12), SetFill(0, 1), SetDataTip(STR_INDUSTRY_DIRECTORY_PRODUCED_CARGO_FILTER, STR_TOOLTIP_FILTER_CRITERIA),
NWidget(WWT_PANEL, COLOUR_BROWN), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN, WID_ID_INDUSTRY_LIST), SetDataTip(0x0, STR_INDUSTRY_DIRECTORY_LIST_CAPTION), SetResize(1, 1), SetScrollbar(WID_ID_SCROLLBAR), EndContainer(),
NWidget(WWT_RESIZEBOX, COLOUR_BROWN),
}

Widget definition of the industry directory gui.

Definition at line 1203 of file industry_gui.cpp.

◆ _nested_industry_view_widgets

const NWidgetPart _nested_industry_view_widgets[]
static
Initial value:
= {
NWidget(WWT_CLOSEBOX, COLOUR_CREAM),
NWidget(WWT_CAPTION, COLOUR_CREAM, WID_IV_CAPTION), SetDataTip(STR_INDUSTRY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHIMGBTN, COLOUR_CREAM, WID_IV_GOTO), SetMinimalSize(12, 14), SetDataTip(SPR_GOTO_LOCATION, STR_INDUSTRY_VIEW_LOCATION_TOOLTIP),
NWidget(WWT_DEBUGBOX, COLOUR_CREAM),
NWidget(WWT_SHADEBOX, COLOUR_CREAM),
NWidget(WWT_DEFSIZEBOX, COLOUR_CREAM),
NWidget(WWT_STICKYBOX, COLOUR_CREAM),
NWidget(WWT_PANEL, COLOUR_CREAM),
NWidget(WWT_INSET, COLOUR_CREAM), SetPadding(2, 2, 2, 2),
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_IV_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 0), SetPadding(1, 1, 1, 1), SetResize(1, 1),
NWidget(WWT_PANEL, COLOUR_CREAM, WID_IV_INFO), SetMinimalSize(260, 2), SetResize(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_CREAM, WID_IV_DISPLAY), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_INDUSTRY_DISPLAY_CHAIN, STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP),
NWidget(WWT_RESIZEBOX, COLOUR_CREAM),
}

Widget definition of the view industry gui.

Definition at line 1166 of file industry_gui.cpp.

WID_DPI_DISPLAY_WIDGET
@ WID_DPI_DISPLAY_WIDGET
Display chain button.
Definition: industry_widget.h:21
SetScrollbar
static NWidgetPart SetScrollbar(int index)
Attach a scrollbar to a widget.
Definition: widget_type.h:1104
WWT_STICKYBOX
@ WWT_STICKYBOX
Sticky box (at top-right of a window, after WWT_DEFSIZEBOX)
Definition: widget_type.h:64
SetPadding
static NWidgetPart SetPadding(uint8 top, uint8 right, uint8 bottom, uint8 left)
Widget part function for setting additional space around a widget.
Definition: widget_type.h:1055
WID_IC_NOTIFY
@ WID_IC_NOTIFY
Row of buttons at the bottom.
Definition: industry_widget.h:47
WWT_CAPTION
@ WWT_CAPTION
Window caption (window title between closebox and stickybox)
Definition: widget_type.h:59
WID_IV_GOTO
@ WID_IV_GOTO
Goto button.
Definition: industry_widget.h:30
WWT_DEFSIZEBOX
@ WWT_DEFSIZEBOX
Default window size box (at top-right of a window, between WWT_SHADEBOX and WWT_STICKYBOX)
Definition: widget_type.h:63
NWID_HORIZONTAL
@ NWID_HORIZONTAL
Horizontal container.
Definition: widget_type.h:73
WWT_MATRIX
@ WWT_MATRIX
Grid of rows and columns.
Definition: widget_type.h:57
WID_DPI_MATRIX_WIDGET
@ WID_DPI_MATRIX_WIDGET
Matrix of the industries.
Definition: industry_widget.h:18
SetResize
static NWidgetPart SetResize(int16 dx, int16 dy)
Widget part function for setting the resize step.
Definition: widget_type.h:939
SetDataTip
static NWidgetPart SetDataTip(uint32 data, StringID tip)
Widget part function for setting the data and tooltip.
Definition: widget_type.h:1023
WID_ID_FILTER_BY_PROD_CARGO
@ WID_ID_FILTER_BY_PROD_CARGO
Produced cargo filter dropdown list.
Definition: industry_widget.h:39
WID_IV_CAPTION
@ WID_IV_CAPTION
Caption of the window.
Definition: industry_widget.h:27
NWID_VIEWPORT
@ NWID_VIEWPORT
Nested widget containing a viewport.
Definition: widget_type.h:79
WWT_PUSHTXTBTN
@ WWT_PUSHTXTBTN
Normal push-button (no toggle button) with text caption.
Definition: widget_type.h:102
WID_DPI_INFOPANEL
@ WID_DPI_INFOPANEL
Info panel about the industry.
Definition: industry_widget.h:20
SetMatrixDataTip
static NWidgetPart SetMatrixDataTip(uint8 cols, uint8 rows, StringID tip)
Widget part function for setting the data and tooltip of WWT_MATRIX widgets.
Definition: widget_type.h:1041
WID_DPI_CREATE_RANDOM_INDUSTRIES_WIDGET
@ WID_DPI_CREATE_RANDOM_INDUSTRIES_WIDGET
Create random industries button.
Definition: industry_widget.h:17
WID_IC_SCROLLBAR
@ WID_IC_SCROLLBAR
Scrollbar of the panel.
Definition: industry_widget.h:49
WID_DPI_REMOVE_ALL_INDUSTRIES_WIDGET
@ WID_DPI_REMOVE_ALL_INDUSTRIES_WIDGET
Remove all industries button.
Definition: industry_widget.h:16
WID_IC_CAPTION
@ WID_IC_CAPTION
Caption of the window.
Definition: industry_widget.h:46
NWID_VERTICAL
@ NWID_VERTICAL
Vertical container.
Definition: widget_type.h:75
WID_IC_IND_DROPDOWN
@ WID_IC_IND_DROPDOWN
Select industry dropdown.
Definition: industry_widget.h:51
WWT_CLOSEBOX
@ WWT_CLOSEBOX
Close box (at top-left of a window)
Definition: widget_type.h:67
WWT_RESIZEBOX
@ WWT_RESIZEBOX
Resize box (normally at bottom-right of a window)
Definition: widget_type.h:66
WWT_PUSHIMGBTN
@ WWT_PUSHIMGBTN
Normal push-button (no toggle button) with image caption.
Definition: widget_type.h:103
WID_IC_CARGO_DROPDOWN
@ WID_IC_CARGO_DROPDOWN
Select cargo dropdown.
Definition: industry_widget.h:50
EndContainer
static NWidgetPart EndContainer()
Widget part function for denoting the end of a container (horizontal, vertical, WWT_FRAME,...
Definition: widget_type.h:1008
NWID_VSCROLLBAR
@ NWID_VSCROLLBAR
Vertical scrollbar.
Definition: widget_type.h:82
WID_IC_PANEL
@ WID_IC_PANEL
Panel that shows the chain.
Definition: industry_widget.h:48
NWidget
static NWidgetPart NWidget(WidgetType tp, Colours col, int16 idx=-1)
Widget part function for starting a new 'real' widget.
Definition: widget_type.h:1123
WID_ID_INDUSTRY_LIST
@ WID_ID_INDUSTRY_LIST
Industry list.
Definition: industry_widget.h:40
SetMinimalSize
static NWidgetPart SetMinimalSize(int16 x, int16 y)
Widget part function for setting the minimal size.
Definition: widget_type.h:956
WWT_PANEL
@ WWT_PANEL
Simple depressed panel.
Definition: widget_type.h:48
WID_DPI_FUND_WIDGET
@ WID_DPI_FUND_WIDGET
Fund button.
Definition: industry_widget.h:22
WWT_INSET
@ WWT_INSET
Pressed (inset) panel, most commonly used as combo box text area.
Definition: widget_type.h:49
WID_DPI_SCROLLBAR
@ WID_DPI_SCROLLBAR
Scrollbar of the matrix.
Definition: industry_widget.h:19
WID_DPI_SCENARIO_EDITOR_PANE
@ WID_DPI_SCENARIO_EDITOR_PANE
Pane containing SE-only widgets.
Definition: industry_widget.h:15
WID_ID_DROPDOWN_ORDER
@ WID_ID_DROPDOWN_ORDER
Dropdown for the order of the sort.
Definition: industry_widget.h:36
WID_ID_FILTER_BY_ACC_CARGO
@ WID_ID_FILTER_BY_ACC_CARGO
Accepted cargo filter dropdown list.
Definition: industry_widget.h:38
WID_IV_INFO
@ WID_IV_INFO
Info of the industry.
Definition: industry_widget.h:29
SetFill
static NWidgetPart SetFill(uint fill_x, uint fill_y)
Widget part function for setting filling.
Definition: widget_type.h:992
NWID_SELECTION
@ NWID_SELECTION
Stacked widgets, only one visible at a time (eg in a panel with tabs).
Definition: widget_type.h:78
WID_ID_DROPDOWN_CRITERIA
@ WID_ID_DROPDOWN_CRITERIA
Dropdown for the criteria of the sort.
Definition: industry_widget.h:37
WWT_DEBUGBOX
@ WWT_DEBUGBOX
NewGRF debug box (at top-right of a window, between WWT_CAPTION and WWT_SHADEBOX)
Definition: widget_type.h:61
WID_IV_VIEWPORT
@ WID_IV_VIEWPORT
Viewport of the industry.
Definition: industry_widget.h:28
WWT_TEXTBTN
@ WWT_TEXTBTN
(Toggle) Button with text
Definition: widget_type.h:53
WID_ID_SCROLLBAR
@ WID_ID_SCROLLBAR
Scrollbar of the list.
Definition: industry_widget.h:41
WID_IV_DISPLAY
@ WID_IV_DISPLAY
Display chain button.
Definition: industry_widget.h:31
WWT_DROPDOWN
@ WWT_DROPDOWN
Drop down list.
Definition: widget_type.h:68
WWT_SHADEBOX
@ WWT_SHADEBOX
Shade box (at top-right of a window, between WWT_DEBUGBOX and WWT_DEFSIZEBOX)
Definition: widget_type.h:62