C# Class Alsing.Windows.Forms.SyntaxBox.Caret

Caret class used by the SyntaxBoxControl
Show file Open project: vchelaru/FlatRedBall Class Usage Examples

Public Properties

Property Type Description
Blink bool

Public Methods

Method Description
Caret ( EditViewControl control ) : System

Caret constructor

CaretMoved ( bool Select ) : void
CropPosition ( ) : void

Confines the caret to a valid position within the active document

CurrentSegment ( ) : Span

Gets the word that the caret is placed on. This only applies if the active row is fully parsed.

GetWord ( int countBefore ) : Word
GetWordText ( int countBefore ) : string
MoveAbsoluteEnd ( bool Select ) : void

Moves the caret to the absolute end of the active row

MoveAbsoluteHome ( bool Select ) : void

Moves the caret to the first column of the active row

MoveDown ( bool Select ) : void

Moves the caret down one row.

MoveDown ( int rows, bool Select ) : void

Moves the caret down x rows.

MoveEnd ( bool Select ) : void

Moves the caret to the end of a row ignoring any whitespace characters at the end of the row

MoveHome ( bool Select ) : void

Moves the caret to the first non whitespace column at the active row

MoveLeft ( bool Select ) : void

Moves the caret left one step. if the caret is placed at the first column the caret will be moved up one line and placed at the last column of the row.

MoveRight ( bool Select ) : void

Moves the caret right one step. if the caret is placed at the last column of a row the caret will move down one row and be placed at the first column of that row.

MoveUp ( bool Select ) : void

Moves the caret up one row.

MoveUp ( int rows, bool Select ) : void

Moves the caret up x rows

SetPos ( TextPoint pos ) : void

Sets the position of the caret

Private Methods

Method Description
OnChange ( ) : void
PositionChange ( object s, EventArgs e ) : void
RememberXPos ( ) : void

Method Details

Caret() public method

Caret constructor
public Caret ( EditViewControl control ) : System
control EditViewControl The control that will use the caret
return System

CaretMoved() public method

public CaretMoved ( bool Select ) : void
Select bool
return void

CropPosition() public method

Confines the caret to a valid position within the active document
public CropPosition ( ) : void
return void

CurrentSegment() public method

Gets the word that the caret is placed on. This only applies if the active row is fully parsed.
public CurrentSegment ( ) : Span
return Alsing.SourceCode.Span

GetWord() public method

public GetWord ( int countBefore ) : Word
countBefore int
return Alsing.SourceCode.Word

GetWordText() public method

public GetWordText ( int countBefore ) : string
countBefore int
return string

MoveAbsoluteEnd() public method

Moves the caret to the absolute end of the active row
public MoveAbsoluteEnd ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveAbsoluteHome() public method

Moves the caret to the first column of the active row
public MoveAbsoluteHome ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveDown() public method

Moves the caret down one row.
public MoveDown ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveDown() public method

Moves the caret down x rows.
public MoveDown ( int rows, bool Select ) : void
rows int The number of rows the caret should be moved down
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveEnd() public method

Moves the caret to the end of a row ignoring any whitespace characters at the end of the row
public MoveEnd ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveHome() public method

Moves the caret to the first non whitespace column at the active row
public MoveHome ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveLeft() public method

Moves the caret left one step. if the caret is placed at the first column the caret will be moved up one line and placed at the last column of the row.
public MoveLeft ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveRight() public method

Moves the caret right one step. if the caret is placed at the last column of a row the caret will move down one row and be placed at the first column of that row.
public MoveRight ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveUp() public method

Moves the caret up one row.
public MoveUp ( bool Select ) : void
Select bool True if a selection should be created from the current caret pos to the new pos
return void

MoveUp() public method

Moves the caret up x rows
public MoveUp ( int rows, bool Select ) : void
rows int Number of rows the caret should be moved up
Select bool True if a selection should be created from the current caret pos to the new pos
return void

SetPos() public method

Sets the position of the caret
public SetPos ( TextPoint pos ) : void
pos Alsing.SourceCode.TextPoint Point containing the new x and y positions
return void

Property Details

Blink public property

Used by the painter to determine if the caret should be rendered or not
public bool Blink
return bool