
Public Member Functions | |
| CompanyStationsWindow (const WindowDesc *desc, WindowNumber window_number) | |
| virtual void | OnPaint () |
| This window is currently being repainted. | |
| virtual void | OnClick (Point pt, int widget) |
| A click with the left mouse button has been made on the window. | |
| virtual void | OnDropdownSelect (int widget, int index) |
| A dropdown option associated to this window has been selected. | |
| virtual void | OnTick () |
| Called once per (game) tick. | |
| virtual void | OnTimeout () |
| Called when this window's timeout has been reached. | |
| virtual void | OnResize (Point new_size, Point delta) |
| Called when the window got resized. | |
| virtual void | OnInvalidateData (int data) |
| Some data on this window has become invalid. | |
Protected Member Functions | |
| void | BuildStationsList (const Owner owner) |
| (Re)Build station list | |
| void | SortStationsList () |
| Sort the stations list. | |
Static Protected Member Functions | |
| static int CDECL | StationNameSorter (const Station *const *a, const Station *const *b) |
| Sort stations by their name. | |
| static int CDECL | StationTypeSorter (const Station *const *a, const Station *const *b) |
| Sort stations by their type. | |
| static int CDECL | StationWaitingSorter (const Station *const *a, const Station *const *b) |
| Sort stations by their waiting cargo. | |
| static int CDECL | StationRatingMaxSorter (const Station *const *a, const Station *const *b) |
| Sort stations by their rating. | |
Protected Attributes | |
| GUIStationList | stations |
Static Protected Attributes | |
| static Listing | last_sorting = {false, 0} |
| static byte | facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK |
| static bool | include_empty = true |
| static const uint32 | cargo_filter_max = UINT32_MAX |
| static uint32 | cargo_filter = UINT32_MAX |
| static const Station * | last_station = NULL |
| static const StringID | sorter_names [] |
| static GUIStationList::SortFunction *const | sorter_funcs [] |
Definition at line 87 of file station_gui.cpp.
| void CompanyStationsWindow::BuildStationsList | ( | const Owner | owner | ) | [inline, protected] |
(Re)Build station list
| owner | company whose stations are to be in list |
Definition at line 110 of file station_gui.cpp.
References Station::facilities, Station::goods, HasBit(), HasStationInUse(), PoolItem< T, Tid, Tpool >::index, Station::IsBuoy(), Station::owner, and OWNER_NONE.
Referenced by OnPaint().
| virtual void CompanyStationsWindow::OnClick | ( | Point | pt, | |
| int | widget | |||
| ) | [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. |
Reimplemented from Window.
Definition at line 360 of file station_gui.cpp.
References _ctrl_pressed, Scrollbar::cap, Window::flags4, FOR_EACH_SET_BIT, Station::IsBuoy(), Window::LowerWidget(), Station::owner, OWNER_NONE, Scrollbar::pos, Window::RaiseWidget(), SetBit(), Window::SetDirty(), Window::SetWidgetLoweredState(), SLW_CARGOALL, SLW_CARGOSTART, SLW_FACILALL, SLW_LIST, SLW_NOCARGOWAITING, SLW_SORTBY, SLW_SORTDROPBTN, SLW_TRAIN, ToggleBit(), Window::ToggleWidgetLoweredState(), Window::vscroll, WF_TIMEOUT_BEGIN, Window::widget_count, Station::xy, and Point::y.
| virtual void CompanyStationsWindow::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 497 of file station_gui.cpp.
References Window::SetDirty(), and SLW_SORTDROPBTN.
Called when the window got resized.
| new_size | the new size of the window. | |
| delta | the amount of which the window size changed. |
Reimplemented from Window.
Definition at line 524 of file station_gui.cpp.
References Scrollbar::cap, Window::vscroll, and Point::y.
| virtual void CompanyStationsWindow::OnInvalidateData | ( | int | data | ) | [inline, virtual] |
Some data on this window has become invalid.
| data | information about the changed data. |
Reimplemented from Window.
Definition at line 529 of file station_gui.cpp.
const StringID CompanyStationsWindow::sorter_names [static, protected] |
Initial value:
{
STR_SORT_BY_DROPDOWN_NAME,
STR_SORT_BY_FACILITY,
STR_SORT_BY_WAITING,
STR_SORT_BY_RATING_MAX,
INVALID_STRING_ID
}
Definition at line 99 of file station_gui.cpp.
GUIStationList::SortFunction *const CompanyStationsWindow::sorter_funcs [static, protected] |
Initial value:
Definition at line 100 of file station_gui.cpp.
1.5.6