# GraphLegendWindow Struct Reference

Inheritance diagram for GraphLegendWindow:

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

## Detailed Description

Definition at line 50 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 67 of file graph_gui.cpp.

References _dynlang, DrawString(), FONT_HEIGHT_NORMAL, HasBit(), IsInsideMM(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), MAX_COMPANIES, SetDParam(), TD_RTL, DynamicLanguages::text_dir, 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 84 of file graph_gui.cpp.

References IsInsideMM(), MAX_COMPANIES, Window::SetDirty(), SetWindowDirty(), 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 98 of file graph_gui.cpp.

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

virtual void GraphLegendWindow::OnPaint | ( |  | ) | `[inline, virtual]`

The window must be repainted.

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

Reimplemented from Window.

Definition at line 62 of file graph_gui.cpp.

References Window::DrawWidgets().

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

- src/graph_gui.cpp