C# Class AppKit.TextKit.Formatter.SourceTextViewDelegate

The AppKit.TextKit.Formatter.SourceTextViewDelegate is used to respond to events that occur on a AppKit.TextKit.Formatter.SourceTextView.
Inheritance: NSTextViewDelegate
Datei anzeigen Open project: xamarin/mac-samples Class Usage Examples

Public Methods

Method Description
CellClicked ( NSTextView textView, NSTextAttachmentCell cell, CGRect cellFrame, nuint charIndex ) : void

Called when the cell is clicked.

Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.

CellDoubleClicked ( NSTextView textView, NSTextAttachmentCell cell, CGRect cellFrame, nuint charIndex ) : void

Called when the cell is double-clicked.

Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.

DidChangeSelection ( NSNotification notification ) : void

Called when the text selection has changed.

Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.

DidChangeTypingAttributes ( NSNotification notification ) : void

Called when the typing attributes has changed.

Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.

DraggedCell ( NSTextView view, NSTextAttachmentCell cell, CGRect rect, NSEvent theevent ) : void

Called when the cell is dragged.

Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.

GetCompletions ( NSTextView textView, string words, NSRange charRange, nint &index ) : string[]

Based on the user preferences set on the parent AppKit.TextKit.Formatter.SourceTextView, this method returns the available list of partial word completions.

SourceTextViewDelegate ( SourceTextView textEditor ) : System

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

Method Details

CellClicked() public method

Called when the cell is clicked.
Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.
public CellClicked ( NSTextView textView, NSTextAttachmentCell cell, CGRect cellFrame, nuint charIndex ) : void
textView NSTextView The .
cell NSTextAttachmentCell The cell being acted upon.
cellFrame CGRect The onscreen frame of the cell.
charIndex nuint The index of the character clicked.
return void

CellDoubleClicked() public method

Called when the cell is double-clicked.
Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.
public CellDoubleClicked ( NSTextView textView, NSTextAttachmentCell cell, CGRect cellFrame, nuint charIndex ) : void
textView NSTextView The .
cell NSTextAttachmentCell The cell being acted upon.
cellFrame CGRect The onscreen frame of the cell.
charIndex nuint The index of the character clicked.
return void

DidChangeSelection() public method

Called when the text selection has changed.
Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.
public DidChangeSelection ( NSNotification notification ) : void
notification NSNotification A notification defining the change.
return void

DidChangeTypingAttributes() public method

Called when the typing attributes has changed.
Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.
public DidChangeTypingAttributes ( NSNotification notification ) : void
notification NSNotification A notification defining the change.
return void

DraggedCell() public method

Called when the cell is dragged.
Because a custom Delegate has been attached to the NSTextView, the normal events will not work so we are using this method to call custom AppKit.TextKit.Formatter.SourceTextView events instead.
public DraggedCell ( NSTextView view, NSTextAttachmentCell cell, CGRect rect, NSEvent theevent ) : void
view NSTextView
cell NSTextAttachmentCell The cell being acted upon.
rect CGRect
theevent NSEvent An event defining the drag operation.
return void

GetCompletions() public method

Based on the user preferences set on the parent AppKit.TextKit.Formatter.SourceTextView, this method returns the available list of partial word completions.
public GetCompletions ( NSTextView textView, string words, NSRange charRange, nint &index ) : string[]
textView NSTextView The source .
words string A list of default words automatically provided by OS X in the user's language.
charRange NSRange The cursor location where the partial word exists.
index nint The word that should be selected when the list is displayed (usually 0 meaning /// the first item in the list). Pass -1 for no selected items.
return string[]

SourceTextViewDelegate() public method

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