49 static std::istream
in;
54 static std::ostream
out;
211 return rgb {
r,
g,
b};
488 template<typename string_t>
490 template<
typename string_t>
518 static auto set_in(
const std::istream&
is) -> void;
523 static auto set_out(
const std::ostream& os) -> void;
544 template<
typename arg_t>
548 template<
typename type_t>
556 template<
typename ...args_t>
563 template<
typename arg_t>
567 template<
typename type_t>
576 template<
typename ...args_t>
585 template<
typename arg_t>
589 template<
typename type_t>
597 template<
typename ...args_t>
604 template<
typename arg_t>
608 template<
typename type_t>
617 template<
typename ...args_t>
622 static auto __internal_rstc__() -> void;
627 [[nodiscard]]
static auto argb_from_uint32(
xtd::uint32 value)
noexcept -> std::tuple<xtd::byte, xtd::byte, xtd::byte, xtd::byte> {
return std::make_tuple(
static_cast<xtd::byte>(255),
static_cast<xtd::byte>((value & 0x00FF0000) >> 16),
static_cast<xtd::byte>((value & 0x0000FF00) >> 8),
static_cast<xtd::byte>(value & 0x000000FF));}
628 [[nodiscard]]
static auto on_cancel_key_press(
int32 special_key) -> bool;
629 static auto register_cancel_key_press() -> void;
631 static auto write_(
const string& value) -> void;
632 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:38
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:391
static std::ostream error
Gets the error output stream. A std::basic_ostream<char_t> that represents the error output stream.
Definition console.hpp:44
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 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 write(const xtd::globalization::culture_info &culture, arg_t &&value) -> void
Writes the text representation of the specified value to the standard output stream.
Definition console.hpp:564
static auto title() -> xtd::string
Gets the title to display in the console title bar.
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 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 foreground_color_rgb()
Gets the foreground color of the console.
Definition console.hpp:204
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 is_ansi_escape_sequence_supported() noexcept -> bool
Gets a value indicating whether a ANSI escape sequence is supported.
static auto background_color(xtd::uint32 color) -> void
Sets the background color of the console.
static auto open_standard_output() -> std::ostream
Acquires the standard output stream.
static auto foreground_color_uint32() -> xtd::uint32
Gets the foreground color of the console.
static auto background_color_uint32() -> xtd::uint32
Gets the background color of the console.
static std::istream in
Gets the standard input stream. A std::basic_istream<char_t> that represents the standard input strea...
Definition console.hpp:49
static auto foreground_color(xtd::uint32 color) -> void
Sets the foreground color of the console.
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:54
static auto open_standard_input() -> std::istream
Acquires the standard input stream.
static auto write_line(const xtd::globalization::culture_info &culture, arg_t &&value) -> void
Writes the text representation of the specified value, followed by the current line terminator,...
Definition console.hpp:605
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:586
static auto write(const xtd::globalization::culture_info &culture, 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:577
static auto cursor_visible() -> bool
Gets a value indicating whether the cursor is visible.
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:598
static auto set_in(const std::istream &is) -> void
Sets the int property to the specified std::istream object.
static auto background_color_rgb()
Gets the background color of the console.
Definition console.hpp:76
static auto background_color(xtd::byte r, xtd::byte g, xtd::byte b) -> void
Sets the background color of the console.
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:545
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 foreground_color(xtd::byte r, xtd::byte g, xtd::byte b) -> void
Sets the foreground color of the console.
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 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 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:557
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 reset_terminal_mode() -> void
Resets terminale mode to default.
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 write_line(const xtd::globalization::culture_info &culture, 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:618
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:71
Represents an event.
Definition event.hpp:23
Provides information about a specific culture (called a locale for unmanaged code development)....
Definition culture_info.hpp:42
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::globalization::culture_info class.
auto() -> void
Signals a breakpoint to an attached debugger.
Definition debugger.hpp:75
Contains xtd::event event.
xtd::delegate< void(console_cancel_event_args &e)> console_cancel_event_handler
Represents the method that will handle the cancel_key_press event of a xtd::console.
Definition console_cancel_event_handler.hpp:24
#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
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.hpp:23
auto is(xtd::any value) -> bool
Checks if the result of an expression is compatible with a given type.
Definition is.hpp:485
console_color
Specifies constants that define foreground and background colors for the console.
Definition console_color.hpp:20
@ r
The R key.
Definition console_key.hpp:122
@ b
The B key.
Definition console_key.hpp:90
@ g
The G key.
Definition console_key.hpp:100
Contains xtd::collections::generic::key_value_pair <key_t, value_t> struct.
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:14
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto size() const noexcept -> size_type
Returns the number of elements.
Definition read_only_span.hpp:213
Contains xtd::static_object class.
Contains xtd::io::stream_writer class.
Contains xtd::string alias.
Contains xtd fundamental types.