|
OpenTTD Source
14.0-beta1
|
Go to the documentation of this file.
10 #ifndef QUERYSTRING_GUI_H
11 #define QUERYSTRING_GUI_H
30 std::optional<std::string> orig;
int ok_button
Widget button of parent window to simulate when pressing OK in OSK.
void UpdateOSKOriginalText(const Window *parent, WidgetID button)
Updates the original text of the OSK so when the 'parent' changes the original and you press on cance...
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Data stored about a string that can be modified in the GUI.
ptrdiff_t GetCharAtPosition(const Window *w, WidgetID wid, const Point &pt) const
Get the character that is rendered at a position.
Rect GetBoundingRect(const Window *w, WidgetID wid, const char *from, const char *to) const
Get the bounding rectangle for a range of the query string.
QueryString(uint16_t size, uint16_t chars=UINT16_MAX)
Initialize string.
Coordinates of a point in 2D.
Point GetCaretPosition(const Window *w, WidgetID wid) const
Get the current caret position.
int cancel_button
Widget button of parent window to simulate when pressing CANCEL in OSK.
static const int ACTION_CLEAR
Clear editbox.
void ShowOnScreenKeyboard(Window *parent, WidgetID button)
Show the on-screen keyboard (osk) associated with a given textbox.
Data structure for an opened window.
static const int ACTION_DESELECT
Deselect editbox.
Specification of a rectangle with absolute coordinates of all edges.
bool IsOSKOpenedFor(const Window *w, WidgetID button)
Check whether the OSK is opened for a specific editbox.
static const int ACTION_NOTHING
Nothing.
Helper/buffer for input fields.