47 static std::istream
in;
52 static std::ostream
out;
453 static auto set_in(
const std::istream&
is) -> void;
458 static auto set_out(
const std::ostream& os) -> void;
479 template<
typename arg_t>
483 template<
typename type_t>
491 template<
typename ...args_t>
500 template<
typename arg_t>
504 template<
typename type_t>
512 template<
typename ...args_t>
517 static auto __internal_rstc__() -> void;
522 [[nodiscard]]
static auto on_cancel_key_press(
int32 special_key) -> bool;
523 static auto register_cancel_key_press() -> void;
525 static auto write_(
const string& value) -> void;
526 static auto write_line_(
const string& value) -> void;
Specifies the standard keys on a console.
Definition console_key_info.hpp:24
Represents the standard input, output, and error streams for console applications.
Definition console.hpp:36
static auto set_out(const std::ostream &os) -> void
Sets the out property to the specified std::ostream object.
static event< console, 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 ...
Definition console.hpp:335
static auto treat_control_c_as_input(bool treat_control_c_as_input) -> void
Sets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C...
static std::ostream error
Gets the error output stream. A std::basic_ostream<char_t> that represents the error output stream.
Definition console.hpp:42
static auto beep(uint32 frequency, uint32 duration) -> void
Plays the sound of a beep of a specified frequency and duration through the console speaker.
static auto cursor_left(int32 left) -> void
Sets the column position of the cursor within the buffer area.
static auto is_input_redirected() -> bool
Gets a value that indicates whether the input stream has been redirected from the standard input stre...
static auto background_color(console_color color) -> void
Sets the background color of the console.
static auto window_width(int32 width) -> void
Sets the width of the console window area.
static auto cursor_top(int32 top) -> void
Sets the row position of the cursor within the buffer area.
static auto set_window_position(int32 left, int32 top) -> void
Sets the position of the console window relative to the screen buffer.
static auto output_code_page(int32 code_page) -> void
Sets the code page the console uses to write output.
static auto title() -> xtd::string
Gets the title to display in the console title bar.
static auto read_key(const string &text, bool intercept) -> console_key_info
Obtains the next character or function key pressed by the user. The pressed key is optionally display...
static auto input_code_page() -> int32
Gets the code page the console uses to read input.
static auto foreground_color() -> console_color
Gets the foreground color of the console.
static auto foreground_color(console_color color) -> bool
Sets the foreground color of the console.
static auto caps_lock() -> bool
Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off.
static auto get_cursor_position() -> xtd::collections::generic::key_value_pair< int32, int32 >
Gets the position of the cursor.
static auto buffer_height() -> int32
Gets the height of the buffer area.
static auto cursor_size() -> int32
Gets or sets the height of the cursor within a character cell.
static auto read_line(const string &text, bool intercept) -> xtd::string
Reads the next line of characters from the standard input stream with specified invit text.
static auto read_line(const string &text) -> xtd::string
Reads the next line of characters from the standard input stream with specified invit text.
static auto largest_window_height() -> int32
Gets the largest possible number of console window rows, based on the current font and screen resolut...
static auto window_left() -> int32
Gets the left of the console window area.
static auto buffer_width(int32 width) -> void
Sets the width of the buffer area.
static auto input_code_page(int32 code_page) -> void
Sets the code page the console uses to read input.
static auto window_top(int32 top) -> void
Sets the top of the console window area.
static auto open_standard_output() -> std::ostream
Acquires the standard output stream.
static std::istream in
Gets the standard input stream. A std::basic_istream<char_t> that represents the standard input strea...
Definition console.hpp:47
static auto read_line(bool intercept) -> xtd::string
Reads the next line of characters from the standard input stream.
static auto read_line() -> xtd::string
Reads the next line of characters from the standard input stream.
static auto window_top() -> int32
Gets the top of the console window area.
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.hpp:52
static auto read_key(bool intercept) -> console_key_info
Obtains the next character or function key pressed by the user. The pressed key is optionally display...
static auto open_standard_input() -> std::istream
Acquires the standard input stream.
static auto largest_window_width() -> int32
Gets the largest possible number of console window columns, based on the current font and screen reso...
static auto write_line(arg_t &&value) -> void
Writes the text representation of the specified value, followed by the current line terminator,...
Definition console.hpp:501
static auto cursor_visible() -> bool
Gets a value indicating whether the cursor is visible.
static auto window_left(int32 left) -> void
Sets the left of the console window area.
static auto write_line(const xtd::string &fmt, args_t &&... values) -> void
Writes the text representation of the specified list of values, followed by the current line terminat...
Definition console.hpp:513
static auto set_in(const std::istream &is) -> void
Sets the int property to the specified std::istream object.
static auto is_error_redirected() -> bool
Gets a value that indicates whether the error output stream has been redirected from the standard err...
static auto window_height() -> int32
Gets the height of the console window area.
static auto open_standard_error() -> std::ostream
Acquires the standard error stream.
static auto set_cursor_position(int32 left, int32 top) -> void
Sets the position of the cursor.
static auto is_output_redirected() -> bool
Gets a value that indicates whether the output stream has been redirected from the standard output st...
static auto key_available() -> bool
Gets a value indicating whether a key press is available in the input stream.
static auto write(arg_t &&value) -> void
Writes the text representation of the specified value to the standard output stream.
Definition console.hpp:480
static auto auto_flush_out(bool value) -> void
Sets a value indicating whether the xtd::console::out will flush its buffer to the underlying stream ...
static auto output_code_page() -> int32
Gets the code page the console uses to write output.
static auto buffer_height(int32 height) -> void
Sets or sets the height of the buffer area.
static auto read() -> int32
Reads the next character from the standard input stream.
static auto background_color() -> console_color
Gets the background color of the console.
static auto cursor_top() -> int32
Gets the row position of the cursor within the buffer area.
static auto reset_color() -> bool
Sets the foreground and background console colors to their defaults.
static auto auto_flush_out() -> bool
Gets a value indicating whether the xtd::console::out will flush its buffer to the underlying stream ...
static auto cursor_left() -> int32
Gets the column position of the cursor within the buffer area.
static auto clear() -> void
Clears the console buffer and corresponding console window of display information.
static auto title(const xtd::string &title) -> void
Sets the title to display in the console title bar.
static auto set_window_size(int32 width, int32 height) -> void
Sets the height and width of the console window to the specified values.
static auto read_key() -> console_key_info
Obtains the next character or function key pressed by the user. The pressed key is displayed in the c...
static auto read_key(const string &text) -> console_key_info
Obtains the next character or function key pressed by the user. The pressed key is displayed in the c...
static auto write(const xtd::string &fmt, args_t &&... values) -> void
Writes the text representation of the specified list of values to the standard output stream using th...
Definition console.hpp:492
static auto window_height(int32 height) -> void
Sets the height of the console window area.
static auto write_line() -> void
Writes the current line terminator to the standard output stream using the specified format informati...
static auto treat_control_c_as_input() -> bool
Gets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C...
static auto cursor_size(int32 size) -> void
Sets the height of the cursor within a character cell.
static auto window_width() -> int32
Gets the width of the console window area.
static auto cursor_visible(bool visible) -> void
Sets a value indicating whether the cursor is visible.
static auto beep() -> void
Plays the sound of a beep through the console speaker.
static auto number_lock() -> bool
Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off.
static auto buffer_width() -> int32
Gets the width of the buffer area.
static auto set_error(const std::ostream &os) -> void
Sets the error property to the specified std::ostream object.
The environment class.
Definition environment.hpp:68
Represents an event.
Definition event.hpp:21
Contains xtd::console_cancel_event_handler event handler.
Contains xtd::console_color enum class.
Contains xtd::console_key_info class.
Contains xtd::console_special_key enum class.
Contains xtd::event event.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
bool is(xtd::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:484
console_color
Specifies constants that define foreground and background colors for the console.
Definition console_color.hpp:20
Contains xtd::collections::generic::key_value_pair <key_t, value_t> struct.
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::static_object class.
Contains xtd::io::stream_writer class.
Contains xtd::string alias.
Defines a key/value pair that can be set or retrieved.
Definition key_value_pair.hpp:37
Contains xtd fundamental types.