implement static method
NSTokenFieldCellDelegate
implement({
- NSArray tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem_(
- NSTokenFieldCell,
- NSString,
- DartNSInteger,
- Pointer<
NSInteger> ,
- NSArray tokenFieldCell_shouldAddObjects_atIndex_(
- NSTokenFieldCell,
- NSArray,
- DartNSUInteger
- NSString? tokenFieldCell_displayStringForRepresentedObject_(
- NSTokenFieldCell,
- ObjCObjectBase
- NSString? tokenFieldCell_editingStringForRepresentedObject_(
- NSTokenFieldCell,
- ObjCObjectBase
- ObjCObjectBase? tokenFieldCell_representedObjectForEditingString_(
- NSTokenFieldCell,
- NSString
- bool tokenFieldCell_writeRepresentedObjects_toPasteboard_(
- NSTokenFieldCell,
- NSArray,
- NSPasteboard
- NSArray? tokenFieldCell_readFromPasteboard_()?,
- bool tokenFieldCell_hasMenuForRepresentedObject_(
- NSTokenFieldCell,
- ObjCObjectBase
- NSTokenStyle tokenFieldCell_styleForRepresentedObject_(
- NSTokenFieldCell,
- ObjCObjectBase
- bool $keepIsolateAlive = true,
Builds an object that implements the NSTokenFieldCellDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSTokenFieldCellDelegate implement({
objc.NSArray Function(
NSTokenFieldCell,
objc.NSString,
DartNSInteger,
ffi.Pointer<NSInteger>,
)?
tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem_,
objc.NSArray Function(NSTokenFieldCell, objc.NSArray, DartNSUInteger)?
tokenFieldCell_shouldAddObjects_atIndex_,
objc.NSString? Function(NSTokenFieldCell, objc.ObjCObjectBase)?
tokenFieldCell_displayStringForRepresentedObject_,
objc.NSString? Function(NSTokenFieldCell, objc.ObjCObjectBase)?
tokenFieldCell_editingStringForRepresentedObject_,
objc.ObjCObjectBase? Function(NSTokenFieldCell, objc.NSString)?
tokenFieldCell_representedObjectForEditingString_,
bool Function(NSTokenFieldCell, objc.NSArray, NSPasteboard)?
tokenFieldCell_writeRepresentedObjects_toPasteboard_,
objc.NSArray? Function(NSTokenFieldCell, NSPasteboard)?
tokenFieldCell_readFromPasteboard_,
NSMenu? Function(NSTokenFieldCell, objc.ObjCObjectBase)?
tokenFieldCell_menuForRepresentedObject_,
bool Function(NSTokenFieldCell, objc.ObjCObjectBase)?
tokenFieldCell_hasMenuForRepresentedObject_,
NSTokenStyle Function(NSTokenFieldCell, objc.ObjCObjectBase)?
tokenFieldCell_styleForRepresentedObject_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSTokenFieldCellDelegate',
);
NSTokenFieldCellDelegate
.tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem_
.implement(
builder,
tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem_,
);
NSTokenFieldCellDelegate.tokenFieldCell_shouldAddObjects_atIndex_.implement(
builder,
tokenFieldCell_shouldAddObjects_atIndex_,
);
NSTokenFieldCellDelegate.tokenFieldCell_displayStringForRepresentedObject_
.implement(builder, tokenFieldCell_displayStringForRepresentedObject_);
NSTokenFieldCellDelegate.tokenFieldCell_editingStringForRepresentedObject_
.implement(builder, tokenFieldCell_editingStringForRepresentedObject_);
NSTokenFieldCellDelegate.tokenFieldCell_representedObjectForEditingString_
.implement(builder, tokenFieldCell_representedObjectForEditingString_);
NSTokenFieldCellDelegate
.tokenFieldCell_writeRepresentedObjects_toPasteboard_
.implement(
builder,
tokenFieldCell_writeRepresentedObjects_toPasteboard_,
);
NSTokenFieldCellDelegate.tokenFieldCell_readFromPasteboard_.implement(
builder,
tokenFieldCell_readFromPasteboard_,
);
NSTokenFieldCellDelegate.tokenFieldCell_menuForRepresentedObject_.implement(
builder,
tokenFieldCell_menuForRepresentedObject_,
);
NSTokenFieldCellDelegate.tokenFieldCell_hasMenuForRepresentedObject_
.implement(builder, tokenFieldCell_hasMenuForRepresentedObject_);
NSTokenFieldCellDelegate.tokenFieldCell_styleForRepresentedObject_
.implement(builder, tokenFieldCell_styleForRepresentedObject_);
builder.addProtocol($protocol);
return NSTokenFieldCellDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}