Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PSHostRawUserInterface Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Defines the low-level host functionality, such as read and write actions, that a host application can implement to support cmdlets that perform character-mode interaction with the user.

Namespace:   System.Management.Automation.Host
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

System.Object
  System.Management.Automation.Host.PSHostRawUserInterface

Public MustInherit Class PSHostRawUserInterface

NameDescription
System_CAPS_protmethodPSHostRawUserInterface()

Initializes a new instance of the PSHostRawUserInterface class. Derived classes typically call this constructor (directly or implicitly) from their own constructors.

NameDescription
System_CAPS_pubpropertyBackgroundColor

Gets or sets the background color of the displayed text.

System_CAPS_pubpropertyBufferSize

Gets or sets the current size of the screen buffer.

System_CAPS_pubpropertyCursorPosition

Gets or sets the cursor position in the screen buffer.

System_CAPS_pubpropertyCursorSize

Gets or sets the cursor size as a percentage of a buffer cell.

System_CAPS_pubpropertyForegroundColor

Gets or sets the foreground color of the displayed text.

System_CAPS_pubpropertyKeyAvailable

Gets a value that indicates whether the user has pressed a key.

System_CAPS_pubpropertyMaxPhysicalWindowSize

Gets the dimensions of the largest window that could be rendered in the current display, if the buffer was at the least that large.

System_CAPS_pubpropertyMaxWindowSize

Gets the size of the largest window possible for the current buffer, current font, and current display hardware.

System_CAPS_pubpropertyWindowPosition

Gets or sets the position, in characters, of the view window relative to the screen buffer.

System_CAPS_pubpropertyWindowSize

Gets or sets the current size of the view window.

System_CAPS_pubpropertyWindowTitle

Gets or sets the title bar text of the current view window.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodFlushInputBuffer()

When overridden in a derived class, flushes the input buffer. All input currently in the buffer is discarded.

System_CAPS_pubmethodGetBufferContents(Rectangle)

When overridden in a derived class, retrieves a rectangular region of the screen buffer.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodLengthInBufferCells(Char)

Determines the number of buffer cells occupied by a character.

System_CAPS_pubmethodLengthInBufferCells(String)

Determines the number of buffer cells occupied by a string.

System_CAPS_pubmethodLengthInBufferCells(String, Int32)

Determines the number of buffer cells occupied by a portion of a specified string. This method is introduced in Windows PowerShell 2.0.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodNewBufferCellArray(Int32, Int32, BufferCell)

Creates a two-dimensional array of buffer cells based on a specified width, height, and the character used to fill the array.

System_CAPS_pubmethodNewBufferCellArray(Size, BufferCell)

Creates a two-dimensional array of buffer cells based on array size and the character used to fill the array.

System_CAPS_pubmethodNewBufferCellArray(String(), ConsoleColor, ConsoleColor)

Creates a two-dimensional array of buffer cells based on a set of supplied characters.

System_CAPS_pubmethodReadKey()

Reads a pressed and released keystroke from the keyboard device, blocking processing until a keystroke is typed.

System_CAPS_pubmethodReadKey(ReadKeyOptions)

When overridden in a derived class, reads a pressed, released, or pressed and released keystroke from the keyboard device, blocking processing until a keystroke is typed that matches the specified keystroke options.

System_CAPS_pubmethodScrollBufferContents(Rectangle, Coordinates, Rectangle, BufferCell)

When overridden in a derived class, crops a region of the screen buffer.

System_CAPS_pubmethodSetBufferContents(Coordinates, BufferCell(,))

When overridden in a derived class, copies an array of buffer cells into the screen buffer at a specified location.

System_CAPS_pubmethodSetBufferContents(Rectangle, BufferCell)

When overridden in a derived class, copies a given character, foreground color, and background color to a region of the screen buffer.

System_CAPS_pubmethodToString()

(Inherited from Object.)

The user interface model is based on a two-dimensional grid of cells referred to as the screen buffer. This buffer, in turn, includes a visible rectangular region called a window. Looking at this buffer in greater detail, each cell of the grid has a character, foreground color, and background color associated with it. When the buffer has input focus, it shows a cursor positioned in one cell.

Keystrokes can be read from the buffer and optionally echoed at the current cursor position.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: