Public Member Functions | |
TransparenciesWindow (const WindowDesc *desc, int window_number) | |
virtual void | OnPaint () |
The window must be repainted. | |
virtual void | DrawWidget (const Rect &r, int widget) const |
Draw the contents of a nested 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 Point | OnInitialPosition (const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number) |
Compute the initial position of the window. | |
virtual void | OnInvalidateData (int data=0, bool gui_scope=true) |
Some data on this window has become invalid. |
Definition at line 27 of file transparency_gui.cpp.
virtual void TransparenciesWindow::DrawWidget | ( | const Rect & | r, | |
int | widget | |||
) | const [inline, virtual] |
Draw the contents of a nested widget.
r | Rectangle occupied by the widget. | |
widget | Number of the widget to draw. |
Reimplemented from Window.
Definition at line 41 of file transparency_gui.cpp.
References _invisibility_opt, _transparency_lock, NWidgetBase::current_x, DrawFrameRect(), DrawSprite(), FR_LOWERED, HasBit(), NWidgetBase::pos_x, WID_TT_BEGIN, WID_TT_BRIDGES, WID_TT_BUILDINGS, WID_TT_BUTTONS, WID_TT_CATENARY, WID_TT_HOUSES, WID_TT_INDUSTRIES, WID_TT_LOADING, WID_TT_SIGNS, WID_TT_STRUCTURES, and WID_TT_TREES.
virtual void TransparenciesWindow::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 69 of file transparency_gui.cpp.
References _ctrl_pressed, NWidgetBase::current_x, IsInsideBS(), IsTransparencySet(), MarkWholeScreenDirty(), NWidgetBase::pos_x, Window::SetDirty(), Window::SetWidgetDirty(), ToggleInvisibility(), ToggleTransparency(), ToggleTransparencyLock(), WID_TT_BEGIN, WID_TT_BUTTONS, WID_TT_END, and WID_TT_LOADING.
virtual Point TransparenciesWindow::OnInitialPosition | ( | const WindowDesc * | desc, | |
int16 | sm_width, | |||
int16 | sm_height, | |||
int | window_number | |||
) | [inline, virtual] |
Compute the initial position of the window.
*desc | The pointer to the WindowDesc of the window to create. | |
sm_width | Smallest width of the window. | |
sm_height | Smallest height of the window. | |
window_number | The window number of the new window. |
Reimplemented from Window.
Definition at line 104 of file transparency_gui.cpp.
References GetToolbarAlignedWindowPosition().
virtual void TransparenciesWindow::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 116 of file transparency_gui.cpp.
References IsTransparencySet(), Window::SetWidgetLoweredState(), and WID_TT_BEGIN.
Referenced by OnPaint().
virtual void TransparenciesWindow::OnPaint | ( | ) | [inline, virtual] |
The window must be repainted.
Reimplemented from Window.
Definition at line 35 of file transparency_gui.cpp.
References Window::DrawWidgets(), and OnInvalidateData().