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 { ... }
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 { ... }
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 { ... }
}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
§Safety
selected_index must be a valid pointer.
Sourceunsafe 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_shouldAddObjects_atIndex( &self, token_field_cell: &NSTokenFieldCell, tokens: &NSArray, index: NSUInteger, ) -> Retained<NSArray>
NSActionCell and NSCell and NSTextFieldCell only.§Safety
tokens generic should be of the correct type.
Sourceunsafe 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_displayStringForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> Option<Retained<NSString>>
NSActionCell and NSCell and NSTextFieldCell only.§Safety
represented_object should be of the correct type.
Sourceunsafe 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_editingStringForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> Option<Retained<NSString>>
NSActionCell and NSCell and NSTextFieldCell only.§Safety
represented_object should be of the correct type.
fn tokenFieldCell_representedObjectForEditingString( &self, token_field_cell: &NSTokenFieldCell, editing_string: &NSString, ) -> Option<Retained<AnyObject>>
NSActionCell and NSCell and NSTextFieldCell only.Sourceunsafe 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_writeRepresentedObjects_toPasteboard( &self, token_field_cell: &NSTokenFieldCell, objects: &NSArray, pboard: &NSPasteboard, ) -> bool
NSActionCell and NSCell and NSPasteboard and NSTextFieldCell only.§Safety
objects generic should be of the correct type.
fn tokenFieldCell_readFromPasteboard( &self, token_field_cell: &NSTokenFieldCell, pboard: &NSPasteboard, ) -> Option<Retained<NSArray>>
NSActionCell and NSCell and NSPasteboard and NSTextFieldCell only.Available on crate features NSActionCell and NSCell and NSMenu and NSTextFieldCell only.
NSActionCell and NSCell and NSMenu and NSTextFieldCell only.§Safety
represented_object should be of the correct type.
Sourceunsafe 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_hasMenuForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> bool
NSActionCell and NSCell and NSTextFieldCell only.§Safety
represented_object should be of the correct type.
Sourceunsafe fn tokenFieldCell_styleForRepresentedObject(
&self,
token_field_cell: &NSTokenFieldCell,
represented_object: &AnyObject,
) -> NSTokenStyle
Available on crate features NSActionCell and NSCell and NSTextFieldCell only.
unsafe fn tokenFieldCell_styleForRepresentedObject( &self, token_field_cell: &NSTokenFieldCell, represented_object: &AnyObject, ) -> NSTokenStyle
NSActionCell and NSCell and NSTextFieldCell only.§Safety
represented_object should be of the correct type.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn NSTokenFieldCellDelegate
Source§impl ProtocolType for dyn NSTokenFieldCellDelegate
impl ProtocolType for dyn NSTokenFieldCellDelegate
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".