Public Member Functions | |
ExtraViewportWindow (const WindowDesc *desc, int window_number, TileIndex tile) | |
virtual void | SetStringParameters (int widget) const |
Initialize string parameters for a widget. | |
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 | OnResize () |
Called after the window got resized. | |
virtual void | OnScroll (Point delta) |
Handle the request for (viewport) scrolling. | |
virtual void | OnMouseWheel (int wheel) |
The mouse wheel has been turned. | |
virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
Some data on this window has become invalid. |
Definition at line 52 of file viewport_gui.cpp.
virtual void ExtraViewportWindow::OnClick | ( | Point | pt, | |
int | widget, | |||
int | click_count | |||
) | [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. | |
click_count | Number of fast consecutive clicks at same position |
Reimplemented from Window.
Definition at line 90 of file viewport_gui.cpp.
References ViewportData::dest_scrollpos_x, ViewportData::dest_scrollpos_y, DoZoomInOutWindow(), FindWindowById(), ViewportData::follow_vehicle, INVALID_VEHICLE, ViewportData::scrollpos_x, ViewportData::scrollpos_y, Window::viewport, ViewPort::virtual_height, ViewPort::virtual_width, WC_MAIN_WINDOW, WID_EV_MAIN_TO_VIEW, WID_EV_VIEW_TO_MAIN, WID_EV_ZOOM_IN, WID_EV_ZOOM_OUT, ZOOM_IN, and ZOOM_OUT.
virtual void ExtraViewportWindow::OnInvalidateData | ( | int | data = 0 , |
|
bool | gui_scope = true | |||
) | [inline, virtual] |
Some data on this window has become invalid.
data | Information about the changed data. | |
gui_scope | Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See InvalidateWindowData() for details. |
Reimplemented from Window.
Definition at line 148 of file viewport_gui.cpp.
References HandleZoomMessage(), Window::viewport, WID_EV_ZOOM_IN, and WID_EV_ZOOM_OUT.
virtual void ExtraViewportWindow::OnMouseWheel | ( | int | wheel | ) | [inline, virtual] |
The mouse wheel has been turned.
wheel | the amount of movement of the mouse wheel. |
Reimplemented from Window.
Definition at line 136 of file viewport_gui.cpp.
References _settings_client, ClientSettings::gui, and GUISettings::scrollwheel_scrolling.
virtual void ExtraViewportWindow::OnResize | ( | ) | [inline, virtual] |
Called after the window got resized.
For nested windows with a viewport, call NWidgetViewport::UpdateViewportCoordinates.
Reimplemented from Window.
Definition at line 120 of file viewport_gui.cpp.
References NWidgetViewport::UpdateViewportCoordinates(), and Window::viewport.
virtual void ExtraViewportWindow::OnScroll | ( | Point | delta | ) | [inline, virtual] |
Handle the request for (viewport) scrolling.
delta | the amount the viewport must be scrolled. |
Reimplemented from Window.
Definition at line 128 of file viewport_gui.cpp.
References ViewportData::dest_scrollpos_x, ViewportData::dest_scrollpos_y, ScaleByZoom(), ViewportData::scrollpos_x, ViewportData::scrollpos_y, and Window::viewport.
virtual void ExtraViewportWindow::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.
widget | Widget number. |
Reimplemented from Window.
Definition at line 80 of file viewport_gui.cpp.
References SetDParam(), and WID_EV_CAPTION.