# QueryWindow Struct Reference

Window used for asking the user a YES/NO question. More...

Inheritance diagram for QueryWindow:

## Public Member Functions
| QueryWindow (const WindowDesc *desc, StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
virtual void | OnPaint ()
| This window is currently being repainted.
virtual void | OnClick (Point pt, int widget)
| A click with the left mouse button has been made on the window.
virtual EventState | OnKeyPress (uint16 key, uint16 keycode)
| A key has been pressed.
## Data Fields
QueryCallbackProc * | proc
| callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise
uint64 | params [10]
| local copy of _decode_parameters
StringID | message
| message shown for query window

## Detailed Description

Window used for asking the user a YES/NO question.

Definition at line 1231 of file misc_gui.cpp.

## Member Function Documentation

virtual void QueryWindow::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 1267 of file misc_gui.cpp.

References Window::parent, and proc.

virtual EventState QueryWindow::OnKeyPress | ( | uint16 | key,
|  | uint16 | keycode |
| ) |  |  | `[inline, virtual]`

A key has been pressed.

Parameters:

  | key | the Unicode value of the key.
  | keycode | the untranslated key code including shift state.

Returns:
  ES_HANDLED if the key press has been handled and no other window should receive the event.

Reimplemented from Window.

Definition at line 1289 of file misc_gui.cpp.

References Window::ES_HANDLED, Window::ES_NOT_HANDLED, Window::parent, and proc.

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

- src/misc_gui.cpp