C# Class SadConsole.Consoles.Cursor

Show file Open project: Thraka/SadConsole Class Usage Examples

Private Properties

Property Type Description
Constructor void
Cursor System
PrintGlyph void

Public Methods

Method Description
AttachConsole ( SurfaceEditor console ) : void

Sets the console this cursor is targetting.

CarriageReturn ( ) : Cursor

Returns the cursor to the start of the current line.

Cursor ( ITextSurface surface ) : System
Cursor ( SurfaceEditor console ) : System

Creates a new instance of the cursor class that will work with the specified console.

Down ( int amount ) : Cursor

Moves the cusor down by the specified amount of lines.

Left ( int amount ) : Cursor

Moves the cusor left by the specified amount of columns.

LeftWrap ( int amount ) : Cursor

Moves the cusor left by the specified amount of columns, wrapping the cursor if needed.

LineFeed ( ) : Cursor

Moves the cursor down a line.

NewLine ( ) : Cursor

Calls the M:CarriageReturn() and M:LineFeed() methods in a single call.

Print ( ColoredString text ) : Cursor

Prints text to the console using the appearance of the colored string.

Print ( string text ) : Cursor

Prints text to the console using the default print appearance.

Print ( string text, ICellAppearance template, ICellEffect templateEffect ) : Cursor

Prints text on the console.

Render ( SpriteBatch batch, Font font, Rectangle renderArea ) : void
ResetAppearanceToConsole ( ) : Cursor

Resets the cursor appearance to the console's default foreground and background.

ResetCursorEffect ( ) : void

Resets the CursorRenderCell back to the default.

Right ( int amount ) : Cursor

Moves the cusor right by the specified amount of columns.

RightWrap ( int amount ) : Cursor

Moves the cusor right by the specified amount of columns, wrapping the cursor if needed.

Up ( int amount ) : Cursor

Moves the cusor up by the specified amount of lines.

Private Methods

Method Description
Constructor ( ) : void
Cursor ( ) : System
PrintGlyph ( ColoredGlyph glyph, ColoredString settings ) : void

Method Details

AttachConsole() public method

Sets the console this cursor is targetting.
public AttachConsole ( SurfaceEditor console ) : void
console SurfaceEditor The console the cursor works with.
return void

CarriageReturn() public method

Returns the cursor to the start of the current line.
public CarriageReturn ( ) : Cursor
return Cursor

Cursor() public method

public Cursor ( ITextSurface surface ) : System
surface ITextSurface
return System

Cursor() public method

Creates a new instance of the cursor class that will work with the specified console.
public Cursor ( SurfaceEditor console ) : System
console SurfaceEditor The console this cursor will print on.
return System

Down() public method

Moves the cusor down by the specified amount of lines.
public Down ( int amount ) : Cursor
amount int The amount of lines to move the cursor
return Cursor

Left() public method

Moves the cusor left by the specified amount of columns.
public Left ( int amount ) : Cursor
amount int The amount of columns to move the cursor
return Cursor

LeftWrap() public method

Moves the cusor left by the specified amount of columns, wrapping the cursor if needed.
public LeftWrap ( int amount ) : Cursor
amount int The amount of columns to move the cursor
return Cursor

LineFeed() public method

Moves the cursor down a line.
public LineFeed ( ) : Cursor
return Cursor

NewLine() public method

Calls the M:CarriageReturn() and M:LineFeed() methods in a single call.
public NewLine ( ) : Cursor
return Cursor

Print() public method

Prints text to the console using the appearance of the colored string.
public Print ( ColoredString text ) : Cursor
text ColoredString The text to print.
return Cursor

Print() public method

Prints text to the console using the default print appearance.
public Print ( string text ) : Cursor
text string The text to print.
return Cursor

Print() public method

Prints text on the console.
public Print ( string text, ICellAppearance template, ICellEffect templateEffect ) : Cursor
text string The text to print.
template ICellAppearance The way the text will look when it is printed.
templateEffect ICellEffect Effect to apply to the text as its printed.
return Cursor

Render() public method

public Render ( SpriteBatch batch, Font font, Rectangle renderArea ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
font Font
renderArea Microsoft.Xna.Framework.Rectangle
return void

ResetAppearanceToConsole() public method

Resets the cursor appearance to the console's default foreground and background.
Thrown when the backing console's CellData is null.
public ResetAppearanceToConsole ( ) : Cursor
return Cursor

ResetCursorEffect() public method

Resets the CursorRenderCell back to the default.
public ResetCursorEffect ( ) : void
return void

Right() public method

Moves the cusor right by the specified amount of columns.
public Right ( int amount ) : Cursor
amount int The amount of columns to move the cursor
return Cursor

RightWrap() public method

Moves the cusor right by the specified amount of columns, wrapping the cursor if needed.
public RightWrap ( int amount ) : Cursor
amount int The amount of columns to move the cursor
return Cursor

Up() public method

Moves the cusor up by the specified amount of lines.
public Up ( int amount ) : Cursor
amount int The amount of lines to move the cursor
return Cursor