Skip to main content

WebDocumentText

Trait WebDocumentText 

Source
pub unsafe trait WebDocumentText: NSObjectProtocol {
    // Provided methods
    unsafe fn supportsTextEncoding(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn string(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    unsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>
       where Self: Sized + Message { ... }
    unsafe fn selectedString(&self) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    unsafe fn selectedAttributedString(
        &self,
    ) -> Option<Retained<NSAttributedString>>
       where Self: Sized + Message { ... }
    unsafe fn selectAll(&self)
       where Self: Sized + Message { ... }
    unsafe fn deselectAll(&self)
       where Self: Sized + Message { ... }
}
👎Deprecated
Available on crate feature WebDocument only.
Expand description

Optional protocol for supporting text operations.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn supportsTextEncoding(&self) -> bool
where Self: Sized + Message,

👎Deprecated

Returns: YES if the document view support text encoding, NO if it doesn’t.

Source

unsafe fn string(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

👎Deprecated

Returns: String that represents the entire document.

Source

unsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>
where Self: Sized + Message,

👎Deprecated

Returns: Attributed string that represents the entire document.

Source

unsafe fn selectedString(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

👎Deprecated

Returns: String that represents the current selection.

Source

unsafe fn selectedAttributedString( &self, ) -> Option<Retained<NSAttributedString>>
where Self: Sized + Message,

👎Deprecated

Returns: Attributed string that represents the current selection.

Source

unsafe fn selectAll(&self)
where Self: Sized + Message,

👎Deprecated

Selects all the text in the document.

Source

unsafe fn deselectAll(&self)
where Self: Sized + Message,

👎Deprecated

Causes a text selection to lose its selection.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn WebDocumentText

Source§

impl ProtocolType for dyn WebDocumentText

Source§

const NAME: &'static str = "WebDocumentText"

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> WebDocumentText for ProtocolObject<T>
where T: ?Sized + WebDocumentText,

Implementors§