C# Class ICSharpCode.TextEditor.Document.CustomLineManager

This class handles the bookmarks for a buffer
Inheritance: ICustomLineManager
Show file Open project: jumpinjackie/fdotoolbox

Public Methods

Method Description
AddCustomLine ( int lineNr, Color customColor, bool readOnly ) : void Set Custom Line at the line lineNr
AddCustomLine ( int startLineNr, int endLineNr, Color customColor, bool readOnly ) : void Add Custom Lines from the line startLineNr to the line endLineNr
Clear ( ) : void Clears all custom lines
CustomLineManager ( ILineManager lineTracker ) : System

Creates a new instance of CustomLineManager

GetCustomColor ( int lineNr, Color defaultColor ) : Color Returns the Color if the line lineNr has custom bg color otherwise returns defaultColor
IsReadOnly ( ISelection selection, bool defaultReadOnly ) : bool Returns true if selection is read only
IsReadOnly ( int lineNr, bool defaultReadOnly ) : bool Returns the ReadOnly if the line lineNr is custom otherwise returns default
RemoveCustomLine ( int lineNr ) : void Remove Custom Line at the line lineNr

Private Methods

Method Description
MoveIndices ( object sender, LineManagerEventArgs e ) : void

This method moves all indices from index upward count lines (useful for deletion/insertion of text)

OnBeforeChanged ( ) : void
OnChanged ( ) : void

Method Details

AddCustomLine() public method

Set Custom Line at the line lineNr
public AddCustomLine ( int lineNr, Color customColor, bool readOnly ) : void
lineNr int
customColor Color
readOnly bool
return void

AddCustomLine() public method

Add Custom Lines from the line startLineNr to the line endLineNr
public AddCustomLine ( int startLineNr, int endLineNr, Color customColor, bool readOnly ) : void
startLineNr int
endLineNr int
customColor Color
readOnly bool
return void

Clear() public method

Clears all custom lines
public Clear ( ) : void
return void

CustomLineManager() public method

Creates a new instance of CustomLineManager
public CustomLineManager ( ILineManager lineTracker ) : System
lineTracker ILineManager
return System

GetCustomColor() public method

Returns the Color if the line lineNr has custom bg color otherwise returns defaultColor
public GetCustomColor ( int lineNr, Color defaultColor ) : Color
lineNr int
defaultColor Color
return Color

IsReadOnly() public method

Returns true if selection is read only
public IsReadOnly ( ISelection selection, bool defaultReadOnly ) : bool
selection ISelection
defaultReadOnly bool
return bool

IsReadOnly() public method

Returns the ReadOnly if the line lineNr is custom otherwise returns default
public IsReadOnly ( int lineNr, bool defaultReadOnly ) : bool
lineNr int
defaultReadOnly bool
return bool

RemoveCustomLine() public method

Remove Custom Line at the line lineNr
public RemoveCustomLine ( int lineNr ) : void
lineNr int
return void