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§
Sourceunsafe fn supportsTextEncoding(&self) -> bool
👎Deprecated
unsafe fn supportsTextEncoding(&self) -> bool
Returns: YES if the document view support text encoding, NO if it doesn’t.
Sourceunsafe fn string(&self) -> Option<Retained<NSString>>
👎Deprecated
unsafe fn string(&self) -> Option<Retained<NSString>>
Returns: String that represents the entire document.
Sourceunsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>
👎Deprecated
unsafe fn attributedString(&self) -> Option<Retained<NSAttributedString>>
Returns: Attributed string that represents the entire document.
Sourceunsafe fn selectedString(&self) -> Option<Retained<NSString>>
👎Deprecated
unsafe fn selectedString(&self) -> Option<Retained<NSString>>
Returns: String that represents the current selection.
Sourceunsafe fn selectedAttributedString(
&self,
) -> Option<Retained<NSAttributedString>>
👎Deprecated
unsafe fn selectedAttributedString( &self, ) -> Option<Retained<NSAttributedString>>
Returns: Attributed string that represents the current selection.
Sourceunsafe fn deselectAll(&self)
👎Deprecated
unsafe fn deselectAll(&self)
Causes a text selection to lose its selection.