# querystring_gui.h File Reference

Base for the GUIs that have an edit box in them. More...

`#include "textbuf_gui.h"`
`#include "window_gui.h"`

Go to the source code of this file.

## Data Structures
struct | QueryString
| Data stored about a string that can be modified in the GUI. More...
struct | QueryStringBaseWindow
## Enumerations
enum | HandleEditBoxResult { HEBR_EDITING = 0, HEBR_CONFIRM, HEBR_CANCEL, HEBR_NOT_FOCUSED }
| Return values for HandleEditBoxKey.
## Functions
void | ShowOnScreenKeyboard (QueryStringBaseWindow *parent, int button, int cancel, int ok)
| Show the on-screen keyboard (osk) associated with a given textbox.
void | UpdateOSKOriginalText (const QueryStringBaseWindow *parent, int button)
| Updates the original text of the OSK so when the 'parent' changes the original and you press on cancel you won't get the 'old' original text but the updated one.

## Detailed Description

Base for the GUIs that have an edit box in them.

Definition in file querystring_gui.h.

## Function Documentation

void ShowOnScreenKeyboard | ( | QueryStringBaseWindow * | parent,
|  | int | button,
|  | int | cancel,
|  | int | ok |
| ) |  |  |

Show the on-screen keyboard (osk) associated with a given textbox.

Parameters:

  | parent | pointer to the Window where this keyboard originated from
  | button | widget number of parent's textbox
  | cancel | widget number of parent's cancel button (0 if cancel events should not be passed)
  | ok | widget number of parent's ok button (0 if ok events should not be passed)

Definition at line 462 of file osk_gui.cpp.

References DeleteWindowById(), and GetKeyboardLayout().

void UpdateOSKOriginalText | ( | const QueryStringBaseWindow * | parent,
|  | int | button |
| ) |  |  |

Updates the original text of the OSK so when the 'parent' changes the original and you press on cancel you won't get the 'old' original text but the updated one.

Parameters:

  | parent | window that just updated its orignal text
  | button | widget number of parent's textbox to update

Definition at line 477 of file osk_gui.cpp.

References Textbuf::buf, FindWindowById(), OskWindow::orig_str_buf, OskWindow::qs, Window::SetDirty(), and OskWindow::text_btn.