C# Class AppKit.TextKit.Formatter.SourceTextView

Inheritance: NSTextView
Datei anzeigen Open project: xamarin/mac-samples Class Usage Examples

Private Properties

Property Type Description
CalculateIndentLevel int
DecreaseTabIndent string
IncreaseTabIndent string
Initialize void
RaiseSourceCellClicked void
RaiseSourceCellDoubleClicked void
RaiseSourceCellDragged void
RaiseSourceSelectionChanged void
RaiseSourceTypingAttributesChanged void
TabIndent string

Public Methods

Method Description
DraggingEntered ( NSDraggingInfo sender ) : NSDragOperation

Called when a drag operation is started for this AppKit.TextKit.Formatter.SourceTextView.

See Apple's drag and drop docs for more details (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html)

IndentText ( ) : void

Indents the currently selected text.

KeyDown ( NSEvent theEvent ) : void

Look for special keys being pressed and does specific processing based on the key.

OutdentText ( ) : void

Outdents the currently selected text.

PerformDragOperation ( NSDraggingInfo sender ) : bool

Process any drag operations initialized by the user to this AppKit.TextKit.Formatter.SourceTextView. If one or more files have dragged in, the contents of those files will be copied into the document at the current cursor location.

See Apple's drag and drop docs for more details (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html)

PerformFormattingCommand ( LanguageFormatCommand command ) : void

Performs the formatting command on the currectly selected range of text.

ReadSelectionFromPasteboard ( NSPasteboard pboard ) : bool

Reads the selection from pasteboard.

This method is overridden to update the formatting after the user pastes text into the view.

ReadSelectionFromPasteboard ( NSPasteboard pboard, string type ) : bool

Reads the selection from pasteboard.

This method is overridden to update the formatting after the user pastes text into the view.

SourceTextView ( ) : System

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.

SourceTextView ( CGRect frameRect ) : System

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.

SourceTextView ( CGRect frameRect, NSTextContainer container ) : System

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.

SourceTextView ( IntPtr handle ) : System

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.

SourceTextView ( NSCoder coder ) : System

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.

Private Methods

Method Description
CalculateIndentLevel ( string line ) : int

Calculates the indent level by counting the number of tab characters at the start of the current line.

DecreaseTabIndent ( string text ) : string

Decreases the tab indent for the given text

IncreaseTabIndent ( string text ) : string

Increases the tab indent on the given section of text.

Initialize ( ) : void

Initialize this instance.

RaiseSourceCellClicked ( object sender, NSTextViewClickedEventArgs e ) : void

Raises the source cell clicked event.

RaiseSourceCellDoubleClicked ( object sender, NSTextViewDoubleClickEventArgs e ) : void

Raises the source cell double clicked event.

RaiseSourceCellDragged ( object sender, NSTextViewDraggedCellEventArgs e ) : void

Raises the source cell dragged event.

RaiseSourceSelectionChanged ( object sender, EventArgs e ) : void

Raises the source selection changed event.

RaiseSourceTypingAttributesChanged ( object sender, EventArgs e ) : void

Raises the source typing attributes changed event.

TabIndent ( int indentLevel ) : string

Creates a string of n number of tab characters that will be used to keep the tab level of the current line of text.

Method Details

DraggingEntered() public method

Called when a drag operation is started for this AppKit.TextKit.Formatter.SourceTextView.
See Apple's drag and drop docs for more details (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html)
public DraggingEntered ( NSDraggingInfo sender ) : NSDragOperation
sender NSDraggingInfo Sender.
return NSDragOperation

IndentText() public method

Indents the currently selected text.
public IndentText ( ) : void
return void

KeyDown() public method

Look for special keys being pressed and does specific processing based on the key.
public KeyDown ( NSEvent theEvent ) : void
theEvent NSEvent The event.
return void

OutdentText() public method

Outdents the currently selected text.
public OutdentText ( ) : void
return void

PerformDragOperation() public method

Process any drag operations initialized by the user to this AppKit.TextKit.Formatter.SourceTextView. If one or more files have dragged in, the contents of those files will be copied into the document at the current cursor location.
See Apple's drag and drop docs for more details (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DragandDrop/DragandDrop.html)
public PerformDragOperation ( NSDraggingInfo sender ) : bool
sender NSDraggingInfo The caller that initiated the drag operation.
return bool

PerformFormattingCommand() public method

Performs the formatting command on the currectly selected range of text.
public PerformFormattingCommand ( LanguageFormatCommand command ) : void
command LanguageFormatCommand The to apply.
return void

ReadSelectionFromPasteboard() public method

Reads the selection from pasteboard.
This method is overridden to update the formatting after the user pastes text into the view.
public ReadSelectionFromPasteboard ( NSPasteboard pboard ) : bool
pboard NSPasteboard The pasteboard being read.
return bool

ReadSelectionFromPasteboard() public method

Reads the selection from pasteboard.
This method is overridden to update the formatting after the user pastes text into the view.
public ReadSelectionFromPasteboard ( NSPasteboard pboard, string type ) : bool
pboard NSPasteboard The pasteboard being read.
type string The type of data being read from the pasteboard.
return bool

SourceTextView() public method

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.
public SourceTextView ( ) : System
return System

SourceTextView() public method

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.
public SourceTextView ( CGRect frameRect ) : System
frameRect CGRect Frame rect.
return System

SourceTextView() public method

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.
public SourceTextView ( CGRect frameRect, NSTextContainer container ) : System
frameRect CGRect Frame rect.
container NSTextContainer Container.
return System

SourceTextView() public method

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.
public SourceTextView ( IntPtr handle ) : System
handle System.IntPtr Handle.
return System

SourceTextView() public method

Initializes a new instance of the AppKit.TextKit.Formatter.SourceTextView class.
public SourceTextView ( NSCoder coder ) : System
coder NSCoder Coder.
return System