pub unsafe trait NSTokenFieldCellDelegate: NSObjectProtocol + MainThreadOnly {
// Provided methods
unsafe fn tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem(
&self,
token_field_cell: &NSTokenFieldCell,
substring: &NSString,
token_index: NSInteger,
selected_index: NonNull<NSInteger>,
) -> Retained<NSArray>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_shouldAddObjects_atIndex(
&self,
token_field_cell: &NSTokenFieldCell,
tokens: &NSArray,
index: NSUInteger,
) -> Retained<NSArray>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_displayStringForRepresentedObject(
&self,
token_field_cell: &NSTokenFieldCell,
represented_object: &AnyObject,
) -> Option<Retained<NSString>>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_editingStringForRepresentedObject(
&self,
token_field_cell: &NSTokenFieldCell,
represented_object: &AnyObject,
) -> Option<Retained<NSString>>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_representedObjectForEditingString(
&self,
token_field_cell: &NSTokenFieldCell,
editing_string: &NSString,
) -> Option<Retained<AnyObject>>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_writeRepresentedObjects_toPasteboard(
&self,
token_field_cell: &NSTokenFieldCell,
objects: &NSArray,
pboard: &NSPasteboard,
) -> bool
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_readFromPasteboard(
&self,
token_field_cell: &NSTokenFieldCell,
pboard: &NSPasteboard,
) -> Option<Retained<NSArray>>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_menuForRepresentedObject(
&self,
token_field_cell: &NSTokenFieldCell,
represented_object: &AnyObject,
) -> Option<Retained<NSMenu>>
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_hasMenuForRepresentedObject(
&self,
token_field_cell: &NSTokenFieldCell,
represented_object: &AnyObject,
) -> bool
where Self: Sized + Message { ... }
unsafe fn tokenFieldCell_styleForRepresentedObject(
&self,
token_field_cell: &NSTokenFieldCell,
represented_object: &AnyObject,
) -> NSTokenStyle
where Self: Sized + Message { ... }
}
Available on crate feature
NSTokenFieldCell
only.Expand description
Provided Methods§
Sourceunsafe fn tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem(
&self,
token_field_cell: &NSTokenFieldCell,
substring: &NSString,
token_index: NSInteger,
selected_index: NonNull<NSInteger>,
) -> Retained<NSArray>
Available on crate features NSActionCell
and NSCell
and NSTextFieldCell
only.
unsafe fn tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem( &self, token_field_cell: &NSTokenFieldCell, substring: &NSString, token_index: NSInteger, selected_index: NonNull<NSInteger>, ) -> Retained<NSArray>
NSActionCell
and NSCell
and NSTextFieldCell
only.Allows the delegate to provide an array of appropriate completions for the contents of the receiver
Parameter tokenFieldCell
: The token field cell where editing is occurring
Parameter substring
: The partial string that is being completed
Parameter tokenIndex
: The index of the token being completed
Parameter selectedIndex
: Optionally, you can return by reference an index into the returned array that specifies which of the completions should be initially selected. If none are to be selected, return by reference -1
.
Returns: An array of strings (NSString
) that are possible completions
If the delegate does not implement this method, no completions are provided
unsafe fn tokenFieldCell_shouldAddObjects_atIndex( &self, token_field_cell: &NSTokenFieldCell, tokens: &NSArray, index: NSUInteger, ) -> Retained<NSArray>
Available on crate features
NSActionCell
and NSCell
and NSTextFieldCell
only.unsafe fn tokenFieldCell_displayStringForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> Option<Retained<NSString>>
Available on crate features
NSActionCell
and NSCell
and NSTextFieldCell
only.unsafe fn tokenFieldCell_editingStringForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> Option<Retained<NSString>>
Available on crate features
NSActionCell
and NSCell
and NSTextFieldCell
only.unsafe fn tokenFieldCell_representedObjectForEditingString( &self, token_field_cell: &NSTokenFieldCell, editing_string: &NSString, ) -> Option<Retained<AnyObject>>
Available on crate features
NSActionCell
and NSCell
and NSTextFieldCell
only.unsafe fn tokenFieldCell_writeRepresentedObjects_toPasteboard( &self, token_field_cell: &NSTokenFieldCell, objects: &NSArray, pboard: &NSPasteboard, ) -> bool
Available on crate features
NSActionCell
and NSCell
and NSPasteboard
and NSTextFieldCell
only.unsafe fn tokenFieldCell_readFromPasteboard( &self, token_field_cell: &NSTokenFieldCell, pboard: &NSPasteboard, ) -> Option<Retained<NSArray>>
Available on crate features
NSActionCell
and NSCell
and NSPasteboard
and NSTextFieldCell
only.Available on crate features
NSActionCell
and NSCell
and NSMenu
and NSTextFieldCell
only.unsafe fn tokenFieldCell_hasMenuForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> bool
Available on crate features
NSActionCell
and NSCell
and NSTextFieldCell
only.unsafe fn tokenFieldCell_styleForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> NSTokenStyle
Available on crate features
NSActionCell
and NSCell
and NSTextFieldCell
only.