|
OpenTTD Source 20260218-master-g2123fca5ea
|
Internally used functions for the console. More...
#include "gfx_type.h"Go to the source code of this file.
Data Structures | |
| struct | IConsoleCmd |
| –Commands– Commands are commands, or functions. More... | |
| struct | IConsoleAlias |
| –Aliases– Aliases are like shortcuts for complex functions, variable assignments, etc. More... | |
| struct | IConsole |
Typedefs | |
| using | IConsoleCmdProc = bool(std::span<std::string_view> argv) |
| Entrypoint of a console command. | |
| using | IConsoleHook = ConsoleHookResult(bool echo) |
| Checks whether the command may be executed. | |
Enumerations | |
| enum | ConsoleHookResult : uint8_t { CHR_ALLOW , CHR_DISALLOW , CHR_HIDE } |
| Return values of console hooks (IConsoleHook). More... | |
Functions | |
| void | IConsoleClearBuffer () |
| void | IConsoleStdLibRegister () |
| void | IConsoleGUIInit () |
| void | IConsoleGUIFree () |
| void | IConsoleGUIPrint (TextColour colour_code, const std::string &string) |
| Handle the printing of text entered into the console or redirected there by any other means. | |
Variables | |
| static const uint | ICON_CMDLN_SIZE = 1024 |
| maximum length of a typed in command | |
Internally used functions for the console.
Definition in file console_internal.h.
| using IConsoleCmdProc = bool(std::span<std::string_view> argv) |
Entrypoint of a console command.
| argv | The arguments to the command. |
true iff the command is handled correctly, i.e. false to show a help message. Definition at line 29 of file console_internal.h.
| using IConsoleHook = ConsoleHookResult(bool echo) |
Checks whether the command may be executed.
| echo | Whether to print an error message or not. |
Definition at line 36 of file console_internal.h.
| enum ConsoleHookResult : uint8_t |
Return values of console hooks (IConsoleHook).
| Enumerator | |
|---|---|
| CHR_ALLOW | Allow command execution. |
| CHR_DISALLOW | Disallow command execution. |
| CHR_HIDE | Hide the existence of the command. |
Definition at line 18 of file console_internal.h.
| void IConsoleClearBuffer | ( | ) |
Definition at line 397 of file console_gui.cpp.
| void IConsoleGUIFree | ( | ) |
Definition at line 402 of file console_gui.cpp.
| void IConsoleGUIInit | ( | ) |
Definition at line 383 of file console_gui.cpp.
| void IConsoleGUIPrint | ( | TextColour | colour_code, |
| const std::string & | str ) |
Handle the printing of text entered into the console or redirected there by any other means.
Text can be redirected to other clients in a network game as well as to a logfile. If the network server is a dedicated server, all activities are also logged. All lines to print are added to a temporary buffer which can be used as a history to print them onscreen
| colour_code | the colour of the command. Red in case of errors, etc. |
| str | the message entered or output on the console (notice, error, etc.) |
Definition at line 501 of file console_gui.cpp.
References _iconsole_buffer, SetWindowDirty(), and WC_CONSOLE.
Referenced by IConsolePrint().
| void IConsoleStdLibRegister | ( | ) |
Definition at line 2964 of file console_cmds.cpp.
|
static |
maximum length of a typed in command
Definition at line 15 of file console_internal.h.
Referenced by ConExec().