implementAsBlocking static method
NSTextViewDelegate
implementAsBlocking({
- bool textView_clickedOnLink_atIndex_(
- NSTextView,
- ObjCObjectBase,
- DartNSUInteger
- void textView_clickedOnCell_inRect_atIndex_()?,
- void textView_doubleClickedOnCell_inRect_atIndex_()?,
- void textView_draggedCell_inRect_event_atIndex_()?,
- NSArray textView_writablePasteboardTypesForCell_atIndex_()?,
- bool textView_writeCell_atIndex_toPasteboard_type_()?,
- NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange_()?,
- NSArray textView_willChangeSelectionFromCharacterRanges_toCharacterRanges_(
- NSTextView,
- NSArray,
- NSArray
- bool textView_shouldChangeTextInRanges_replacementStrings_(
- NSTextView,
- NSArray,
- NSArray?
- NSDictionary textView_shouldChangeTypingAttributes_toAttributes_(
- NSTextView,
- NSDictionary,
- NSDictionary
- void textViewDidChangeSelection_(
- NSNotification
- void textViewDidChangeTypingAttributes_(
- NSNotification
- NSString? textView_willDisplayToolTip_forCharacterAtIndex_(
- NSTextView,
- NSString,
- DartNSUInteger
- NSArray textView_completions_forPartialWordRange_indexOfSelectedItem_(
- NSTextView,
- NSArray,
- NSRange,
- Pointer<
NSInteger> ,
- bool textView_shouldChangeTextInRange_replacementString_(
- NSTextView,
- NSRange,
- NSString?
- bool textView_doCommandBySelector_(
- NSTextView,
- Pointer<
ObjCSelector>
- DartNSInteger textView_shouldSetSpellingState_range_()?,
- NSDictionary textView_willCheckTextInRange_options_types_(
- NSTextView,
- NSRange,
- NSDictionary,
- Pointer<
CVOptionFlags> ,
- NSArray textView_didCheckTextInRange_types_options_results_orthography_wordCount_(
- NSTextView,
- NSRange,
- DartNSTextCheckingTypes,
- NSDictionary,
- NSArray,
- NSOrthography,
- DartNSInteger,
- NSURL? textView_URLForContentsOfTextAttachment_atIndex_()?,
- NSSharingServicePicker? textView_willShowSharingServicePicker_forItems_(
- NSTextView,
- NSSharingServicePicker,
- NSArray
- NSUndoManager? undoManagerForTextView_()?,
- NSArray textView_shouldUpdateTouchBarItemIdentifiers_(
- NSTextView,
- NSArray
- NSArray? textView_candidatesForSelectedRange_()?,
- NSArray textView_candidates_forSelectedRange_(
- NSTextView,
- NSArray,
- NSRange
- bool textView_shouldSelectCandidateAtIndex_()?,
- void textViewWritingToolsWillBegin_()?,
- void textViewWritingToolsDidEnd_()?,
- NSArray textView_writingToolsIgnoredRangesInEnclosingRange_()?,
- bool textView_clickedOnLink_(
- NSTextView,
- ObjCObjectBase
- void textView_clickedOnCell_inRect_()?,
- void textView_doubleClickedOnCell_inRect_()?,
- void textView_draggedCell_inRect_event_()?,
- bool textShouldBeginEditing_()?,
- bool textShouldEndEditing_()?,
- void textDidBeginEditing_(
- NSNotification
- void textDidEndEditing_(
- NSNotification
- void textDidChange_(
- NSNotification
- bool $keepIsolateAlive = true,
override
Builds an object that implements the NSTextViewDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All
methods that can be implemented as blocking listeners will be.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSTextViewDelegate implementAsBlocking({
bool Function(NSTextView, objc.ObjCObjectBase, DartNSUInteger)?
textView_clickedOnLink_atIndex_,
void Function(NSTextView, NSTextAttachmentCell, NSRect, DartNSUInteger)?
textView_clickedOnCell_inRect_atIndex_,
void Function(NSTextView, NSTextAttachmentCell, NSRect, DartNSUInteger)?
textView_doubleClickedOnCell_inRect_atIndex_,
void Function(
NSTextView,
NSTextAttachmentCell,
NSRect,
NSEvent,
DartNSUInteger,
)?
textView_draggedCell_inRect_event_atIndex_,
objc.NSArray Function(NSTextView, NSTextAttachmentCell, DartNSUInteger)?
textView_writablePasteboardTypesForCell_atIndex_,
bool Function(
NSTextView,
NSTextAttachmentCell,
DartNSUInteger,
NSPasteboard,
DartNSPasteboardType,
)?
textView_writeCell_atIndex_toPasteboard_type_,
NSRange Function(NSTextView, NSRange, NSRange)?
textView_willChangeSelectionFromCharacterRange_toCharacterRange_,
objc.NSArray Function(NSTextView, objc.NSArray, objc.NSArray)?
textView_willChangeSelectionFromCharacterRanges_toCharacterRanges_,
bool Function(NSTextView, objc.NSArray, objc.NSArray?)?
textView_shouldChangeTextInRanges_replacementStrings_,
objc.NSDictionary Function(
NSTextView,
objc.NSDictionary,
objc.NSDictionary,
)?
textView_shouldChangeTypingAttributes_toAttributes_,
void Function(objc.NSNotification)? textViewDidChangeSelection_,
void Function(objc.NSNotification)? textViewDidChangeTypingAttributes_,
objc.NSString? Function(NSTextView, objc.NSString, DartNSUInteger)?
textView_willDisplayToolTip_forCharacterAtIndex_,
objc.NSArray Function(
NSTextView,
objc.NSArray,
NSRange,
ffi.Pointer<NSInteger>,
)?
textView_completions_forPartialWordRange_indexOfSelectedItem_,
bool Function(NSTextView, NSRange, objc.NSString?)?
textView_shouldChangeTextInRange_replacementString_,
bool Function(NSTextView, ffi.Pointer<objc.ObjCSelector>)?
textView_doCommandBySelector_,
DartNSInteger Function(NSTextView, DartNSInteger, NSRange)?
textView_shouldSetSpellingState_range_,
NSMenu? Function(NSTextView, NSMenu, NSEvent, DartNSUInteger)?
textView_menu_forEvent_atIndex_,
objc.NSDictionary Function(
NSTextView,
NSRange,
objc.NSDictionary,
ffi.Pointer<NSTextCheckingTypes>,
)?
textView_willCheckTextInRange_options_types_,
objc.NSArray Function(
NSTextView,
NSRange,
DartNSTextCheckingTypes,
objc.NSDictionary,
objc.NSArray,
NSOrthography,
DartNSInteger,
)?
textView_didCheckTextInRange_types_options_results_orthography_wordCount_,
objc.NSURL? Function(NSTextView, NSTextAttachment, DartNSUInteger)?
textView_URLForContentsOfTextAttachment_atIndex_,
NSSharingServicePicker? Function(
NSTextView,
NSSharingServicePicker,
objc.NSArray,
)?
textView_willShowSharingServicePicker_forItems_,
NSUndoManager? Function(NSTextView)? undoManagerForTextView_,
objc.NSArray Function(NSTextView, objc.NSArray)?
textView_shouldUpdateTouchBarItemIdentifiers_,
objc.NSArray? Function(NSTextView, NSRange)?
textView_candidatesForSelectedRange_,
objc.NSArray Function(NSTextView, objc.NSArray, NSRange)?
textView_candidates_forSelectedRange_,
bool Function(NSTextView, DartNSUInteger)?
textView_shouldSelectCandidateAtIndex_,
void Function(NSTextView)? textViewWritingToolsWillBegin_,
void Function(NSTextView)? textViewWritingToolsDidEnd_,
objc.NSArray Function(NSTextView, NSRange)?
textView_writingToolsIgnoredRangesInEnclosingRange_,
bool Function(NSTextView, objc.ObjCObjectBase)? textView_clickedOnLink_,
void Function(NSTextView, NSTextAttachmentCell, NSRect)?
textView_clickedOnCell_inRect_,
void Function(NSTextView, NSTextAttachmentCell, NSRect)?
textView_doubleClickedOnCell_inRect_,
void Function(NSTextView, NSTextAttachmentCell, NSRect, NSEvent)?
textView_draggedCell_inRect_event_,
bool Function(NSText)? textShouldBeginEditing_,
bool Function(NSText)? textShouldEndEditing_,
void Function(objc.NSNotification)? textDidBeginEditing_,
void Function(objc.NSNotification)? textDidEndEditing_,
void Function(objc.NSNotification)? textDidChange_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSTextViewDelegate');
NSTextViewDelegate.textView_clickedOnLink_atIndex_.implement(
builder,
textView_clickedOnLink_atIndex_,
);
NSTextViewDelegate.textView_clickedOnCell_inRect_atIndex_
.implementAsBlocking(builder, textView_clickedOnCell_inRect_atIndex_);
NSTextViewDelegate.textView_doubleClickedOnCell_inRect_atIndex_
.implementAsBlocking(
builder,
textView_doubleClickedOnCell_inRect_atIndex_,
);
NSTextViewDelegate.textView_draggedCell_inRect_event_atIndex_
.implementAsBlocking(
builder,
textView_draggedCell_inRect_event_atIndex_,
);
NSTextViewDelegate.textView_writablePasteboardTypesForCell_atIndex_
.implement(builder, textView_writablePasteboardTypesForCell_atIndex_);
NSTextViewDelegate.textView_writeCell_atIndex_toPasteboard_type_.implement(
builder,
textView_writeCell_atIndex_toPasteboard_type_,
);
NSTextViewDelegate
.textView_willChangeSelectionFromCharacterRange_toCharacterRange_
.implement(
builder,
textView_willChangeSelectionFromCharacterRange_toCharacterRange_,
);
NSTextViewDelegate
.textView_willChangeSelectionFromCharacterRanges_toCharacterRanges_
.implement(
builder,
textView_willChangeSelectionFromCharacterRanges_toCharacterRanges_,
);
NSTextViewDelegate.textView_shouldChangeTextInRanges_replacementStrings_
.implement(
builder,
textView_shouldChangeTextInRanges_replacementStrings_,
);
NSTextViewDelegate.textView_shouldChangeTypingAttributes_toAttributes_
.implement(
builder,
textView_shouldChangeTypingAttributes_toAttributes_,
);
NSTextViewDelegate.textViewDidChangeSelection_.implementAsBlocking(
builder,
textViewDidChangeSelection_,
);
NSTextViewDelegate.textViewDidChangeTypingAttributes_.implementAsBlocking(
builder,
textViewDidChangeTypingAttributes_,
);
NSTextViewDelegate.textView_willDisplayToolTip_forCharacterAtIndex_
.implement(builder, textView_willDisplayToolTip_forCharacterAtIndex_);
NSTextViewDelegate
.textView_completions_forPartialWordRange_indexOfSelectedItem_
.implement(
builder,
textView_completions_forPartialWordRange_indexOfSelectedItem_,
);
NSTextViewDelegate.textView_shouldChangeTextInRange_replacementString_
.implement(
builder,
textView_shouldChangeTextInRange_replacementString_,
);
NSTextViewDelegate.textView_doCommandBySelector_.implement(
builder,
textView_doCommandBySelector_,
);
NSTextViewDelegate.textView_shouldSetSpellingState_range_.implement(
builder,
textView_shouldSetSpellingState_range_,
);
NSTextViewDelegate.textView_menu_forEvent_atIndex_.implement(
builder,
textView_menu_forEvent_atIndex_,
);
NSTextViewDelegate.textView_willCheckTextInRange_options_types_.implement(
builder,
textView_willCheckTextInRange_options_types_,
);
NSTextViewDelegate
.textView_didCheckTextInRange_types_options_results_orthography_wordCount_
.implement(
builder,
textView_didCheckTextInRange_types_options_results_orthography_wordCount_,
);
NSTextViewDelegate.textView_URLForContentsOfTextAttachment_atIndex_
.implement(builder, textView_URLForContentsOfTextAttachment_atIndex_);
NSTextViewDelegate.textView_willShowSharingServicePicker_forItems_
.implement(builder, textView_willShowSharingServicePicker_forItems_);
NSTextViewDelegate.undoManagerForTextView_.implement(
builder,
undoManagerForTextView_,
);
NSTextViewDelegate.textView_shouldUpdateTouchBarItemIdentifiers_.implement(
builder,
textView_shouldUpdateTouchBarItemIdentifiers_,
);
NSTextViewDelegate.textView_candidatesForSelectedRange_.implement(
builder,
textView_candidatesForSelectedRange_,
);
NSTextViewDelegate.textView_candidates_forSelectedRange_.implement(
builder,
textView_candidates_forSelectedRange_,
);
NSTextViewDelegate.textView_shouldSelectCandidateAtIndex_.implement(
builder,
textView_shouldSelectCandidateAtIndex_,
);
NSTextViewDelegate.textViewWritingToolsWillBegin_.implementAsBlocking(
builder,
textViewWritingToolsWillBegin_,
);
NSTextViewDelegate.textViewWritingToolsDidEnd_.implementAsBlocking(
builder,
textViewWritingToolsDidEnd_,
);
NSTextViewDelegate.textView_writingToolsIgnoredRangesInEnclosingRange_
.implement(
builder,
textView_writingToolsIgnoredRangesInEnclosingRange_,
);
NSTextViewDelegate.textView_clickedOnLink_.implement(
builder,
textView_clickedOnLink_,
);
NSTextViewDelegate.textView_clickedOnCell_inRect_.implementAsBlocking(
builder,
textView_clickedOnCell_inRect_,
);
NSTextViewDelegate.textView_doubleClickedOnCell_inRect_.implementAsBlocking(
builder,
textView_doubleClickedOnCell_inRect_,
);
NSTextViewDelegate.textView_draggedCell_inRect_event_.implementAsBlocking(
builder,
textView_draggedCell_inRect_event_,
);
NSTextViewDelegate.textShouldBeginEditing_.implement(
builder,
textShouldBeginEditing_,
);
NSTextViewDelegate.textShouldEndEditing_.implement(
builder,
textShouldEndEditing_,
);
NSTextViewDelegate.textDidBeginEditing_.implementAsBlocking(
builder,
textDidBeginEditing_,
);
NSTextViewDelegate.textDidEndEditing_.implementAsBlocking(
builder,
textDidEndEditing_,
);
NSTextViewDelegate.textDidChange_.implementAsBlocking(
builder,
textDidChange_,
);
builder.addProtocol($protocol);
return NSTextViewDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}