![]() |
xtd - Reference Guide
0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
Represents the standard input, output, and error streams for console applications. More...
#include <basic_console.h>
Static Public Member Functions | |
static console_color | background_color () noexcept |
Gets the background color of the console. More... | |
static bool | background_color (console_color color) noexcept |
Sets the background color of the console. More... | |
static void | beep () noexcept |
Plays the sound of a beep through the console speaker. More... | |
static bool | beep (unsigned int frequency, unsigned int duration) noexcept |
Plays the sound of a beep of a specified frequency and duration through the console speaker. More... | |
static int | buffer_height () noexcept |
Gets the height of the buffer area. More... | |
static bool | buffer_height (int height) noexcept |
Gets or sets the height of the buffer area. More... | |
static int | buffer_width () noexcept |
Gets the width of the buffer area. More... | |
static bool | buffer_width (int width) noexcept |
Sets the width of the buffer area. More... | |
static bool | caps_lock () noexcept |
Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off. More... | |
static bool | clear () noexcept |
Clears the console buffer and corresponding console window of display information. More... | |
static int | cursor_left () noexcept |
Gets the column position of the cursor within the buffer area. More... | |
static bool | cursor_left (int left) noexcept |
Sets the column position of the cursor within the buffer area. More... | |
static int | cursor_size () noexcept |
Gets or sets the height of the cursor within a character cell. More... | |
static void | cursor_size (int size) noexcept |
Sets the height of the cursor within a character cell. More... | |
static int | cursor_top () noexcept |
Gets the row position of the cursor within the buffer area. More... | |
static bool | cursor_top (int top) noexcept |
Sets the row position of the cursor within the buffer area. More... | |
static bool | cursor_visible () noexcept |
Gets a value indicating whether the cursor is visible. More... | |
static void | cursor_visible (bool visible) noexcept |
Sets a value indicating whether the cursor is visible. More... | |
static console_color | foreground_color () noexcept |
Gets the foreground color of the console. More... | |
static bool | foreground_color (console_color color) noexcept |
Sets the foreground color of the console. More... | |
static int | input_code_page () noexcept |
Gets the code page the console uses to read input. More... | |
static bool | input_code_page (int code_page) noexcept |
Sets the code page the console uses to read input. More... | |
static bool | is_error_redireted () noexcept |
Gets a value that indicates whether the error output stream has been redirected from the standard error stream. More... | |
static bool | is_in_redireted () noexcept |
Gets a value that indicates whether the input stream has been redirected from the standard input stream. More... | |
static bool | is_out_redireted () noexcept |
Gets a value that indicates whether the output stream has been redirected from the standard output stream. More... | |
static bool | key_available () noexcept |
Gets a value indicating whether a key press is available in the input stream. More... | |
static int | largest_window_height () noexcept |
Gets the largest possible number of console window rows, based on the current font and screen resolution. More... | |
static int | largest_window_width () noexcept |
Gets the largest possible number of console window columns, based on the current font and screen resolution. More... | |
static bool | number_lock () noexcept |
Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off. More... | |
static std::basic_ostream< char_t > | open_standard_error () noexcept |
Acquires the standard error stream. More... | |
static std::basic_istream< char_t > | open_standard_input () noexcept |
Acquires the standard input stream. More... | |
static std::basic_ostream< char_t > | open_standard_output () noexcept |
Acquires the standard output stream. More... | |
static int | output_code_page () noexcept |
Gets the code page the console uses to write output. More... | |
static bool | output_code_page (int code_page) noexcept |
Sets the code page the console uses to write output. More... | |
static console_key_info | read_key () |
Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window. More... | |
static console_key_info | read_key (bool intercept) |
Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window. More... | |
static std::basic_string< char_t > | read_line () noexcept |
static bool | reset_color () noexcept |
static bool | set_cursor_position (int left, int top) noexcept |
static void | set_error (const std::ostream &os) noexcept |
static void | set_in (const std::istream &is) noexcept |
static void | set_out (const std::ostream &os) noexcept |
static std::string | title () noexcept |
static bool | title (const std::string &title) noexcept |
static bool | treat_control_c_as_input () noexcept |
static void | treat_control_c_as_input (bool treat_control_c_as_input) noexcept |
static int | window_height () noexcept |
static int | window_left () noexcept |
static int | window_top () noexcept |
static int | window_width () noexcept |
template<typename arg_t > | |
static void | write (arg_t &&arg) noexcept |
template<typename ... args_t> | |
static void | write (const std::basic_string< char_t > &fmt, args_t &&... args) noexcept |
static void | write_line () noexcept |
template<typename arg_t > | |
static void | write_line (arg_t &&arg) noexcept |
template<typename ... args_t> | |
static void | write_line (const std::basic_string< char_t > &fmt, args_t &&... args) noexcept |
Static Public Attributes | |
static event< basic_console< char_t >, console_cancel_event_handler > | cancel_key_press |
Occurs when the Control modifier key (Ctrl) and either the ConsoleKey.C console key (C) or the Break key are pressed simultaneously (Ctrl+C or Ctrl+Break). More... | |
static std::basic_ostream< char_t > | error |
Gets the error output stream. A std::basic_ostream<char_t> that represents the error output stream. More... | |
static std::basic_istream< char_t > | in |
Gets the standard input stream. A std::basic_istream<char_t> that represents the standard input stream. More... | |
static std::basic_ostream< char_t > | out |
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output stream. More... | |
Represents the standard input, output, and error streams for console applications.