OpenTTD
|
Stuff related to the text buffer GUI. More...
Go to the source code of this file.
Typedefs | |
typedef void | QueryCallbackProc (Window *, bool) |
Callback procedure for the ShowQuery method. |
Enumerations | |
enum | QueryStringFlags { QSF_NONE = 0, QSF_ACCEPT_UNCHANGED = 0x01, QSF_ENABLE_DEFAULT = 0x02, QSF_LEN_IN_CHARS = 0x04 } |
Flags used in ShowQueryString() call. More... |
Functions | |
void | ShowQueryString (StringID str, StringID caption, uint max_len, Window *parent, CharSetFilter afilter, QueryStringFlags flags) |
Show a query popup window with a textbox in it. | |
void | ShowQuery (StringID caption, StringID message, Window *w, QueryCallbackProc *callback) |
Show a modal confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre of its parent. |
Variables | |
static const uint | OSK_KEYBOARD_ENTRIES = 50 |
The number of 'characters' on the on-screen keyboard. | |
char | _keyboard_opt [2][OSK_KEYBOARD_ENTRIES *4+1] |
The number of characters has to be OSK_KEYBOARD_ENTRIES. |
Stuff related to the text buffer GUI.
Definition in file textbuf_gui.h.
typedef void QueryCallbackProc(Window *, bool) |
Callback procedure for the ShowQuery method.
Definition at line 30 of file textbuf_gui.h.
enum QueryStringFlags |
Flags used in ShowQueryString() call.
Definition at line 20 of file textbuf_gui.h.
void ShowQuery | ( | StringID | caption, |
StringID | message, | ||
Window * | parent, | ||
QueryCallbackProc * | callback | ||
) |
Show a modal confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre of its parent.
caption | string shown as window caption |
message | string that will be shown for the window |
parent | pointer to parent window, if this pointer is NULL the parent becomes the main window WC_MAIN_WINDOW |
callback | callback function pointer to set in the window descriptor |
Definition at line 1194 of file misc_gui.cpp.
References FindWindowById(), Window::parent, QueryWindow::proc, WC_CONFIRM_POPUP_QUERY, WC_MAIN_WINDOW, and Window::window_class.
Referenced by CmdPause(), MenuClickLargeWorldScreenshot(), GenerateLandscapeWindow::OnClick(), ScenarioEditorLandscapeGenerationWindow::OnClick(), VehicleGroupWindow::OnClick(), DepotWindow::OnClick(), NewGRFWindow::OnClick(), and GenerateProgressWindow::OnClick().
void ShowQueryString | ( | StringID | str, |
StringID | caption, | ||
uint | maxsize, | ||
Window * | parent, | ||
CharSetFilter | afilter, | ||
QueryStringFlags | flags | ||
) |
Show a query popup window with a textbox in it.
str | StringID for the text shown in the textbox |
caption | StringID of text shown in caption of querywindow |
maxsize | maximum size in bytes or characters (including terminating '\0') depending on flags |
parent | pointer to a Window that will handle the events (ok/cancel) of this window. If NULL, results are handled by global function HandleOnEditText |
afilter | filters out unwanted character input |
flags | various flags, |
Definition at line 1054 of file misc_gui.cpp.
References DeleteWindowByClass(), MAX_CHAR_LENGTH, QSF_LEN_IN_CHARS, and WC_QUERY_STRING.
Referenced by WaypointWindow::OnClick(), NewGRFParametersWindow::OnClick(), CheatWindow::OnClick(), TownViewWindow::OnClick(), AISettingsWindow::OnClick(), TimetableWindow::OnClick(), GenerateLandscapeWindow::OnClick(), NetworkGameWindow::OnClick(), DepotWindow::OnClick(), IndustryViewWindow::OnClick(), SpriteAlignerWindow::OnClick(), CreateScenarioWindow::OnClick(), NetworkStartServerWindow::OnClick(), OrdersWindow::OnClick(), BuildVehicleWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), StationViewWindow::OnClick(), GameSettingsWindow::OnClick(), VehicleDetailsWindow::OnClick(), CompanyWindow::OnClick(), CustomCurrencyWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), and ToolbarScenDatePanel().
char _keyboard_opt[2][OSK_KEYBOARD_ENTRIES *4+1] |
The number of characters has to be OSK_KEYBOARD_ENTRIES.
However, these have to be UTF-8 encoded, which means up to 4 bytes per character. Furthermore the string needs to be '\0'-terminated.
Definition at line 28 of file osk_gui.cpp.
Referenced by GetKeyboardLayout().
|
static |
The number of 'characters' on the on-screen keyboard.
Definition at line 36 of file textbuf_gui.h.
Referenced by GetKeyboardLayout(), and OskWindow::UpdateOskState().