WaypointWindow Struct Reference

Inheritance diagram for WaypointWindow:
Window ZeroedMemoryAllocator

Public Member Functions

 WaypointWindow (const WindowDesc *desc, WindowNumber window_number)
virtual void SetStringParameters (int widget) const
 Initialize string parameters for a widget.
virtual void OnPaint ()
 The window must be repainted.
virtual void OnClick (Point pt, int widget, int click_count)
 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 OnResize ()
 Called after the window got resized.
virtual void OnQueryTextFinished (char *str)
 The query window opened from this window has closed.

Private Attributes

VehicleType vt
Waypointwp

Detailed Description

Definition at line 36 of file waypoint_gui.cpp.


Member Function Documentation

virtual void WaypointWindow::OnClick ( Point  pt,
int  widget,
int  click_count 
) [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.
click_count Number of fast consecutive clicks at same position

Reimplemented from Window.

Definition at line 81 of file waypoint_gui.cpp.

References _ctrl_pressed, CS_ALPHANUMERAL, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, MAX_LENGTH_STATION_NAME_BYTES, MAX_LENGTH_STATION_NAME_PIXELS, Window::owner, QSF_ENABLE_DEFAULT, SetDParam(), ShowQueryString(), and BaseStation::xy.

virtual void WaypointWindow::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 103 of file waypoint_gui.cpp.

References BaseStation::IsInUse(), BaseStation::owner, OWNER_NONE, ScrollWindowTo(), Window::SetWidgetDisabledState(), TILE_SIZE, TileX(), TileY(), and BaseStation::xy.

virtual void WaypointWindow::OnPaint (  )  [inline, virtual]

The window must be repainted.

Note:
This method should not change any state, it should only use drawing functions.

Reimplemented from Window.

Definition at line 76 of file waypoint_gui.cpp.

References Window::DrawWidgets().

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

The query window opened from this window has closed.

Parameters:
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 123 of file waypoint_gui.cpp.

References CMD_MSG, CMD_RENAME_WAYPOINT, and DoCommandP().

virtual void WaypointWindow::OnResize (  )  [inline, virtual]

Called after the window got resized.

For nested windows with a viewport, call NWidgetViewport::UpdateViewportCoordinates.

Reimplemented from Window.

Definition at line 115 of file waypoint_gui.cpp.

References NWidgetViewport::UpdateViewportCoordinates(), and Window::viewport.

virtual void WaypointWindow::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.

Parameters:
widget Widget number.

Reimplemented from Window.

Definition at line 71 of file waypoint_gui.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, and SetDParam().


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

Generated on Sat Nov 20 21:00:32 2010 for OpenTTD by  doxygen 1.6.1