|
OpenTTD Source 20251117-master-g7398d2e290
|
Stuff related to the text buffer GUI. More...
Go to the source code of this file.
Typedefs | |
| using | QueryStringFlags = EnumBitSet< QueryStringFlag, uint8_t > |
| typedef void | QueryCallbackProc(Window *, bool) |
| Callback procedure for the ShowQuery method. | |
Enumerations | |
| enum class | QueryStringFlag : uint8_t { AcceptUnchanged , EnableDefault , LengthIsInChars } |
| Flags used in ShowQueryString() call. More... | |
Functions | |
| void | ShowQueryString (std::string_view str, StringID caption, uint max_len, Window *parent, CharSetFilter afilter, QueryStringFlags flags) |
| Show a query popup window with a textbox in it. | |
| void | ShowQuery (EncodedString &&caption, EncodedString &&message, Window *w, QueryCallbackProc *callback, bool focus=false) |
| Show a 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. | |
| std::string | _keyboard_opt [2] |
| 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 27 of file textbuf_gui.h.
| using QueryStringFlags = EnumBitSet<QueryStringFlag, uint8_t> |
Definition at line 24 of file textbuf_gui.h.
|
strong |
Flags used in ShowQueryString() call.
Definition at line 18 of file textbuf_gui.h.
| void ShowQuery | ( | EncodedString && | caption, |
| EncodedString && | message, | ||
| Window * | parent, | ||
| QueryCallbackProc * | callback, | ||
| bool | focus | ||
| ) |
Show a 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 nullptr the parent becomes the main window WC_MAIN_WINDOW |
| callback | callback function pointer to set in the window descriptor |
| focus | whether the window should be focussed (by default false) |
Definition at line 1149 of file misc_gui.cpp.
References QueryWindow::Close(), GetMainWindow(), Window::parent, QueryWindow::proc, SetFocusedWindow(), WC_CONFIRM_POPUP_QUERY, and Window::window_class.
Referenced by CmdPause(), MakeScreenshotWithConfirm(), DepotWindow::OnClick(), GenerateLandscapeWindow::OnClick(), GenerateProgressWindow::OnClick(), VehicleGroupWindow::OnClick(), BuildIndustryWindow::OnClick(), NetworkContentListWindow::OnClick(), NewGRFWindow::OnClick(), GameOptionsWindow::OnClick(), ScenarioEditorLandscapeGenerationWindow::OnClick(), NetworkClientListWindow::OnDropdownSelect(), and SaveLoadWindow::OnTimeout().
| void ShowQueryString | ( | std::string_view | 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. |
| afilter | filters out unwanted character input |
| flags | various flags, |
Definition at line 1009 of file misc_gui.cpp.
References CloseWindowByClass(), LengthIsInChars, MAX_CHAR_LENGTH, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and WC_QUERY_STRING.
Referenced by BuildVehicleWindow::OnClick(), SelectCompanyManagerFaceWindow::OnClick(), CompanyWindow::OnClick(), DepotWindow::OnClick(), GSConfigWindow::OnClick(), GenerateLandscapeWindow::OnClick(), CreateScenarioWindow::OnClick(), IndustryViewWindow::OnClick(), NetworkGameWindow::OnClick(), NetworkStartServerWindow::OnClick(), NetworkClientListWindow::OnClick(), NewGRFInspectWindow::OnClick(), SpriteAlignerWindow::OnClick(), NewGRFParametersWindow::OnClick(), OrdersWindow::OnClick(), ScriptSettingsWindow::OnClick(), CustomCurrencyWindow::OnClick(), StationViewWindow::OnClick(), TimetableWindow::OnClick(), TownViewWindow::OnClick(), FoundTownWindow::OnClick(), VehicleViewWindow::OnClick(), WaypointWindow::OnClick(), GenerateLandscapeWindow::OnDropdownSelect(), and ToolbarScenDatePanel().
|
extern |
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.
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 33 of file textbuf_gui.h.
Referenced by GetKeyboardLayout(), and OskWindow::UpdateOskState().