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 { ... }
fn textView_clickedOnCell_inRect_atIndex(
&self,
text_view: &NSTextView,
cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>,
cell_frame: NSRect,
char_index: NSUInteger,
)
where Self: Sized + Message { ... }
fn textView_doubleClickedOnCell_inRect_atIndex(
&self,
text_view: &NSTextView,
cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>,
cell_frame: NSRect,
char_index: NSUInteger,
)
where Self: Sized + Message { ... }
fn textView_draggedCell_inRect_event_atIndex(
&self,
view: &NSTextView,
cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>,
rect: NSRect,
event: &NSEvent,
char_index: NSUInteger,
)
where Self: Sized + Message { ... }
fn textView_writablePasteboardTypesForCell_atIndex(
&self,
view: &NSTextView,
cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>,
char_index: NSUInteger,
) -> Retained<NSArray<NSPasteboardType>>
where Self: Sized + Message { ... }
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 { ... }
fn textView_willChangeSelectionFromCharacterRange_toCharacterRange(
&self,
text_view: &NSTextView,
old_selected_char_range: NSRange,
new_selected_char_range: NSRange,
) -> NSRange
where Self: Sized + Message { ... }
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 { ... }
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 { ... }
fn textViewDidChangeSelection(&self, notification: &NSNotification)
where Self: Sized + Message { ... }
fn textViewDidChangeTypingAttributes(&self, notification: &NSNotification)
where Self: Sized + Message { ... }
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 { ... }
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 { ... }
fn textView_shouldSetSpellingState_range(
&self,
text_view: &NSTextView,
value: NSInteger,
affected_char_range: NSRange,
) -> NSInteger
where Self: Sized + Message { ... }
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 { ... }
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 { ... }
fn undoManagerForTextView(
&self,
view: &NSTextView,
) -> Option<Retained<NSUndoManager>>
where Self: Sized + Message { ... }
fn textView_shouldUpdateTouchBarItemIdentifiers(
&self,
text_view: &NSTextView,
identifiers: &NSArray<NSTouchBarItemIdentifier>,
) -> Retained<NSArray<NSTouchBarItemIdentifier>>
where Self: Sized + Message { ... }
fn textView_candidatesForSelectedRange(
&self,
text_view: &NSTextView,
selected_range: NSRange,
) -> Option<Retained<NSArray>>
where Self: Sized + Message { ... }
fn textView_candidates_forSelectedRange(
&self,
text_view: &NSTextView,
candidates: &NSArray<NSTextCheckingResult>,
selected_range: NSRange,
) -> Retained<NSArray<NSTextCheckingResult>>
where Self: Sized + Message { ... }
fn textView_shouldSelectCandidateAtIndex(
&self,
text_view: &NSTextView,
index: NSUInteger,
) -> bool
where Self: Sized + Message { ... }
fn textViewWritingToolsWillBegin(&self, text_view: &NSTextView)
where Self: Sized + Message { ... }
fn textViewWritingToolsDidEnd(&self, text_view: &NSTextView)
where Self: Sized + Message { ... }
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§
Sourceunsafe fn textView_clickedOnLink_atIndex(
&self,
text_view: &NSTextView,
link: &AnyObject,
char_index: NSUInteger,
) -> bool
Available on crate features NSResponder and NSView only.
unsafe fn textView_clickedOnLink_atIndex( &self, text_view: &NSTextView, link: &AnyObject, char_index: NSUInteger, ) -> bool
NSResponder and NSView only.§Safety
link should be of the correct type.
fn textView_clickedOnCell_inRect_atIndex( &self, text_view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, cell_frame: NSRect, char_index: NSUInteger, )
Available on crate features
NSResponder and NSTextAttachmentCell and NSView only.fn textView_doubleClickedOnCell_inRect_atIndex( &self, text_view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, cell_frame: NSRect, char_index: NSUInteger, )
Available on crate features
NSResponder and NSTextAttachmentCell and NSView only.fn textView_draggedCell_inRect_event_atIndex( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, rect: NSRect, event: &NSEvent, char_index: NSUInteger, )
Available on crate features
NSEvent and NSResponder and NSTextAttachmentCell and NSView only.fn textView_writablePasteboardTypesForCell_atIndex( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, char_index: NSUInteger, ) -> Retained<NSArray<NSPasteboardType>>
Available on crate features
NSPasteboard and NSResponder and NSTextAttachmentCell and NSView only.fn textView_writeCell_atIndex_toPasteboard_type( &self, view: &NSTextView, cell: &ProtocolObject<dyn NSTextAttachmentCellProtocol>, char_index: NSUInteger, pboard: &NSPasteboard, type: &NSPasteboardType, ) -> bool
Available on crate features
NSPasteboard and NSResponder and NSTextAttachmentCell and NSView only.fn textView_willChangeSelectionFromCharacterRange_toCharacterRange( &self, text_view: &NSTextView, old_selected_char_range: NSRange, new_selected_char_range: NSRange, ) -> NSRange
Available on crate features
NSResponder and NSView only.fn textView_willChangeSelectionFromCharacterRanges_toCharacterRanges( &self, text_view: &NSTextView, old_selected_char_ranges: &NSArray<NSValue>, new_selected_char_ranges: &NSArray<NSValue>, ) -> Retained<NSArray<NSValue>>
Available on crate features
NSResponder and NSView only.fn textView_shouldChangeTextInRanges_replacementStrings( &self, text_view: &NSTextView, affected_ranges: &NSArray<NSValue>, replacement_strings: Option<&NSArray<NSString>>, ) -> bool
Available on crate features
NSResponder and NSView only.Sourceunsafe fn textView_shouldChangeTypingAttributes_toAttributes(
&self,
text_view: &NSTextView,
old_typing_attributes: &NSDictionary<NSString, AnyObject>,
new_typing_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>
Available on crate features NSResponder and NSView only.
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>>
NSResponder and NSView only.§Safety
old_typing_attributesgeneric should be of the correct type.new_typing_attributesgeneric should be of the correct type.
fn textViewDidChangeSelection(&self, notification: &NSNotification)
fn textViewDidChangeTypingAttributes(&self, notification: &NSNotification)
fn textView_willDisplayToolTip_forCharacterAtIndex( &self, text_view: &NSTextView, tooltip: &NSString, character_index: NSUInteger, ) -> Option<Retained<NSString>>
Available on crate features
NSResponder and NSView only.Sourceunsafe fn textView_completions_forPartialWordRange_indexOfSelectedItem(
&self,
text_view: &NSTextView,
words: &NSArray<NSString>,
char_range: NSRange,
index: *mut NSInteger,
) -> Retained<NSArray<NSString>>
Available on crate features NSResponder and NSView only.
unsafe fn textView_completions_forPartialWordRange_indexOfSelectedItem( &self, text_view: &NSTextView, words: &NSArray<NSString>, char_range: NSRange, index: *mut NSInteger, ) -> Retained<NSArray<NSString>>
NSResponder and NSView only.§Safety
index must be a valid pointer or null.
fn textView_shouldChangeTextInRange_replacementString( &self, text_view: &NSTextView, affected_char_range: NSRange, replacement_string: Option<&NSString>, ) -> bool
Available on crate features
NSResponder and NSView only.Sourceunsafe fn textView_doCommandBySelector(
&self,
text_view: &NSTextView,
command_selector: Sel,
) -> bool
Available on crate features NSResponder and NSView only.
unsafe fn textView_doCommandBySelector( &self, text_view: &NSTextView, command_selector: Sel, ) -> bool
NSResponder and NSView only.§Safety
command_selector must be a valid selector.
fn textView_shouldSetSpellingState_range( &self, text_view: &NSTextView, value: NSInteger, affected_char_range: NSRange, ) -> NSInteger
Available on crate features
NSResponder and NSView only.Available on crate features
NSEvent and NSMenu and NSResponder and NSView only.Sourceunsafe fn textView_willCheckTextInRange_options_types(
&self,
view: &NSTextView,
range: NSRange,
options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>,
checking_types: NonNull<NSTextCheckingTypes>,
) -> Retained<NSDictionary<NSTextCheckingOptionKey, AnyObject>>
Available on crate features NSResponder and NSSpellChecker and NSView only.
unsafe fn textView_willCheckTextInRange_options_types( &self, view: &NSTextView, range: NSRange, options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>, checking_types: NonNull<NSTextCheckingTypes>, ) -> Retained<NSDictionary<NSTextCheckingOptionKey, AnyObject>>
NSResponder and NSSpellChecker and NSView only.§Safety
optionsgeneric should be of the correct type.checking_typesmust be a valid pointer.
Sourceunsafe 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>>
Available on crate features NSResponder and NSSpellChecker and NSView only.
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>>
NSResponder and NSSpellChecker and NSView only.§Safety
options generic should be of the correct type.
fn textView_URLForContentsOfTextAttachment_atIndex( &self, text_view: &NSTextView, text_attachment: &NSTextAttachment, char_index: NSUInteger, ) -> Option<Retained<NSURL>>
Available on crate features
NSResponder and NSTextAttachment and NSView only.Sourceunsafe fn textView_willShowSharingServicePicker_forItems(
&self,
text_view: &NSTextView,
service_picker: &NSSharingServicePicker,
items: &NSArray,
) -> Option<Retained<NSSharingServicePicker>>
Available on crate features NSResponder and NSSharingService and NSView only.
unsafe fn textView_willShowSharingServicePicker_forItems( &self, text_view: &NSTextView, service_picker: &NSSharingServicePicker, items: &NSArray, ) -> Option<Retained<NSSharingServicePicker>>
NSResponder and NSSharingService and NSView only.§Safety
items generic should be of the correct type.
fn undoManagerForTextView( &self, view: &NSTextView, ) -> Option<Retained<NSUndoManager>>
Available on crate features
NSResponder and NSView only.fn textView_shouldUpdateTouchBarItemIdentifiers( &self, text_view: &NSTextView, identifiers: &NSArray<NSTouchBarItemIdentifier>, ) -> Retained<NSArray<NSTouchBarItemIdentifier>>
Available on crate features
NSResponder and NSTouchBarItem and NSView only.fn textView_candidatesForSelectedRange( &self, text_view: &NSTextView, selected_range: NSRange, ) -> Option<Retained<NSArray>>
Available on crate features
NSResponder and NSView only.fn textView_candidates_forSelectedRange( &self, text_view: &NSTextView, candidates: &NSArray<NSTextCheckingResult>, selected_range: NSRange, ) -> Retained<NSArray<NSTextCheckingResult>>
Available on crate features
NSResponder and NSView only.fn textView_shouldSelectCandidateAtIndex( &self, text_view: &NSTextView, index: NSUInteger, ) -> bool
Available on crate features
NSResponder and NSView only.fn textViewWritingToolsWillBegin(&self, text_view: &NSTextView)
Available on crate features
NSResponder and NSView only.fn textViewWritingToolsDidEnd(&self, text_view: &NSTextView)
Available on crate features
NSResponder and NSView only.fn textView_writingToolsIgnoredRangesInEnclosingRange( &self, text_view: &NSTextView, enclosing_range: NSRange, ) -> Retained<NSArray<NSValue>>
Available on crate features
NSResponder and NSView only.Sourceunsafe fn textView_clickedOnLink(
&self,
text_view: &NSTextView,
link: Option<&AnyObject>,
) -> bool
👎Deprecated: Use -textView:clickedOnLink:atIndex: instead
Available on crate features NSResponder and NSView only.
unsafe fn textView_clickedOnLink( &self, text_view: &NSTextView, link: Option<&AnyObject>, ) -> bool
Use -textView:clickedOnLink:atIndex: instead
NSResponder and NSView only.§Safety
linkshould be of the correct type.linkmight not allowNone.
Sourceunsafe fn textView_clickedOnCell_inRect(
&self,
text_view: &NSTextView,
cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>,
cell_frame: NSRect,
)
👎Deprecated: Use -textView:clickedOnCell:inRect:atIndex: instead
Available on crate features NSResponder and NSTextAttachmentCell and NSView only.
unsafe fn textView_clickedOnCell_inRect( &self, text_view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, cell_frame: NSRect, )
Use -textView:clickedOnCell:inRect:atIndex: instead
NSResponder and NSTextAttachmentCell and NSView only.§Safety
cell might not allow None.
Sourceunsafe fn textView_doubleClickedOnCell_inRect(
&self,
text_view: &NSTextView,
cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>,
cell_frame: NSRect,
)
👎Deprecated: Use -textView:doubleClickedOnCell:inRect:atIndex: instead
Available on crate features NSResponder and NSTextAttachmentCell and NSView only.
unsafe fn textView_doubleClickedOnCell_inRect( &self, text_view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, cell_frame: NSRect, )
Use -textView:doubleClickedOnCell:inRect:atIndex: instead
NSResponder and NSTextAttachmentCell and NSView only.§Safety
cell might not allow None.
Sourceunsafe fn textView_draggedCell_inRect_event(
&self,
view: &NSTextView,
cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>,
rect: NSRect,
event: Option<&NSEvent>,
)
👎Deprecated: Use -textView:draggedCell:inRect:event:atIndex: instead
Available on crate features NSEvent and NSResponder and NSTextAttachmentCell and NSView only.
unsafe fn textView_draggedCell_inRect_event( &self, view: &NSTextView, cell: Option<&ProtocolObject<dyn NSTextAttachmentCellProtocol>>, rect: NSRect, event: Option<&NSEvent>, )
Use -textView:draggedCell:inRect:event:atIndex: instead
NSEvent and NSResponder and NSTextAttachmentCell and NSView only.§Safety
cellmight not allowNone.eventmight not allowNone.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn NSTextViewDelegate
Source§impl ProtocolType for dyn NSTextViewDelegate
impl ProtocolType for dyn NSTextViewDelegate
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl<T> NSTextViewDelegate for ProtocolObject<T>where
T: ?Sized + NSTextViewDelegate,
Implementors§
impl NSTextViewDelegate for NSOutlineView
Available on crate feature
NSOutlineView only.impl NSTextViewDelegate for NSTableView
Available on crate feature
NSTableView only.