Trait NSTextViewDelegate

Source
pub unsafe trait NSTextViewDelegate: NSTextDelegate {
Show 34 methods // Provided methods unsafe fn textView_clickedOnLink_atIndex( &self, text_view: &NSTextView, link: &AnyObject, char_index: NSUInteger, ) -> bool where Self: Sized + Message { ... } unsafe fn textView_clickedOnCell_inRect_atIndex( &self, text_view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, cell_frame: NSRect, char_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn textView_doubleClickedOnCell_inRect_atIndex( &self, text_view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, cell_frame: NSRect, char_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn textView_draggedCell_inRect_event_atIndex( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, rect: NSRect, event: &NSEvent, char_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn textView_writablePasteboardTypesForCell_atIndex( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, char_index: NSUInteger, ) -> Retained<NSArray<NSPasteboardType>> where Self: Sized + Message { ... } unsafe fn textView_writeCell_atIndex_toPasteboard_type( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, char_index: NSUInteger, pboard: &NSPasteboard, type: &NSPasteboardType, ) -> bool where Self: Sized + Message { ... } unsafe fn textView_willChangeSelectionFromCharacterRange_toCharacterRange( &self, text_view: &NSTextView, old_selected_char_range: NSRange, new_selected_char_range: NSRange, ) -> NSRange where Self: Sized + Message { ... } unsafe fn textView_willChangeSelectionFromCharacterRanges_toCharacterRanges( &self, text_view: &NSTextView, old_selected_char_ranges: &NSArray<NSValue>, new_selected_char_ranges: &NSArray<NSValue>, ) -> Retained<NSArray<NSValue>> where Self: Sized + Message { ... } unsafe fn textView_shouldChangeTextInRanges_replacementStrings( &self, text_view: &NSTextView, affected_ranges: &NSArray<NSValue>, replacement_strings: Option<&NSArray<NSString>>, ) -> bool where Self: Sized + Message { ... } unsafe fn textView_shouldChangeTypingAttributes_toAttributes( &self, text_view: &NSTextView, old_typing_attributes: &NSDictionary<NSString, AnyObject>, new_typing_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>, ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>> where Self: Sized + Message { ... } unsafe fn textViewDidChangeSelection(&self, notification: &NSNotification) where Self: Sized + Message { ... } unsafe fn textViewDidChangeTypingAttributes( &self, notification: &NSNotification, ) where Self: Sized + Message { ... } unsafe fn textView_willDisplayToolTip_forCharacterAtIndex( &self, text_view: &NSTextView, tooltip: &NSString, character_index: NSUInteger, ) -> Option<Retained<NSString>> where Self: Sized + Message { ... } unsafe fn textView_completions_forPartialWordRange_indexOfSelectedItem( &self, text_view: &NSTextView, words: &NSArray<NSString>, char_range: NSRange, index: *mut NSInteger, ) -> Retained<NSArray<NSString>> where Self: Sized + Message { ... } unsafe fn textView_shouldChangeTextInRange_replacementString( &self, text_view: &NSTextView, affected_char_range: NSRange, replacement_string: Option<&NSString>, ) -> bool where Self: Sized + Message { ... } unsafe fn textView_doCommandBySelector( &self, text_view: &NSTextView, command_selector: Sel, ) -> bool where Self: Sized + Message { ... } unsafe fn textView_shouldSetSpellingState_range( &self, text_view: &NSTextView, value: NSInteger, affected_char_range: NSRange, ) -> NSInteger where Self: Sized + Message { ... } unsafe fn textView_menu_forEvent_atIndex( &self, view: &NSTextView, menu: &NSMenu, event: &NSEvent, char_index: NSUInteger, ) -> Option<Retained<NSMenu>> where Self: Sized + Message { ... } unsafe fn textView_willCheckTextInRange_options_types( &self, view: &NSTextView, range: NSRange, options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>, checking_types: NonNull<NSTextCheckingTypes>, ) -> Retained<NSDictionary<NSTextCheckingOptionKey, AnyObject>> where Self: Sized + Message { ... } unsafe fn textView_didCheckTextInRange_types_options_results_orthography_wordCount( &self, view: &NSTextView, range: NSRange, checking_types: NSTextCheckingTypes, options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>, results: &NSArray<NSTextCheckingResult>, orthography: &NSOrthography, word_count: NSInteger, ) -> Retained<NSArray<NSTextCheckingResult>> where Self: Sized + Message { ... } unsafe fn textView_URLForContentsOfTextAttachment_atIndex( &self, text_view: &NSTextView, text_attachment: &NSTextAttachment, char_index: NSUInteger, ) -> Option<Retained<NSURL>> where Self: Sized + Message { ... } unsafe fn textView_willShowSharingServicePicker_forItems( &self, text_view: &NSTextView, service_picker: &NSSharingServicePicker, items: &NSArray, ) -> Option<Retained<NSSharingServicePicker>> where Self: Sized + Message { ... } unsafe fn undoManagerForTextView( &self, view: &NSTextView, ) -> Option<Retained<NSUndoManager>> where Self: Sized + Message { ... } unsafe fn textView_shouldUpdateTouchBarItemIdentifiers( &self, text_view: &NSTextView, identifiers: &NSArray<NSTouchBarItemIdentifier>, ) -> Retained<NSArray<NSTouchBarItemIdentifier>> where Self: Sized + Message { ... } unsafe fn textView_candidatesForSelectedRange( &self, text_view: &NSTextView, selected_range: NSRange, ) -> Option<Retained<NSArray>> where Self: Sized + Message { ... } unsafe fn textView_candidates_forSelectedRange( &self, text_view: &NSTextView, candidates: &NSArray<NSTextCheckingResult>, selected_range: NSRange, ) -> Retained<NSArray<NSTextCheckingResult>> where Self: Sized + Message { ... } unsafe fn textView_shouldSelectCandidateAtIndex( &self, text_view: &NSTextView, index: NSUInteger, ) -> bool where Self: Sized + Message { ... } unsafe fn textViewWritingToolsWillBegin(&self, text_view: &NSTextView) where Self: Sized + Message { ... } unsafe fn textViewWritingToolsDidEnd(&self, text_view: &NSTextView) where Self: Sized + Message { ... } unsafe fn textView_writingToolsIgnoredRangesInEnclosingRange( &self, text_view: &NSTextView, enclosing_range: NSRange, ) -> Retained<NSArray<NSValue>> where Self: Sized + Message { ... } unsafe fn textView_clickedOnLink( &self, text_view: &NSTextView, link: Option<&AnyObject>, ) -> bool where Self: Sized + Message { ... } unsafe fn textView_clickedOnCell_inRect( &self, text_view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, cell_frame: NSRect, ) where Self: Sized + Message { ... } unsafe fn textView_doubleClickedOnCell_inRect( &self, text_view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, cell_frame: NSRect, ) where Self: Sized + Message { ... } unsafe fn textView_draggedCell_inRect_event( &self, view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, rect: NSRect, event: Option<&NSEvent>, ) where Self: Sized + Message { ... }
}
Available on crate features NSText and NSTextView only.
Expand description

Provided Methods§

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_clickedOnCell_inRect_atIndex( &self, text_view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, cell_frame: NSRect, char_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_doubleClickedOnCell_inRect_atIndex( &self, text_view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, cell_frame: NSRect, char_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_draggedCell_inRect_event_atIndex( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, rect: NSRect, event: &NSEvent, char_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features NSEvent and NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_writablePasteboardTypesForCell_atIndex( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, char_index: NSUInteger, ) -> Retained<NSArray<NSPasteboardType>>
where Self: Sized + Message,

Available on crate features NSPasteboard and NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_writeCell_atIndex_toPasteboard_type( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, char_index: NSUInteger, pboard: &NSPasteboard, type: &NSPasteboardType, ) -> bool
where Self: Sized + Message,

Available on crate features NSPasteboard and NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_willChangeSelectionFromCharacterRange_toCharacterRange( &self, text_view: &NSTextView, old_selected_char_range: NSRange, new_selected_char_range: NSRange, ) -> NSRange
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_willChangeSelectionFromCharacterRanges_toCharacterRanges( &self, text_view: &NSTextView, old_selected_char_ranges: &NSArray<NSValue>, new_selected_char_ranges: &NSArray<NSValue>, ) -> Retained<NSArray<NSValue>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_shouldChangeTextInRanges_replacementStrings( &self, text_view: &NSTextView, affected_ranges: &NSArray<NSValue>, replacement_strings: Option<&NSArray<NSString>>, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_shouldChangeTypingAttributes_toAttributes( &self, text_view: &NSTextView, old_typing_attributes: &NSDictionary<NSString, AnyObject>, new_typing_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>, ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textViewDidChangeSelection(&self, notification: &NSNotification)
where Self: Sized + Message,

Source

unsafe fn textViewDidChangeTypingAttributes( &self, notification: &NSNotification, )
where Self: Sized + Message,

Source

unsafe fn textView_willDisplayToolTip_forCharacterAtIndex( &self, text_view: &NSTextView, tooltip: &NSString, character_index: NSUInteger, ) -> Option<Retained<NSString>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_completions_forPartialWordRange_indexOfSelectedItem( &self, text_view: &NSTextView, words: &NSArray<NSString>, char_range: NSRange, index: *mut NSInteger, ) -> Retained<NSArray<NSString>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_shouldChangeTextInRange_replacementString( &self, text_view: &NSTextView, affected_char_range: NSRange, replacement_string: Option<&NSString>, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_doCommandBySelector( &self, text_view: &NSTextView, command_selector: Sel, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_shouldSetSpellingState_range( &self, text_view: &NSTextView, value: NSInteger, affected_char_range: NSRange, ) -> NSInteger
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_menu_forEvent_atIndex( &self, view: &NSTextView, menu: &NSMenu, event: &NSEvent, char_index: NSUInteger, ) -> Option<Retained<NSMenu>>
where Self: Sized + Message,

Available on crate features NSEvent and NSMenu and NSResponder and NSView only.
Source

unsafe fn textView_willCheckTextInRange_options_types( &self, view: &NSTextView, range: NSRange, options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>, checking_types: NonNull<NSTextCheckingTypes>, ) -> Retained<NSDictionary<NSTextCheckingOptionKey, AnyObject>>
where Self: Sized + Message,

Available on crate features NSResponder and NSSpellChecker and NSView only.
Source

unsafe fn textView_didCheckTextInRange_types_options_results_orthography_wordCount( &self, view: &NSTextView, range: NSRange, checking_types: NSTextCheckingTypes, options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>, results: &NSArray<NSTextCheckingResult>, orthography: &NSOrthography, word_count: NSInteger, ) -> Retained<NSArray<NSTextCheckingResult>>
where Self: Sized + Message,

Available on crate features NSResponder and NSSpellChecker and NSView only.
Source

unsafe fn textView_URLForContentsOfTextAttachment_atIndex( &self, text_view: &NSTextView, text_attachment: &NSTextAttachment, char_index: NSUInteger, ) -> Option<Retained<NSURL>>
where Self: Sized + Message,

Available on crate features NSResponder and NSTextAttachment and NSView only.
Source

unsafe fn textView_willShowSharingServicePicker_forItems( &self, text_view: &NSTextView, service_picker: &NSSharingServicePicker, items: &NSArray, ) -> Option<Retained<NSSharingServicePicker>>
where Self: Sized + Message,

Available on crate features NSResponder and NSSharingService and NSView only.
Source

unsafe fn undoManagerForTextView( &self, view: &NSTextView, ) -> Option<Retained<NSUndoManager>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_shouldUpdateTouchBarItemIdentifiers( &self, text_view: &NSTextView, identifiers: &NSArray<NSTouchBarItemIdentifier>, ) -> Retained<NSArray<NSTouchBarItemIdentifier>>
where Self: Sized + Message,

Available on crate features NSResponder and NSTouchBarItem and NSView only.
Source

unsafe fn textView_candidatesForSelectedRange( &self, text_view: &NSTextView, selected_range: NSRange, ) -> Option<Retained<NSArray>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_candidates_forSelectedRange( &self, text_view: &NSTextView, candidates: &NSArray<NSTextCheckingResult>, selected_range: NSRange, ) -> Retained<NSArray<NSTextCheckingResult>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_shouldSelectCandidateAtIndex( &self, text_view: &NSTextView, index: NSUInteger, ) -> bool
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textViewWritingToolsWillBegin(&self, text_view: &NSTextView)
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textViewWritingToolsDidEnd(&self, text_view: &NSTextView)
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_writingToolsIgnoredRangesInEnclosingRange( &self, text_view: &NSTextView, enclosing_range: NSRange, ) -> Retained<NSArray<NSValue>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
👎Deprecated: Use -textView:clickedOnLink:atIndex: instead
Available on crate features NSResponder and NSView only.
Source

unsafe fn textView_clickedOnCell_inRect( &self, text_view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, cell_frame: NSRect, )
where Self: Sized + Message,

👎Deprecated: Use -textView:clickedOnCell:inRect:atIndex: instead
Available on crate features NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_doubleClickedOnCell_inRect( &self, text_view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, cell_frame: NSRect, )
where Self: Sized + Message,

👎Deprecated: Use -textView:doubleClickedOnCell:inRect:atIndex: instead
Available on crate features NSResponder and NSTextAttachmentCell and NSView only.
Source

unsafe fn textView_draggedCell_inRect_event( &self, view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, rect: NSRect, event: Option<&NSEvent>, )
where Self: Sized + Message,

👎Deprecated: Use -textView:draggedCell:inRect:event:atIndex: instead
Available on crate features NSEvent and NSResponder and NSTextAttachmentCell and NSView only.

Trait Implementations§

Source§

impl ProtocolType for dyn NSTextViewDelegate

Source§

const NAME: &'static str = "NSTextViewDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn NSTextViewDelegate

Implementations on Foreign Types§

Source§

impl<T> NSTextViewDelegate for ProtocolObject<T>

Implementors§

Source§

impl NSTextViewDelegate for NSOutlineView

Available on crate feature NSOutlineView only.
Source§

impl NSTextViewDelegate for NSTableView

Available on crate feature NSTableView only.