Skip to main content

NSTextSelectionDataSource

Trait NSTextSelectionDataSource 

Source
pub unsafe trait NSTextSelectionDataSource: NSObjectProtocol {
    // Provided methods
    fn documentRange(&self) -> Retained<NSTextRange>
       where Self: Sized + Message { ... }
    fn enumerateSubstringsFromLocation_options_usingBlock(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        options: NSStringEnumerationOptions,
        block: &DynBlock<dyn Fn(*mut NSString, NonNull<NSTextRange>, *mut NSTextRange, NonNull<Bool>) + '_>,
    )
       where Self: Sized + Message { ... }
    fn textRangeForSelectionGranularity_enclosingLocation(
        &self,
        selection_granularity: NSTextSelectionGranularity,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> Option<Retained<NSTextRange>>
       where Self: Sized + Message { ... }
    fn locationFromLocation_withOffset(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        offset: NSInteger,
    ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
       where Self: Sized + Message { ... }
    fn offsetFromLocation_toLocation(
        &self,
        from: &ProtocolObject<dyn NSTextLocation>,
        to: &ProtocolObject<dyn NSTextLocation>,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    fn baseWritingDirectionAtLocation(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> NSTextSelectionNavigationWritingDirection
       where Self: Sized + Message { ... }
    fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        block: &DynBlock<dyn Fn(CGFloat, NonNull<ProtocolObject<dyn NSTextLocation>>, Bool, NonNull<Bool>) + '_>,
    )
       where Self: Sized + Message { ... }
    fn lineFragmentRangeForPoint_inContainerAtLocation(
        &self,
        point: CGPoint,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> Option<Retained<NSTextRange>>
       where Self: Sized + Message { ... }
    fn enumerateContainerBoundariesFromLocation_reverse_usingBlock(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
        reverse: bool,
        block: &DynBlock<dyn Fn(NonNull<ProtocolObject<dyn NSTextLocation>>, NonNull<Bool>) + '_>,
    )
       where Self: Sized + Message { ... }
    fn textLayoutOrientationAtLocation(
        &self,
        location: &ProtocolObject<dyn NSTextLocation>,
    ) -> NSTextSelectionNavigationLayoutOrientation
       where Self: Sized + Message { ... }
}
Available on crate feature NSTextSelectionNavigation only.
Expand description

Provided Methods§

Source

fn documentRange(&self) -> Retained<NSTextRange>
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn enumerateSubstringsFromLocation_options_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, options: NSStringEnumerationOptions, block: &DynBlock<dyn Fn(*mut NSString, NonNull<NSTextRange>, *mut NSTextRange, NonNull<Bool>) + '_>, )
where Self: Sized + Message,

Available on crate features block2 and NSTextRange only.
Source

fn textRangeForSelectionGranularity_enclosingLocation( &self, selection_granularity: NSTextSelectionGranularity, location: &ProtocolObject<dyn NSTextLocation>, ) -> Option<Retained<NSTextRange>>
where Self: Sized + Message,

Available on crate features NSTextRange and NSTextSelection only.
Source

fn locationFromLocation_withOffset( &self, location: &ProtocolObject<dyn NSTextLocation>, offset: NSInteger, ) -> Option<Retained<ProtocolObject<dyn NSTextLocation>>>
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn offsetFromLocation_toLocation( &self, from: &ProtocolObject<dyn NSTextLocation>, to: &ProtocolObject<dyn NSTextLocation>, ) -> NSInteger
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn baseWritingDirectionAtLocation( &self, location: &ProtocolObject<dyn NSTextLocation>, ) -> NSTextSelectionNavigationWritingDirection
where Self: Sized + Message,

Available on crate feature NSTextRange only.
Source

fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, block: &DynBlock<dyn Fn(CGFloat, NonNull<ProtocolObject<dyn NSTextLocation>>, Bool, NonNull<Bool>) + '_>, )
where Self: Sized + Message,

Available on crate features block2 and NSTextRange and objc2-core-foundation only.
Source

fn lineFragmentRangeForPoint_inContainerAtLocation( &self, point: CGPoint, location: &ProtocolObject<dyn NSTextLocation>, ) -> Option<Retained<NSTextRange>>
where Self: Sized + Message,

Available on crate features NSTextRange and objc2-core-foundation only.
Source

fn enumerateContainerBoundariesFromLocation_reverse_usingBlock( &self, location: &ProtocolObject<dyn NSTextLocation>, reverse: bool, block: &DynBlock<dyn Fn(NonNull<ProtocolObject<dyn NSTextLocation>>, NonNull<Bool>) + '_>, )
where Self: Sized + Message,

Available on crate features block2 and NSTextRange only.
Source

fn textLayoutOrientationAtLocation( &self, location: &ProtocolObject<dyn NSTextLocation>, ) -> NSTextSelectionNavigationLayoutOrientation
where Self: Sized + Message,

Available on crate feature NSTextRange only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSTextSelectionDataSource

Source§

impl ProtocolType for dyn NSTextSelectionDataSource

Source§

const NAME: &'static str = "NSTextSelectionDataSource"

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NSTextSelectionDataSource for ProtocolObject<T>

Implementors§

Source§

impl NSTextSelectionDataSource for NSTextLayoutManager

Available on crate feature NSTextLayoutManager only.