37 static std::istream
in;
42 static std::ostream
out;
265 static void beep(uint32_t frequency, uint32_t duration);
325 static void set_error(
const std::ostream& os);
330 static void set_in(
const std::istream&
is);
335 static void set_out(
const std::ostream& os);
355 template<
typename arg_t>
359 template<
typename type_t>
366 template<
typename ... args_t>
375 template<
typename arg_t>
379 template<
typename type_t>
386 template<
typename ... args_t>
404 static void write_(
const ustring& value);
405 static void write_line_(
const ustring& value);
Contains xtd::static_object class.
Represents the standard input, output, and error streams for console applications.
Definition: console.h:26
static void set_window_size(int32_t width, int32_t height)
Sets the height and width of the console window to the specified values.
Contains xtd fundamental types.
static void set_cursor_position(int32_t left, int32_t top)
Sets the position of the cursor.
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Contains xtd::console_color enum class.
static bool reset_color()
Sets the foreground and background console colors to their defaults.
static bool is_out_redirected()
Gets a value that indicates whether the output stream has been redirected from the standard output st...
static bool treat_control_c_as_input()
Gets a value indicating whether the combination of the Control modifier key and C console key (Ctrl+C...
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition: static.h:38
static int32_t input_code_page()
Gets the code page the console uses to read input.
static int32_t cursor_size()
Gets or sets the height of the cursor within a character cell.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
static std::ostream open_standard_error()
Acquires the standard error stream.
static int32_t buffer_width()
Gets the width of the buffer area.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:50
static void write(const xtd::ustring &fmt, args_t &&... values)
Writes the text representation of the specified list of values to the standard output stream using th...
Definition: console.h:367
static void set_window_position(int32_t left, int32_t top)
Sets the position of the console window relative to the screen buffer.
static std::pair< int32_t, int32_t > get_cursor_position()
Gets the position of the cursor.
static int32_t output_code_page()
Gets the code page the console uses to write output.
Contains xtd::console_key_info class.
int32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
static void write_line(arg_t &&value)
Writes the text representation of the specified value, followed by the current line terminator...
Definition: console.h:376
static void clear()
Clears the console buffer and corresponding console window of display information.
static int32_t cursor_left()
Gets the column position of the cursor within the buffer area.
static std::ostream error
Gets the error output stream. A std::basic_ostream<char_t> that represents the error output stream...
Definition: console.h:32
Contains xtd::console_special_key enum class.
static std::istream in
Gets the standard input stream. A std::basic_istream<char_t> that represents the standard input strea...
Definition: console.h:37
static int32_t largest_window_width()
Gets the largest possible number of console window columns, based on the current font and screen reso...
static int32_t window_top()
Gets the top of the console window area.
console_color
Specifies constants that define foreground and background colors for the console. ...
Definition: console_color.h:17
Represents an event.
Definition: event.h:21
static void write_line(const xtd::ustring &fmt, args_t &&... values)
Writes the text representation of the specified list of values, followed by the current line terminat...
Definition: console.h:387
Provides data for the console::cancel_key_press event. This class cannot be inherited.
Definition: console_cancel_event_args.h:18
static void write(arg_t &&value)
Writes the text representation of the specified value to the standard output stream.
Definition: console.h:356
Specifies the standard keys on a console.
Definition: console_key_info.h:20
static xtd::ustring read_line()
Reads the next line of characters from the standard input stream.
Contains xtd::ustring class.
static console_key_info read_key()
Obtains the next character or function key pressed by the user. The pressed key is displayed in the c...
static void set_in(const std::istream &is)
Sets the int property to the specified std::istream object.
static int32_t window_height()
Gets the height of the console window area.
static void beep()
Plays the sound of a beep through the console speaker.
static bool caps_lock()
Gets a value indicating whether the CAPS LOCK keyboard toggle is turned on or turned off...
static int32_t largest_window_height()
Gets the largest possible number of console window rows, based on the current font and screen resolut...
static std::istream open_standard_input()
Acquires the standard input stream.
static console_color background_color()
Gets the background color of the console.
static std::ostream open_standard_output()
Acquires the standard output stream.
Contains xtd::event event.
static bool is_in_redirected()
Gets a value that indicates whether the input stream has been redirected from the standard input stre...
static bool key_available()
Gets a value indicating whether a key press is available in the input stream.
static xtd::ustring title()
Gets the title to display in the console title bar.
static int32_t window_width()
Gets the width of the console window area.
static bool is_error_redirected()
Gets a value that indicates whether the error output stream has been redirected from the standard err...
static bool cursor_visible()
Gets a value indicating whether the cursor is visible.
static console_color foreground_color()
Gets the foreground color of the console.
static void set_out(const std::ostream &os)
Sets the out property to the specified std::ostream object.
Contains xtd::console_cancel_event_handler event handler.
static int32_t cursor_top()
Gets the row position of the cursor within the buffer area.
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.h:397
static bool number_lock()
Gets a value indicating whether the NUM LOCK keyboard toggle is turned on or turned off...
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition: console.h:42
static int32_t buffer_height()
Gets the height of the buffer area.
static void set_error(const std::ostream &os)
Sets the error property to the specified std::ostream object.
bool is(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition: is.h:305
static int32_t window_left()
Gets the left of the console window area.