# NewGRFAddWindow Struct Reference

Window for adding NewGRF files. More...

Inheritance diagram for NewGRFAddWindow:

## Public Types

enum | AddNewGRFWindowWidgets { ANGRFW_CLOSEBOX = 0, ANGRFW_CAPTION, ANGRFW_BACKGROUND, ANGRFW_GRF_LIST, ANGRFW_SCROLLBAR, ANGRFW_GRF_INFO, ANGRFW_ADD, ANGRFW_RESCAN, ANGRFW_RESIZE }

## Public Member Functions

| NewGRFAddWindow (const WindowDesc *desc, GRFConfig **list)
virtual void | OnPaint ()
| This window is currently being repainted.
virtual void | OnDoubleClick (Point pt, int widget)
| A double click with the left mouse button has been made on the window.
virtual void | OnClick (Point pt, int widget)
| A click with the left mouse button has been made on the window.

## Data Fields

GRFConfig ** | list
const GRFConfig * | sel

## Detailed Description

Window for adding NewGRF files.

Definition at line 119 of file newgrf_gui.cpp.

## Member Function Documentation

virtual void NewGRFAddWindow::OnDoubleClick | ( | Point | pt,
|  | int | widget |
| ) |  |  | `[inline, virtual]`

A double 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.

Reimplemented from Window.

Definition at line 180 of file newgrf_gui.cpp.

References OnClick().

virtual void NewGRFAddWindow::OnClick | ( | Point | pt,
|  | int | widget |
| ) |  |  | `[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.

Reimplemented from Window.

Definition at line 185 of file newgrf_gui.cpp.

References _all_grfs, DeleteWindowByClass(), GRFConfig::filename, GRFIdentifier::grfid, GRFConfig::info, INVALID_STRING_ID, InvalidateWindowData(), GRFConfig::name, GRFConfig::next, Scrollbar::pos, Window::SetDirty(), Window::vscroll, and Point::y.

Referenced by OnDoubleClick().

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

- src/newgrf_gui.cpp