The StationView window. More...
Data Structures | |
struct | RowDisplay |
A row being displayed in the cargo view (as opposed to being "hidden" behind a plus sign). More... | |
Public Types | |
enum | Invalidation { INV_FLOWS = 0x100, INV_CARGO = 0x200 } |
Type of data invalidation. More... | |
enum | Grouping { GR_SOURCE, GR_NEXT, GR_DESTINATION, GR_CARGO } |
Type of grouping used in each of the "columns". More... | |
enum | Mode { MODE_WAITING, MODE_PLANNED } |
Display mode of the cargo view. More... | |
enum | AcceptListHeight { ALH_RATING = 13, ALH_ACCEPTS = 3 } |
Height of the SVW_ACCEPTLIST widget for different views. More... | |
typedef std::vector< RowDisplay > | CargoDataVector |
Public Member Functions | |
StationViewWindow (const WindowDesc *desc, WindowNumber window_number) | |
void | ShowCargo (CargoDataEntry *data, CargoID cargo, StationID source, StationID next, StationID dest, uint count) |
Show a certain cargo entry characterized by source/next/dest station, cargo ID and amount of cargo at the right place in the cargo view. | |
virtual void | UpdateWidgetSize (int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) |
Update size and resize step of a widget in the window. | |
virtual void | OnPaint () |
The window must be repainted. | |
virtual void | SetStringParameters (int widget) const |
Initialize string parameters for a widget. | |
void | RecalcDestinations (CargoID i) |
Rebuild the cache for estimated destinations which is used to quickly show the "destination" entries even if we actually don't know the destination of a certain packet from just looking at it. | |
void | EstimateDestinations (CargoID cargo, StationID source, StationID next, uint count, CargoDataEntry *dest) |
Estimate the amounts of cargo per final destination for a given cargo, source station and next hop and save the result as children of the given CargoDataEntry. | |
void | BuildFlowList (CargoID i, const FlowStatMap &flows, CargoDataEntry *cargo) |
Build up the cargo view for PLANNED mode and a specific cargo. | |
void | BuildCargoList (CargoID i, const StationCargoList &packets, CargoDataEntry *cargo) |
Build up the cargo view for WAITING mode and a specific cargo. | |
void | BuildCargoList (CargoDataEntry *cargo, const Station *st) |
Build up the cargo view for all cargoes. | |
void | SetDisplayedRow (const CargoDataEntry *data) |
Mark a specific row, characterized by its CargoDataEntry, as expanded. | |
StringID | GetEntryString (StationID station, StringID here, StringID other_station, StringID any) |
Select the correct string for an entry referring to the specified station. | |
StringID | SearchNonStop (CargoDataEntry *cd, StationID station, int column) |
Determine if we need to show the special "non-stop" string. | |
int | DrawEntries (CargoDataEntry *entry, Rect &r, int pos, int maxrows, int column, CargoID cargo=CT_INVALID) |
Draw the given cargo entries in the station GUI. | |
virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
Invalidate the cache for the given cargo. | |
int | DrawAcceptedCargo (const Rect &r) const |
Draw accepted cargo in the SVW_ACCEPTLIST widget. | |
int | DrawCargoRatings (const Rect &r) const |
Draw cargo ratings in the SVW_ACCEPTLIST widget. | |
template<class ID > | |
void | HandleCargoWaitingClick (CargoDataEntry *filter, ID next) |
Expand or collapse a specific row. | |
void | HandleCargoWaitingClick (int row) |
Handle a click on a specific row in the cargo view. | |
virtual void | OnClick (Point pt, int widget, int click_count) |
A click with the left mouse button has been made on the window. | |
void | SelectSortOrder (SortOrder order) |
Select a new sort order for the cargo view. | |
void | SelectSortBy (int index) |
Select a new sort criterium for the cargo view. | |
void | SelectGroupBy (int index) |
Select a new grouping mode for the cargo view. | |
virtual void | OnDropdownSelect (int widget, int index) |
A dropdown option associated to this window has been selected. | |
virtual void | OnQueryTextFinished (char *str) |
The query window opened from this window has closed. | |
virtual void | OnResize () |
Called after the window got resized. | |
Data Fields | |
uint | expand_shrink_width |
The width allocated to the expand/shrink 'button'. | |
int | rating_lines |
Number of lines in the cargo ratings view. | |
int | accepts_lines |
Number of lines in the accepted cargo view. | |
Scrollbar * | vscroll |
CargoSortType | sortings [NUM_COLUMNS] |
Sort types of the different 'columns'. | |
SortOrder | sort_orders [NUM_COLUMNS] |
Sort order (ascending/descending) for the 'columns'. | |
int | scroll_to_row |
If set, scroll the main viewport to the station pointed to by this row. | |
int | grouping_index |
Currently selected entry in the grouping drop down. | |
Mode | current_mode |
Currently selected display mode of cargo view. | |
Grouping | groupings [NUM_COLUMNS] |
Grouping modes for the different columns. | |
CargoDataEntry | expanded_rows |
Parent entry of currently expanded rows. | |
CargoDataEntry | cached_destinations |
Cache for the flows passing through this station. | |
CargoDataVector | displayed_rows |
Parent entry of currently displayed rows (including collapsed ones). | |
Static Public Attributes | |
static const int | NUM_COLUMNS = 4 |
Number of "columns" in the cargo view: cargo, from, via, to. | |
static const StringID | _sort_names [] |
Names of the sorting options in the dropdown. | |
static const StringID | _group_names [] |
Names of the grouping options in the dropdown. |
The StationView window.
Definition at line 1078 of file station_gui.cpp.
Height of the SVW_ACCEPTLIST widget for different views.
ALH_RATING |
Height of the cargo ratings view. |
ALH_ACCEPTS |
Height of the accepted cargo view. |
Definition at line 1139 of file station_gui.cpp.
Type of data invalidation.
INV_FLOWS |
The planned flows have been recalculated and everything has to be updated. |
INV_CARGO |
Some cargo has been added or removed. |
Definition at line 1110 of file station_gui.cpp.
Display mode of the cargo view.
MODE_WAITING |
Show cargo waiting at the station. |
MODE_PLANNED |
Show cargo planned to pass through the station. |
Definition at line 1128 of file station_gui.cpp.
void StationViewWindow::BuildCargoList | ( | CargoDataEntry * | cargo, | |
const Station * | st | |||
) | [inline] |
Build up the cargo view for all cargoes.
cargo | The root cargo entry to save all results in. | |
st | The station to calculate the cargo view from. |
Definition at line 1462 of file station_gui.cpp.
References BuildCargoList(), BuildFlowList(), cached_destinations, GoodsEntry::cargo, current_mode, GoodsEntry::flows, Station::goods, MODE_WAITING, NUM_CARGO, RecalcDestinations(), and CargoDataEntry::Retrieve().
void StationViewWindow::BuildCargoList | ( | CargoID | i, | |
const StationCargoList & | packets, | |||
CargoDataEntry * | cargo | |||
) | [inline] |
Build up the cargo view for WAITING mode and a specific cargo.
i | Cargo to show. | |
packets | The current station's cargo list for that cargo. | |
cargo | The CargoDataEntry to save the result in. |
Definition at line 1430 of file station_gui.cpp.
References CargoDataEntry::Begin(), cached_destinations, CargoPacket::Count(), DivideApprox(), CargoDataEntry::End(), CargoDataEntry::GetCount(), CargoDataEntry::GetStation(), CargoList< Tinst, Tcont >::Packets(), CargoDataEntry::Retrieve(), ShowCargo(), and CargoPacket::SourceStation().
Referenced by BuildCargoList(), and OnPaint().
void StationViewWindow::BuildFlowList | ( | CargoID | i, | |
const FlowStatMap & | flows, | |||
CargoDataEntry * | cargo | |||
) | [inline] |
Build up the cargo view for PLANNED mode and a specific cargo.
i | Cargo to show. | |
flows | The current station's flows for that cargo. | |
cargo | The CargoDataEntry to save the results in. |
Definition at line 1406 of file station_gui.cpp.
References CargoDataEntry::Begin(), cached_destinations, CargoDataEntry::End(), CargoDataEntry::GetCount(), CargoDataEntry::GetStation(), CargoDataEntry::Retrieve(), ShowCargo(), and FlowStat::Via().
Referenced by BuildCargoList().
int StationViewWindow::DrawAcceptedCargo | ( | const Rect & | r | ) | const [inline] |
Draw accepted cargo in the SVW_ACCEPTLIST widget.
r | Rectangle of the widget. |
Definition at line 1651 of file station_gui.cpp.
References CeilDiv(), DrawCargoListText(), FONT_HEIGHT_NORMAL, SpecializedStation< Station, false >::Get(), Station::goods, HasBit(), NUM_CARGO, SetBit(), WD_FRAMERECT_LEFT, WD_FRAMERECT_RIGHT, and WD_FRAMERECT_TOP.
Referenced by OnPaint().
int StationViewWindow::DrawCargoRatings | ( | const Rect & | r | ) | const [inline] |
Draw cargo ratings in the SVW_ACCEPTLIST widget.
r | Rectangle of the widget. |
Definition at line 1669 of file station_gui.cpp.
References CeilDiv(), DrawString(), FONT_HEIGHT_NORMAL, SpecializedStation< Station, false >::Get(), Station::goods, HasBit(), CargoSpec::Index(), CargoSpec::name, SetDParam(), GoodsEntry::supply, ToPercent8(), WD_FRAMERECT_LEFT, WD_FRAMERECT_RIGHT, and WD_FRAMERECT_TOP.
Referenced by OnPaint().
int StationViewWindow::DrawEntries | ( | CargoDataEntry * | entry, | |
Rect & | r, | |||
int | pos, | |||
int | maxrows, | |||
int | column, | |||
CargoID | cargo = CT_INVALID | |||
) | [inline] |
Draw the given cargo entries in the station GUI.
entry | Root entry for all cargo to be drawn. | |
r | Screen rectangle to draw into. | |
pos | Current row to be drawn to (counted down from 0 to -maxrows, same as vscroll->GetPosition()). | |
maxrows | Maximum row to be drawn. | |
column | Current "column" being drawn. | |
cargo | Current cargo being drawn (if cargo column has been passed). |
Definition at line 1571 of file station_gui.cpp.
References _current_text_dir, CargoDataEntry::Begin(), DrawCargoIcons(), DrawString(), CargoDataEntry::End(), expand_shrink_width, FONT_HEIGHT_NORMAL, SpecializedStation< Station, false >::Get(), CargoDataEntry::GetCargo(), CargoDataEntry::GetCount(), GetEntryString(), CargoDataEntry::GetNumChildren(), CargoDataEntry::GetStation(), GR_CARGO, GR_DESTINATION, GR_NEXT, GR_SOURCE, groupings, SpecializedStation< Station, false >::IsValidID(), NUM_COLUMNS, scroll_to_row, ScrollMainWindowToTile(), SearchNonStop(), SetDisplayedRow(), SetDParam(), sort_orders, sortings, ST_AS_GROUPING, ST_COUNT, ST_STATION_STRING, TD_RTL, WD_FRAMERECT_LEFT, WD_FRAMERECT_RIGHT, and WD_FRAMERECT_TOP.
Referenced by OnPaint().
void StationViewWindow::EstimateDestinations | ( | CargoID | cargo, | |
StationID | source, | |||
StationID | next, | |||
uint | count, | |||
CargoDataEntry * | dest | |||
) | [inline] |
Estimate the amounts of cargo per final destination for a given cargo, source station and next hop and save the result as children of the given CargoDataEntry.
cargo | ID of the cargo to estimate destinations for. | |
source | Source station of the given batch of cargo. | |
next | Intermediate hop to start the calculation at ("next hop"). | |
count | Size of the batch of cargo. | |
dest | CargoDataEntry to save the results in. |
Definition at line 1355 of file station_gui.cpp.
References CargoDataEntry::Begin(), DivideApprox(), CargoDataEntry::End(), GoodsEntry::flows, SpecializedStation< Station, false >::Get(), CargoDataEntry::GetCount(), CargoDataEntry::GetStation(), Station::goods, CargoDataEntry::InsertOrRetrieve(), SpecializedStation< Station, false >::IsValidID(), and CargoDataEntry::Update().
Referenced by RecalcDestinations().
StringID StationViewWindow::GetEntryString | ( | StationID | station, | |
StringID | here, | |||
StringID | other_station, | |||
StringID | any | |||
) | [inline] |
Select the correct string for an entry referring to the specified station.
station | Station the entry is showing cargo for. | |
here | String to be shown if the entry refers to the same station as this station GUI belongs to. | |
other_station | String to be shown if the entry refers to a specific other station. | |
any | String to be shown if the entry refers to "any station". |
Definition at line 1515 of file station_gui.cpp.
References SetDParam().
Referenced by DrawEntries().
void StationViewWindow::HandleCargoWaitingClick | ( | int | row | ) | [inline] |
Handle a click on a specific row in the cargo view.
row | Row being clicked. |
Definition at line 1711 of file station_gui.cpp.
References _ctrl_pressed, displayed_rows, StationViewWindow::RowDisplay::filter, StationViewWindow::RowDisplay::next_cargo, StationViewWindow::RowDisplay::next_station, scroll_to_row, Window::SetWidgetDirty(), and SVW_WAITING.
void StationViewWindow::HandleCargoWaitingClick | ( | CargoDataEntry * | filter, | |
ID | next | |||
) | [inline] |
Expand or collapse a specific row.
filter | Parent of the row. | |
next | ID pointing to the row. |
Definition at line 1698 of file station_gui.cpp.
References CargoDataEntry::InsertOrRetrieve(), CargoDataEntry::Remove(), and CargoDataEntry::Retrieve().
Referenced by OnClick().
virtual void StationViewWindow::OnClick | ( | Point | pt, | |
int | widget, | |||
int | click_count | |||
) | [inline, virtual] |
A click with the left mouse button has been made on the window.
pt | the point inside the window that has been clicked. | |
widget | the clicked widget. | |
click_count | Number of fast consecutive clicks at same position |
Reimplemented from Window.
Definition at line 1727 of file station_gui.cpp.
References _ctrl_pressed, _group_names, _sort_names, accepts_lines, CS_ALPHANUMERAL, current_mode, Window::flags4, FONT_HEIGHT_NORMAL, SpecializedStation< Station, false >::Get(), Scrollbar::GetPosition(), Scrollbar::GetScrolledRowFromWidget(), grouping_index, HandleCargoWaitingClick(), Window::LowerWidget(), MAX_LENGTH_STATION_NAME_CHARS, QSF_ENABLE_DEFAULT, QSF_LEN_IN_CHARS, rating_lines, Window::ReInit(), ScrollMainWindowToTile(), SelectSortOrder(), NWidgetCore::SetDataTip(), SetDParam(), ShowDropDownMenu(), ShowExtraViewPortWindow(), ShowQueryString(), sort_orders, SVW_GROUP_BY, SVW_LOCATION, SVW_PLANES, SVW_RATINGS, SVW_RENAME, SVW_ROADVEHS, SVW_SHIPS, SVW_SORT_BY, SVW_SORT_ORDER, SVW_TRAINS, SVW_WAITING, WD_FRAMERECT_TOP, and WF_TIMEOUT_BEGIN.
virtual void StationViewWindow::OnDropdownSelect | ( | int | widget, | |
int | index | |||
) | [inline, virtual] |
A dropdown option associated to this window has been selected.
widget | the widget (button) that the dropdown is associated with. | |
index | the element in the dropdown that is selected. |
Reimplemented from Window.
Definition at line 1876 of file station_gui.cpp.
References SelectGroupBy(), SelectSortBy(), and SVW_SORT_BY.
virtual void StationViewWindow::OnInvalidateData | ( | int | data = 0 , |
|
bool | gui_scope = true | |||
) | [inline, virtual] |
Invalidate the cache for the given cargo.
cargo | ID of the cargo. | |
gui_scope | Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See InvalidateWindowData() for details. |
Reimplemented from Window.
Definition at line 1640 of file station_gui.cpp.
References cached_destinations, and CargoDataEntry::Remove().
virtual void StationViewWindow::OnPaint | ( | ) | [inline, virtual] |
The window must be repainted.
Reimplemented from Window.
Definition at line 1252 of file station_gui.cpp.
References _local_company, accepts_lines, BuildCargoList(), NWidgetBase::current_x, NWidgetBase::current_y, displayed_rows, DrawAcceptedCargo(), DrawCargoRatings(), DrawEntries(), Window::DrawSortButtonState(), Window::DrawWidgets(), FACIL_AIRPORT, FACIL_BUS_STOP, FACIL_DOCK, FACIL_TRAIN, FACIL_TRUCK_STOP, BaseStation::facilities, SpecializedStation< Station, false >::Get(), Scrollbar::GetCapacity(), CargoDataEntry::GetNumChildren(), Scrollbar::GetPosition(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, Window::IsShaded(), BaseStation::owner, NWidgetBase::pos_x, NWidgetBase::pos_y, rating_lines, Window::ReInit(), SBS_DOWN, SBS_UP, scroll_to_row, Scrollbar::SetCount(), SetDParam(), Window::SetWidgetDisabledState(), sort_orders, SVW_ACCEPTLIST, SVW_ACCEPTS, SVW_PLANES, SVW_RENAME, SVW_ROADVEHS, SVW_SHIPS, SVW_SORT_ORDER, SVW_TRAINS, and SVW_WAITING.
virtual void StationViewWindow::OnQueryTextFinished | ( | char * | str | ) | [inline, virtual] |
The query window opened from this window has closed.
str | the new value of the string, NULL if the window was cancelled or an empty string when the default button was pressed, i.e. StrEmpty(str). |
Reimplemented from Window.
Definition at line 1885 of file station_gui.cpp.
References CMD_MSG, CMD_RENAME_STATION, and DoCommandP().
virtual void StationViewWindow::OnResize | ( | ) | [inline, virtual] |
Called after the window got resized.
For nested windows with a viewport, call NWidgetViewport::UpdateViewportCoordinates.
Reimplemented from Window.
Definition at line 1892 of file station_gui.cpp.
References Scrollbar::SetCapacityFromWidget(), SVW_WAITING, WD_FRAMERECT_BOTTOM, and WD_FRAMERECT_TOP.
void StationViewWindow::RecalcDestinations | ( | CargoID | i | ) | [inline] |
Rebuild the cache for estimated destinations which is used to quickly show the "destination" entries even if we actually don't know the destination of a certain packet from just looking at it.
i | Cargo to recalculate the cache for. |
Definition at line 1322 of file station_gui.cpp.
References cached_destinations, CargoDataEntry::Clear(), EstimateDestinations(), GoodsEntry::flows, SpecializedStation< Station, false >::Get(), Station::goods, CargoDataEntry::InsertOrRetrieve(), FlowStat::Planned(), CargoDataEntry::Update(), and FlowStat::Via().
Referenced by BuildCargoList().
StringID StationViewWindow::SearchNonStop | ( | CargoDataEntry * | cd, | |
StationID | station, | |||
int | column | |||
) | [inline] |
Determine if we need to show the special "non-stop" string.
cd | Entry we are going to show. | |
station | Station the entry refers to. | |
column | The "column" the entry will be shown in. |
Definition at line 1534 of file station_gui.cpp.
References CargoDataEntry::Begin(), CargoDataEntry::End(), CargoDataEntry::GetParent(), CargoDataEntry::GetStation(), GR_DESTINATION, groupings, and Window::parent.
Referenced by DrawEntries().
void StationViewWindow::SelectGroupBy | ( | int | index | ) | [inline] |
Select a new grouping mode for the cargo view.
index | Row being selected in the grouping drop down. |
Definition at line 1836 of file station_gui.cpp.
References _group_names, _settings_client, GR_DESTINATION, GR_NEXT, GR_SOURCE, grouping_index, groupings, ClientSettings::gui, Window::SetDirty(), GUISettings::station_gui_group_order, and SVW_GROUP_BY.
Referenced by OnDropdownSelect().
void StationViewWindow::SelectSortBy | ( | int | index | ) | [inline] |
Select a new sort criterium for the cargo view.
index | Row being selected in the sort criteria drop down. |
Definition at line 1804 of file station_gui.cpp.
References _settings_client, _sort_names, current_mode, ClientSettings::gui, MODE_PLANNED, MODE_WAITING, Window::SetDirty(), sortings, ST_AS_GROUPING, ST_COUNT, GUISettings::station_gui_sort_by, and SVW_SORT_BY.
Referenced by OnDropdownSelect().
void StationViewWindow::SelectSortOrder | ( | SortOrder | order | ) | [inline] |
Select a new sort order for the cargo view.
order | New sort order. |
Definition at line 1793 of file station_gui.cpp.
References _settings_client, ClientSettings::gui, Window::SetDirty(), sort_orders, and GUISettings::station_gui_sort_order.
Referenced by OnClick().
void StationViewWindow::SetDisplayedRow | ( | const CargoDataEntry * | data | ) | [inline] |
Mark a specific row, characterized by its CargoDataEntry, as expanded.
data | The row to be marked as expanded. |
Definition at line 1482 of file station_gui.cpp.
References displayed_rows, expanded_rows, CargoDataEntry::GetCargo(), CargoDataEntry::GetParent(), CargoDataEntry::GetStation(), Window::parent, and CargoDataEntry::Retrieve().
Referenced by DrawEntries().
virtual void StationViewWindow::SetStringParameters | ( | int | widget | ) | const [inline, virtual] |
Initialize string parameters for a widget.
Calls to this function are made during initialization to measure the size (that is as part of InitNested()), during drawing, and while re-initializing the window. Only for widgets that render text initializing is requested.
widget | Widget number. |
Reimplemented from Window.
Definition at line 1308 of file station_gui.cpp.
References BaseStation::facilities, SpecializedStation< Station, false >::Get(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, SetDParam(), and SVW_CAPTION.
void StationViewWindow::ShowCargo | ( | CargoDataEntry * | data, | |
CargoID | cargo, | |||
StationID | source, | |||
StationID | next, | |||
StationID | dest, | |||
uint | count | |||
) | [inline] |
Show a certain cargo entry characterized by source/next/dest station, cargo ID and amount of cargo at the right place in the cargo view.
I.e. update as many rows as are expanded following that characterization.
data | Root entry of the tree. | |
cargo | Cargo ID of the entry to be shown. | |
source | Source station of the entry to be shown. | |
next | Next station the cargo to be shown will visit. | |
dest | Final destination of the cargo to be shown. | |
count | Amount of cargo to be shown. |
Definition at line 1209 of file station_gui.cpp.
References expanded_rows, GR_CARGO, GR_DESTINATION, GR_NEXT, GR_SOURCE, groupings, CargoDataEntry::InsertOrRetrieve(), NUM_COLUMNS, CargoDataEntry::Retrieve(), and CargoDataEntry::Update().
Referenced by BuildCargoList(), and BuildFlowList().
virtual void StationViewWindow::UpdateWidgetSize | ( | int | widget, | |
Dimension * | size, | |||
const Dimension & | padding, | |||
Dimension * | fill, | |||
Dimension * | resize | |||
) | [inline, virtual] |
Update size and resize step of a widget in the window.
After retrieval of the minimal size and the resize-steps of a widget, this function is called to allow further refinement, typically by computing the real maximal size of the content. Afterwards, size is taken to be the minimal size of the widget and resize is taken to contain the resize steps. For the convenience of the callee, padding contains the amount of padding between the content and the edge of the widget. This should be added to the returned size.
widget | Widget number. | |
size | Size of the widget. | |
padding | Recommended amount of space between the widget content and the widget edge. | |
fill | Fill step of the widget. | |
resize | Resize step of the widget. |
Reimplemented from Window.
Definition at line 1237 of file station_gui.cpp.
References accepts_lines, expand_shrink_width, FONT_HEIGHT_NORMAL, GetStringBoundingBox(), max(), rating_lines, SVW_ACCEPTLIST, SVW_ACCEPTS, SVW_WAITING, WD_FRAMERECT_BOTTOM, WD_FRAMERECT_LEFT, WD_FRAMERECT_RIGHT, WD_FRAMERECT_TOP, and Window::width.
const StringID StationViewWindow::_group_names [static] |
{ STR_STATION_VIEW_GROUP_S_V_D, STR_STATION_VIEW_GROUP_S_D_V, STR_STATION_VIEW_GROUP_V_S_D, STR_STATION_VIEW_GROUP_V_D_S, STR_STATION_VIEW_GROUP_D_S_V, STR_STATION_VIEW_GROUP_D_V_S, INVALID_STRING_ID }
Names of the grouping options in the dropdown.
Definition at line 1145 of file station_gui.cpp.
Referenced by OnClick(), and SelectGroupBy().
const StringID StationViewWindow::_sort_names [static] |
{ STR_STATION_VIEW_WAITING_STATION, STR_STATION_VIEW_WAITING_AMOUNT, STR_STATION_VIEW_PLANNED_STATION, STR_STATION_VIEW_PLANNED_AMOUNT, INVALID_STRING_ID }
Names of the sorting options in the dropdown.
Definition at line 1144 of file station_gui.cpp.
Referenced by OnClick(), and SelectSortBy().
SortOrder StationViewWindow::sort_orders[NUM_COLUMNS] |
Sort order (ascending/descending) for the 'columns'.
Definition at line 1156 of file station_gui.cpp.
Referenced by DrawEntries(), OnClick(), OnPaint(), and SelectSortOrder().
Sort types of the different 'columns'.
In fact only ST_COUNT and ST_AS_GROUPING are active and you can only sort all the columns in the same way. The other options haven't been included in the GUI due to lack of space.
Definition at line 1153 of file station_gui.cpp.
Referenced by DrawEntries(), and SelectSortBy().