C# Class _3PA.Npp.Line

Represents a line of text in a Scintilla control.
Show file Open project: jcaillon/3P

Public Methods

Method Description
EnsureVisible ( ) : void

Expands any parent folds to ensure the line is visible.

FoldChildren ( FoldAction action ) : void

Performs the specified fold action on the current line and all child lines.

FoldLine ( FoldAction action ) : void

Performs the specified fold action on the current line.

GetLastChild ( int level ) : int

Searches for the next line that has a folding level that is less than or equal to level and returns the previous line index.

Goto ( ) : void

Navigates the caret to the start of the line.

Any selection is discarded.

Line ( ) : System

New line objetc for the current line

Line ( int index ) : System

Initializes a new instance of the Line class.

MarkerAdd ( int marker ) : MarkerHandle

Adds the specified Marker to the line.

This method does not check if the line already contains the marker.

MarkerAddSet ( uint markerMask ) : void

Adds one or more markers to the line in a single call using a bit mask.

MarkerDelete ( int marker ) : void

Removes the specified Marker from the line.

If the same marker has been added to the line more than once, this will delete one copy each time it is used.

MarkerGet ( ) : uint

Returns a bit mask indicating which markers are present on the line.

MarkerNext ( uint markerMask ) : int

Efficiently searches from the current line forward to the end of the document for the specified markers.

For example, the mask for marker index 10 is 1 shifted left 10 times (1 << 10).

MarkerPrevious ( uint markerMask ) : int

Efficiently searches from the current line backward to the start of the document for the specified markers.

For example, the mask for marker index 10 is 1 shifted left 10 times (1 << 10).

ToggleFold ( ) : void

Toggles the folding state of the line; expanding or contracting all child lines.

The line must be set as a FoldLevelFlags.Header.

Method Details

EnsureVisible() public method

Expands any parent folds to ensure the line is visible.
public EnsureVisible ( ) : void
return void

FoldChildren() public method

Performs the specified fold action on the current line and all child lines.
public FoldChildren ( FoldAction action ) : void
action FoldAction One of the FoldAction enumeration values.
return void

FoldLine() public method

Performs the specified fold action on the current line.
public FoldLine ( FoldAction action ) : void
action FoldAction One of the FoldAction enumeration values.
return void

GetLastChild() public method

Searches for the next line that has a folding level that is less than or equal to level and returns the previous line index.
public GetLastChild ( int level ) : int
level int The level of the line to search for. A value of -1 will use the current line FoldLevel.
return int

Goto() public method

Navigates the caret to the start of the line.
Any selection is discarded.
public Goto ( ) : void
return void

Line() public method

New line objetc for the current line
public Line ( ) : System
return System

Line() public method

Initializes a new instance of the Line class.
public Line ( int index ) : System
index int The index of this line within the LineCollection that created it.
return System

MarkerAdd() public method

Adds the specified Marker to the line.
This method does not check if the line already contains the marker.
public MarkerAdd ( int marker ) : MarkerHandle
marker int The zero-based index of the marker to add to the line.
return MarkerHandle

MarkerAddSet() public method

Adds one or more markers to the line in a single call using a bit mask.
public MarkerAddSet ( uint markerMask ) : void
markerMask uint /// An unsigned 32-bit value with each bit cooresponding to one of the 32 zero-based Margin /// indexes to add. ///
return void

MarkerDelete() public method

Removes the specified Marker from the line.
If the same marker has been added to the line more than once, this will delete one copy each time it is used.
public MarkerDelete ( int marker ) : void
marker int /// The zero-based index of the marker to remove from the line or -1 to delete all markers from the /// line. ///
return void

MarkerGet() public method

Returns a bit mask indicating which markers are present on the line.
public MarkerGet ( ) : uint
return uint

MarkerNext() public method

Efficiently searches from the current line forward to the end of the document for the specified markers.
For example, the mask for marker index 10 is 1 shifted left 10 times (1 << 10).
public MarkerNext ( uint markerMask ) : int
markerMask uint /// An unsigned 32-bit value with each bit cooresponding to one of the 32 zero-based Margin /// indexes. ///
return int

MarkerPrevious() public method

Efficiently searches from the current line backward to the start of the document for the specified markers.
For example, the mask for marker index 10 is 1 shifted left 10 times (1 << 10).
public MarkerPrevious ( uint markerMask ) : int
markerMask uint /// An unsigned 32-bit value with each bit cooresponding to one of the 32 zero-based Margin /// indexes. ///
return int

ToggleFold() public method

Toggles the folding state of the line; expanding or contracting all child lines.
The line must be set as a FoldLevelFlags.Header.
public ToggleFold ( ) : void
return void