BuildVehicleWindow Struct Reference

Inheritance diagram for BuildVehicleWindow:

Window ZeroedMemoryAllocator

Public Member Functions

 BuildVehicleWindow (const WindowDesc *desc, TileIndex tile, VehicleType type)
void SetupWindowStrings (VehicleType type)
void GenerateBuildTrainList ()
void GenerateBuildRoadVehList ()
void GenerateBuildShipList ()
void GenerateBuildAircraftList ()
void GenerateBuildList ()
void OnClick (Point pt, int widget)
 A click with the left mouse button has been made on the window.
virtual void OnInvalidateData (int data)
 Some data on this window has become invalid.
virtual void OnPaint ()
 This window is currently being repainted.
virtual void OnDoubleClick (Point pt, int widget)
 A double click with the left mouse button has been made on the window.
virtual void OnQueryTextFinished (char *str)
 The query window opened from this window has closed.
virtual void OnDropdownSelect (int widget, int index)
 A dropdown option associated to this window has been selected.
virtual void OnResize (Point new_size, Point delta)
 Called when the window got resized.

Data Fields

VehicleType vehicle_type
union {
   RailTypeByte   railtype
   AirportFTAClass::Flags   flags
   RoadTypes   roadtypes
filter
bool descending_sort_order
byte sort_criteria
bool regenerate_list
bool listview_mode
EngineID sel_engine
EngineID rename_engine
GUIEngineList eng_list

Detailed Description

Definition at line 793 of file build_vehicle_gui.cpp.


Member Function Documentation

void BuildVehicleWindow::OnClick ( Point  pt,
int  widget 
) [inline, virtual]

A click with the left mouse button has been made on the window.

Parameters:
pt the point inside the window that has been clicked.
widget the clicked widget.

Reimplemented from Window.

Definition at line 1038 of file build_vehicle_gui.cpp.

References _last_sort_order, _sort_listing, CcBuildAircraft, CcBuildLoco, CcBuildRoadVeh, CcBuildShip, CcBuildWagon, CMD_BUILD_AIRCRAFT, CMD_BUILD_RAIL_VEHICLE, CMD_BUILD_ROAD_VEH, CMD_BUILD_SHIP, CMD_MSG, CS_ALPHANUMERAL, descending_sort_order, DoCommandP(), eng_list, GetVehicleListHeight(), INVALID_ENGINE, SmallVector< T, S >::Length(), MAX_LENGTH_ENGINE_NAME_BYTES, MAX_LENGTH_ENGINE_NAME_PIXELS, NOT_REACHED, Scrollbar::pos, RAILVEH_WAGON, RailVehInfo(), regenerate_list, rename_engine, sel_engine, Window::SetDirty(), SetDParam(), ShowDropDownMenu(), ShowQueryString(), vehicle_type, Window::vscroll, and Point::y.

Referenced by OnDoubleClick().

virtual void BuildVehicleWindow::OnDoubleClick ( Point  pt,
int  widget 
) [inline, virtual]

A double click with the left mouse button has been made on the window.

Parameters:
pt the point inside the window that has been clicked.
widget the clicked widget.

Reimplemented from Window.

Definition at line 1149 of file build_vehicle_gui.cpp.

References OnClick().

virtual void BuildVehicleWindow::OnDropdownSelect ( int  widget,
int  index 
) [inline, virtual]

A dropdown option associated to this window has been selected.

Parameters:
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 1173 of file build_vehicle_gui.cpp.

References _last_sort_criteria, regenerate_list, Window::SetDirty(), sort_criteria, and vehicle_type.

virtual void BuildVehicleWindow::OnInvalidateData ( int  data  )  [inline, virtual]

Some data on this window has become invalid.

Parameters:
data information about the changed data.

Reimplemented from Window.

Definition at line 1104 of file build_vehicle_gui.cpp.

References regenerate_list.

virtual void BuildVehicleWindow::OnQueryTextFinished ( char *  str  )  [inline, virtual]

The query window opened from this window has closed.

Parameters:
str the new value of the string or NULL if the window was cancelled.

Reimplemented from Window.

Definition at line 1157 of file build_vehicle_gui.cpp.

References _cmd_text, CMD_MSG, CMD_RENAME_ENGINE, DoCommandP(), NOT_REACHED, and StrEmpty().

virtual void BuildVehicleWindow::OnResize ( Point  new_size,
Point  delta 
) [inline, virtual]

Called when the window got resized.

Parameters:
new_size the new size of the window.
delta the amount of which the window size changed.

Reimplemented from Window.

Definition at line 1183 of file build_vehicle_gui.cpp.

References Scrollbar::cap, Widget::data, GetVehicleListHeight(), int, ResizeButtons(), Window::vscroll, Window::widget, Point::x, and Point::y.


The documentation for this struct was generated from the following file:
Generated on Sat Sep 6 20:15:59 2008 for openttd by  doxygen 1.4.7