# GraphLegendWindow Struct Reference

Inheritance diagram for GraphLegendWindow:

## Public Member Functions
| GraphLegendWindow (const WindowDesc *desc, WindowNumber window_number)
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 void | OnInvalidateData (int data)
| Some data on this window has become invalid.

## Detailed Description

Definition at line 51 of file graph_gui.cpp.

## Member Function Documentation

virtual void GraphLegendWindow::DrawWidget | ( | const Rect & | r,
|  | int | widget |
| ) |  |  | const`[inline, virtual]`

Draw the contents of a nested widget.

Parameters:

  | r | Rectangle occupied by the widget.
  | widget | Number of the widget to draw.

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

Reimplemented from Window.

Definition at line 63 of file graph_gui.cpp.

References _current_text_dir, DrawCompanyIcon(), DrawString(), FONT_HEIGHT_NORMAL, HasBit(), IsInsideMM(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), MAX_COMPANIES, SetDParam(), TD_RTL, WD_FRAMERECT_LEFT, WD_FRAMERECT_RIGHT, and WD_FRAMERECT_TOP.

virtual void GraphLegendWindow::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 80 of file graph_gui.cpp.

References InvalidateWindowData(), IsInsideMM(), MAX_COMPANIES, Window::SetDirty(), ToggleBit(), and Window::ToggleWidgetLoweredState().

virtual void GraphLegendWindow::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 94 of file graph_gui.cpp.

References Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), Window::RaiseWidget(), and SetBit().

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

- src/graph_gui.cpp