BuildAirToolbarWindow Struct Reference

Airport build toolbar window handler. More...

Inheritance diagram for BuildAirToolbarWindow:
Window ZeroedMemoryAllocator

Public Member Functions

 BuildAirToolbarWindow (const WindowDesc *desc, WindowNumber window_number)
virtual void OnClick (Point pt, int widget, int click_count)
 A click with the left mouse button has been made on the window.
virtual EventState OnKeyPress (uint16 key, uint16 keycode)
 A key has been pressed.
virtual void OnPlaceObject (Point pt, TileIndex tile)
 The user clicked some place on the map when a tile highlight mode has been set.
virtual void OnPlaceDrag (ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
 The user is dragging over the map when the tile highlight mode has been set.
virtual void OnPlaceMouseUp (ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
 The user has dragged over the map when the tile highlight mode has been set.
virtual void OnPlaceObjectAbort ()
 The user cancelled a tile highlight mode that has been set.

Data Fields

int last_user_action

Static Public Attributes

static Hotkey
< BuildAirToolbarWindow
airtoolbar_hotkeys []

Detailed Description

Airport build toolbar window handler.

Definition at line 73 of file airport_gui.cpp.


Member Function Documentation

virtual void BuildAirToolbarWindow::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 88 of file airport_gui.cpp.

References ANIMCURSOR_DEMOLISH, HandlePlacePushButton(), HT_DIAGONAL, and HT_RECT.

Referenced by OnKeyPress().

virtual EventState BuildAirToolbarWindow::OnKeyPress ( uint16  key,
uint16  keycode 
) [inline, virtual]

A key has been pressed.

Parameters:
key the Unicode value of the key.
keycode the untranslated key code including shift state.
Returns:
ES_HANDLED if the key press has been handled and no other window should receive the event.

Reimplemented from Window.

Definition at line 108 of file airport_gui.cpp.

References CheckHotkeyMatch(), ES_HANDLED, ES_NOT_HANDLED, and OnClick().

virtual void BuildAirToolbarWindow::OnPlaceDrag ( ViewportPlaceMethod  select_method,
ViewportDragDropSelectionProcess  select_proc,
Point  pt 
) [inline, virtual]

The user is dragging over the map when the tile highlight mode has been set.

Parameters:
select_method the method of selection (allowed directions)
select_proc what will be created when the drag is over.
pt the exact point on the map where the mouse is.

Reimplemented from Window.

Definition at line 131 of file airport_gui.cpp.

References VpSelectTilesWithMethod().

virtual void BuildAirToolbarWindow::OnPlaceMouseUp ( ViewportPlaceMethod  select_method,
ViewportDragDropSelectionProcess  select_proc,
Point  pt,
TileIndex  start_tile,
TileIndex  end_tile 
) [inline, virtual]

The user has dragged over the map when the tile highlight mode has been set.

Parameters:
select_method the method of selection (allowed directions)
select_proc what should be created.
pt the exact point on the map where the mouse was released.
start_tile the begin tile of the drag.
end_tile the end tile of the drag.

Reimplemented from Window.

Definition at line 136 of file airport_gui.cpp.

References DDSP_DEMOLISH_AREA, and GUIPlaceProcDragXY().

virtual void BuildAirToolbarWindow::OnPlaceObject ( Point  pt,
TileIndex  tile 
) [inline, virtual]

The user clicked some place on the map when a tile highlight mode has been set.

Parameters:
pt the exact point on the map that has been clicked.
tile the tile on the map that has been clicked.

Reimplemented from Window.

Definition at line 116 of file airport_gui.cpp.

References PlaceAirport(), and PlaceProc_DemolishArea().


Field Documentation

Hotkey< BuildAirToolbarWindow > BuildAirToolbarWindow::airtoolbar_hotkeys [static]
Initial value:
 {
  Hotkey<BuildAirToolbarWindow>('1', "airport", ATW_AIRPORT),
  Hotkey<BuildAirToolbarWindow>('2', "demolish", ATW_DEMOLISH),

}

Definition at line 151 of file airport_gui.cpp.


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

Generated on Thu Jan 20 22:58:17 2011 for OpenTTD by  doxygen 1.6.1