Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
pip._vendor.rich._win32_console.LegacyWindowsTerm Class Reference

Public Member Functions

None __init__ (self, "IO[str]" file)
 
WindowsCoordinates cursor_position (self)
 
WindowsCoordinates screen_size (self)
 
None write_text (self, str text)
 
None write_styled (self, str text, Style style)
 
None move_cursor_to (self, WindowsCoordinates new_position)
 
None erase_line (self)
 
None erase_end_of_line (self)
 
None erase_start_of_line (self)
 
None move_cursor_up (self)
 
None move_cursor_down (self)
 
None move_cursor_forward (self)
 
None move_cursor_to_column (self, int column)
 
None move_cursor_backward (self)
 
None hide_cursor (self)
 
None show_cursor (self)
 
None set_title (self, str title)
 

Public Attributes

 write
 
 flush
 

Static Public Attributes

int BRIGHT_BIT = 8
 
list ANSI_TO_WINDOWS
 

Protected Member Functions

int _get_cursor_size (self)
 

Protected Attributes

 _handle
 
 _default_text
 
 _default_fore
 
 _default_back
 
 _default_attrs
 
 _file
 

Detailed Description

This class allows interaction with the legacy Windows Console API. It should only be used in the context
of environments where virtual terminal processing is not available. However, if it is used in a Windows environment,
the entire API should work.

Args:
    file (IO[str]): The file which the Windows Console API HANDLE is retrieved from, defaults to sys.stdout.

Member Function Documentation

◆ _get_cursor_size()

int pip._vendor.rich._win32_console.LegacyWindowsTerm._get_cursor_size (   self)
protected
Get the percentage of the character cell that is filled by the cursor

◆ cursor_position()

WindowsCoordinates pip._vendor.rich._win32_console.LegacyWindowsTerm.cursor_position (   self)
Returns the current position of the cursor (0-based)

Returns:
    WindowsCoordinates: The current cursor position.

◆ erase_end_of_line()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.erase_end_of_line (   self)
Erase all content from the cursor position to the end of that line

◆ erase_line()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.erase_line (   self)
Erase all content on the line the cursor is currently located at

◆ erase_start_of_line()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.erase_start_of_line (   self)
Erase all content from the cursor position to the start of that line

◆ hide_cursor()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.hide_cursor (   self)
Hide the cursor

◆ move_cursor_backward()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.move_cursor_backward (   self)
Move the cursor backward a single cell. Wrap to the previous line if required.

◆ move_cursor_down()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.move_cursor_down (   self)
Move the cursor down a single cell

◆ move_cursor_forward()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.move_cursor_forward (   self)
Move the cursor forward a single cell. Wrap to the next line if required.

◆ move_cursor_to()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.move_cursor_to (   self,
WindowsCoordinates  new_position 
)
Set the position of the cursor

Args:
    new_position (WindowsCoordinates): The WindowsCoordinates representing the new position of the cursor.

◆ move_cursor_to_column()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.move_cursor_to_column (   self,
int  column 
)
Move cursor to the column specified by the zero-based column index, staying on the same row

Args:
    column (int): The zero-based column index to move the cursor to.

◆ move_cursor_up()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.move_cursor_up (   self)
Move the cursor up a single cell

◆ screen_size()

WindowsCoordinates pip._vendor.rich._win32_console.LegacyWindowsTerm.screen_size (   self)
Returns the current size of the console screen buffer, in character columns and rows

Returns:
    WindowsCoordinates: The width and height of the screen as WindowsCoordinates.

◆ set_title()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.set_title (   self,
str  title 
)
Set the title of the terminal window

Args:
    title (str): The new title of the console window

◆ show_cursor()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.show_cursor (   self)
Show the cursor

◆ write_styled()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.write_styled (   self,
str  text,
Style  style 
)
Write styled text to the terminal.

Args:
    text (str): The text to write
    style (Style): The style of the text

◆ write_text()

None pip._vendor.rich._win32_console.LegacyWindowsTerm.write_text (   self,
str  text 
)
Write text directly to the terminal without any modification of styles

Args:
    text (str): The text to write to the console

Member Data Documentation

◆ ANSI_TO_WINDOWS

list pip._vendor.rich._win32_console.LegacyWindowsTerm.ANSI_TO_WINDOWS
static
Initial value:
= [
0, # black The Windows colours are defined in wincon.h as follows:
4, # red define FOREGROUND_BLUE 0x0001 -- 0000 0001
2, # green define FOREGROUND_GREEN 0x0002 -- 0000 0010
6, # yellow define FOREGROUND_RED 0x0004 -- 0000 0100
1, # blue define FOREGROUND_INTENSITY 0x0008 -- 0000 1000
5, # magenta define BACKGROUND_BLUE 0x0010 -- 0001 0000
3, # cyan define BACKGROUND_GREEN 0x0020 -- 0010 0000
7, # white define BACKGROUND_RED 0x0040 -- 0100 0000
8, # bright black (grey) define BACKGROUND_INTENSITY 0x0080 -- 1000 0000
12, # bright red
10, # bright green
14, # bright yellow
9, # bright blue
13, # bright magenta
11, # bright cyan
15, # bright white
]

The documentation for this class was generated from the following file: