Inheritance diagram for BuildRoadToolbarWindow:

Public Member Functions | |
| BuildRoadToolbarWindow (const WindowDesc *desc, WindowNumber window_number) | |
| ~BuildRoadToolbarWindow () | |
| void | UpdateOptionWidgetStatus (RoadToolbarWidgets clicked_widget) |
| Update the remove button lowered state of the road toolbar. | |
| 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 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 | OnPlaceObjectAbort () |
| The user cancelled a tile highlight mode that 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 | OnPlacePresize (Point pt, TileIndex tile) |
| The user moves over the map when a tile highlight mode has been set when the special mouse mode has been set to 'PRESIZE' mode. | |
| virtual EventState | OnCTRLStateChange () |
| The state of the control key has changed. | |
Definition at line 404 of file road_gui.cpp.
| virtual void BuildRoadToolbarWindow::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 482 of file road_gui.cpp.
References _build_road_button_proc, _ctrl_pressed, _one_way_button_clicked, _remove_button_clicked, RoadToolbar_CtrlChanged(), and UpdateOptionWidgetStatus().
| virtual EventState BuildRoadToolbarWindow::OnCTRLStateChange | ( | ) | [inline, virtual] |
The state of the control key has changed.
Reimplemented from Window.
Definition at line 614 of file road_gui.cpp.
References RoadToolbar_CtrlChanged().
| virtual EventState BuildRoadToolbarWindow::OnKeyPress | ( | uint16 | key, | |
| uint16 | keycode | |||
| ) | [inline, virtual] |
A key has been pressed.
| key | the Unicode value of the key. | |
| keycode | the untranslated key code including shift state. |
Reimplemented from Window.
Definition at line 493 of file road_gui.cpp.
References _build_road_button_proc, _ctrl_pressed, _one_way_button_clicked, _remove_button_clicked, _road_keycodes, _thd, lengthof, MarkTileDirty(), TileHighlightData::pos, RoadToolbar_CtrlChanged(), UpdateOptionWidgetStatus(), Point::x, and Point::y.
| virtual void BuildRoadToolbarWindow::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.
| 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 533 of file road_gui.cpp.
References _place_road_flag, _thd, _tile_fract_coords, TileHighlightData::size, VpSelectTilesWithMethod(), Point::x, and Point::y.
| virtual void BuildRoadToolbarWindow::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.
| 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 576 of file road_gui.cpp.
References _ctrl_pressed, _cur_roadtype, _one_way_button_clicked, _place_road_flag, _remove_button_clicked, _road_type_infos, CcPlaySound1D, CMD_BUILD_LONG_ROAD, CMD_MSG, CMD_NO_WATER, CMD_REMOVE_LONG_ROAD, DoCommandP(), GUIPlaceProcDragXY(), NOT_REACHED, ResetObjectToPlace(), RoadTypeToRoadTypes(), ShowBuildBridgeWindow(), and Point::x.
The user clicked some place on the map when a tile highlight mode has been set.
| 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 511 of file road_gui.cpp.
References _one_way_button_clicked, _place_proc, _remove_button_clicked, and Window::IsWidgetLowered().
The user moves over the map when a tile highlight mode has been set when the special mouse mode has been set to 'PRESIZE' mode.
An example of this is the tile highlight for dock building.
| pt | the exact point on the map where the mouse is. | |
| tile | the tile on the map where the mouse is. |
Reimplemented from Window.
Definition at line 608 of file road_gui.cpp.
References _build_tunnel_endtile, _cur_roadtype, CMD_BUILD_TUNNEL, DC_AUTO, DoCommand(), RoadTypeToRoadTypes(), and VpSetPresizeRange().
| void BuildRoadToolbarWindow::UpdateOptionWidgetStatus | ( | RoadToolbarWidgets | clicked_widget | ) | [inline] |
Update the remove button lowered state of the road toolbar.
| clicked_widget | The widget which the player clicked just now |
Definition at line 426 of file road_gui.cpp.
References Window::DisableWidget(), Window::InvalidateWidget(), Window::RaiseWidget(), Window::SetWidgetDisabledState(), Window::SetWidgetsDisabledState(), Window::SetWidgetsLoweredState(), and WIDGET_LIST_END.
Referenced by OnClick(), and OnKeyPress().
1.4.7