# SignWindow Struct Reference

Inheritance diagram for SignWindow:

## Public Member Functions
| SignWindow (const WindowDesc *desc, const Sign *si)
void | UpdateSignEditWindow (const Sign *si)
const Sign * | PrevNextSign (bool next)
| Returns a pointer to the (alphabetically) previous or next sign of the current sign.
virtual void | SetStringParameters (int widget) const
| Initialize string parameters for a widget.
virtual void | OnPaint ()
| The window must be repainted.
virtual void | OnClick (Point pt, int widget, int click_count)
| 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.
virtual void | OnMouseLoop ()
| Called for every mouse loop run, which is at least once per (game) tick.
virtual void | OnOpenOSKWindow (int wid)
## Data Fields
SignID | cur_sign

## Detailed Description

Definition at line 256 of file signs_gui.cpp.

## Member Function Documentation

virtual void SignWindow::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 333 of file signs_gui.cpp.

References Textbuf::buf, GUIList< T, F >::ForceRebuild(), GUIList< T, F >::NeedResort(), PrevNextSign(), and RenameSign().

virtual EventState SignWindow::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 368 of file signs_gui.cpp.

References Textbuf::buf, Window::ES_NOT_HANDLED, and RenameSign().

virtual void SignWindow::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 327 of file signs_gui.cpp.

References Window::DrawWidgets(), and Window::IsShaded().

const Sign* SignWindow::PrevNextSign | ( | bool | next | ) | `[inline]`

Returns a pointer to the (alphabetically) previous or next sign of the current sign.

Parameters:

  | next | false if the previous sign is wanted, true if the next sign is wanted

Returns:
  pointer to the previous/next sign

Definition at line 296 of file signs_gui.cpp.

References GUIList< T, F >::ForceRebuild(), SmallVector< T, S >::Length(), and GUIList< T, F >::NeedResort().

Referenced by OnClick().

virtual void SignWindow::SetStringParameters | ( | int | widget | ) | const`[inline, virtual]`

Initialize string parameters for a widget.

Calls to this function are made during initialization to measure the size (that is as part of InitNested()), during drawing, and while re-initializing the window. Only for widgets that render text initializing is requested.

Parameters:

  | widget | Widget number.

Reimplemented from Window.

Definition at line 318 of file signs_gui.cpp.

References SetDParam().

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

- src/signs_gui.cpp