Struct objc2_app_kit::NSSpellChecker
source · #[repr(C)]pub struct NSSpellChecker { /* private fields */ }
Available on crate feature
NSSpellChecker
only.Implementations§
source§impl NSSpellChecker
impl NSSpellChecker
pub unsafe fn uniqueSpellDocumentTag() -> NSInteger
pub unsafe fn checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount( &self, string_to_check: &NSString, starting_offset: NSInteger, language: Option<&NSString>, wrap_flag: bool, tag: NSInteger, word_count: *mut NSInteger ) -> NSRange
pub unsafe fn checkSpellingOfString_startingAt( &self, string_to_check: &NSString, starting_offset: NSInteger ) -> NSRange
pub unsafe fn countWordsInString_language( &self, string_to_count: &NSString, language: Option<&NSString> ) -> NSInteger
pub unsafe fn checkGrammarOfString_startingAt_language_wrap_inSpellDocumentWithTag_details( &self, string_to_check: &NSString, starting_offset: NSInteger, language: Option<&NSString>, wrap_flag: bool, tag: NSInteger, details: Option<&mut Option<Id<NSArray<NSDictionary<NSString, AnyObject>>>>> ) -> NSRange
pub unsafe fn checkString_range_types_options_inSpellDocumentWithTag_orthography_wordCount( &self, string_to_check: &NSString, range: NSRange, checking_types: NSTextCheckingTypes, options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>, tag: NSInteger, orthography: Option<&mut Option<Id<NSOrthography>>>, word_count: *mut NSInteger ) -> Id<NSArray<NSTextCheckingResult>>
pub unsafe fn requestCheckingOfString_range_types_options_inSpellDocumentWithTag_completionHandler( &self, string_to_check: &NSString, range: NSRange, checking_types: NSTextCheckingTypes, options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>, tag: NSInteger, completion_handler: Option<&Block<dyn Fn(NSInteger, NonNull<NSArray<NSTextCheckingResult>>, NonNull<NSOrthography>, NSInteger)>> ) -> NSInteger
Available on crate feature
block2
only.pub unsafe fn requestCandidatesForSelectedRange_inString_types_options_inSpellDocumentWithTag_completionHandler( &self, selected_range: NSRange, string_to_check: &NSString, checking_types: NSTextCheckingTypes, options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>, tag: NSInteger, completion_handler: Option<&Block<dyn Fn(NSInteger, NonNull<NSArray<NSTextCheckingResult>>)>> ) -> NSInteger
Available on crate feature
block2
only.Available on crate features
NSMenu
and NSResponder
and NSView
only.pub unsafe fn userQuotesArrayForLanguage( &self, language: &NSString ) -> Id<NSArray<NSString>>
pub unsafe fn userReplacementsDictionary( &self ) -> Id<NSDictionary<NSString, NSString>>
pub unsafe fn updateSpellingPanelWithMisspelledWord(&self, word: &NSString)
pub unsafe fn updateSpellingPanelWithGrammarString_detail( &self, string: &NSString, detail: &NSDictionary<NSString, AnyObject> )
pub unsafe fn spellingPanel(&self, mtm: MainThreadMarker) -> Id<NSPanel>
Available on crate features
NSPanel
and NSResponder
and NSWindow
only.pub unsafe fn accessoryView(&self, mtm: MainThreadMarker) -> Option<Id<NSView>>
Available on crate features
NSResponder
and NSView
only.pub unsafe fn setAccessoryView(&self, accessory_view: Option<&NSView>)
Available on crate features
NSResponder
and NSView
only.pub unsafe fn substitutionsPanel(&self, mtm: MainThreadMarker) -> Id<NSPanel>
Available on crate features
NSPanel
and NSResponder
and NSWindow
only.pub unsafe fn substitutionsPanelAccessoryViewController( &self, mtm: MainThreadMarker ) -> Option<Id<NSViewController>>
Available on crate features
NSResponder
and NSViewController
only.pub unsafe fn setSubstitutionsPanelAccessoryViewController( &self, substitutions_panel_accessory_view_controller: Option<&NSViewController> )
Available on crate features
NSResponder
and NSViewController
only.pub unsafe fn updatePanels(&self)
pub unsafe fn ignoreWord_inSpellDocumentWithTag( &self, word_to_ignore: &NSString, tag: NSInteger )
pub unsafe fn ignoredWordsInSpellDocumentWithTag( &self, tag: NSInteger ) -> Option<Id<NSArray<NSString>>>
pub unsafe fn setIgnoredWords_inSpellDocumentWithTag( &self, words: &NSArray<NSString>, tag: NSInteger )
pub unsafe fn guessesForWordRange_inString_language_inSpellDocumentWithTag( &self, range: NSRange, string: &NSString, language: Option<&NSString>, tag: NSInteger ) -> Option<Id<NSArray<NSString>>>
pub unsafe fn correctionForWordRange_inString_language_inSpellDocumentWithTag( &self, range: NSRange, string: &NSString, language: &NSString, tag: NSInteger ) -> Option<Id<NSString>>
pub unsafe fn completionsForPartialWordRange_inString_language_inSpellDocumentWithTag( &self, range: NSRange, string: &NSString, language: Option<&NSString>, tag: NSInteger ) -> Option<Id<NSArray<NSString>>>
pub unsafe fn languageForWordRange_inString_orthography( &self, range: NSRange, string: &NSString, orthography: Option<&NSOrthography> ) -> Option<Id<NSString>>
pub unsafe fn closeSpellDocumentWithTag(&self, tag: NSInteger)
pub unsafe fn recordResponse_toCorrection_forWord_language_inSpellDocumentWithTag( &self, response: NSCorrectionResponse, correction: &NSString, word: &NSString, language: Option<&NSString>, tag: NSInteger )
pub unsafe fn showCorrectionIndicatorOfType_primaryString_alternativeStrings_forStringInRect_view_completionHandler( &self, type: NSCorrectionIndicatorType, primary_string: &NSString, alternative_strings: &NSArray<NSString>, rect_of_typed_string: NSRect, view: &NSView, completion_block: Option<&Block<dyn Fn(*mut NSString)>> )
Available on crate features
NSResponder
and NSView
and block2
only.pub unsafe fn dismissCorrectionIndicatorForView(&self, view: &NSView)
Available on crate features
NSResponder
and NSView
only.pub unsafe fn showInlinePredictionForCandidates_client( &self, candidates: &NSArray<NSTextCheckingResult>, client: &ProtocolObject<dyn NSTextInputClient> )
Available on crate feature
NSTextInputClient
only.pub unsafe fn preventsAutocorrectionBeforeString_language( &self, string: &NSString, language: Option<&NSString> ) -> bool
pub unsafe fn deletesAutospaceBetweenString_andString_language( &self, preceding_string: &NSString, following_string: &NSString, language: Option<&NSString> ) -> bool
pub unsafe fn availableLanguages(&self) -> Id<NSArray<NSString>>
pub unsafe fn userPreferredLanguages(&self) -> Id<NSArray<NSString>>
pub unsafe fn automaticallyIdentifiesLanguages(&self) -> bool
pub unsafe fn setAutomaticallyIdentifiesLanguages( &self, automatically_identifies_languages: bool )
pub unsafe fn setWordFieldStringValue(&self, string: &NSString)
pub unsafe fn learnWord(&self, word: &NSString)
pub unsafe fn hasLearnedWord(&self, word: &NSString) -> bool
pub unsafe fn unlearnWord(&self, word: &NSString)
pub unsafe fn isAutomaticTextReplacementEnabled() -> bool
pub unsafe fn isAutomaticSpellingCorrectionEnabled() -> bool
pub unsafe fn isAutomaticQuoteSubstitutionEnabled() -> bool
pub unsafe fn isAutomaticDashSubstitutionEnabled() -> bool
pub unsafe fn isAutomaticCapitalizationEnabled() -> bool
pub unsafe fn isAutomaticPeriodSubstitutionEnabled() -> bool
pub unsafe fn isAutomaticTextCompletionEnabled() -> bool
pub unsafe fn isAutomaticInlinePredictionEnabled() -> bool
pub unsafe fn language(&self) -> Id<NSString>
pub unsafe fn setLanguage(&self, language: &NSString) -> bool
source§impl NSSpellChecker
impl NSSpellChecker
Methods declared on superclass NSObject
source§impl NSSpellChecker
impl NSSpellChecker
NSDeprecated
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature NSAccessibilityConstants
only.
pub fn class(&self) -> &'static AnyClass
NSAccessibilityConstants
only.Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.NSAccessibilityConstants
only.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.Available on crate feature NSAccessibilityConstants
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.NSAccessibilityConstants
only.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl AsMut<AnyObject> for NSSpellChecker
impl AsMut<AnyObject> for NSSpellChecker
source§impl AsMut<NSObject> for NSSpellChecker
impl AsMut<NSObject> for NSSpellChecker
source§impl AsMut<NSSpellChecker> for NSSpellChecker
impl AsMut<NSSpellChecker> for NSSpellChecker
source§impl AsRef<AnyObject> for NSSpellChecker
impl AsRef<AnyObject> for NSSpellChecker
source§impl AsRef<NSObject> for NSSpellChecker
impl AsRef<NSObject> for NSSpellChecker
source§impl AsRef<NSSpellChecker> for NSSpellChecker
impl AsRef<NSSpellChecker> for NSSpellChecker
source§impl Borrow<AnyObject> for NSSpellChecker
impl Borrow<AnyObject> for NSSpellChecker
source§impl Borrow<NSObject> for NSSpellChecker
impl Borrow<NSObject> for NSSpellChecker
source§impl BorrowMut<AnyObject> for NSSpellChecker
impl BorrowMut<AnyObject> for NSSpellChecker
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for NSSpellChecker
impl BorrowMut<NSObject> for NSSpellChecker
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl ClassType for NSSpellChecker
impl ClassType for NSSpellChecker
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "NSSpellChecker"
const NAME: &'static str = "NSSpellChecker"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl Debug for NSSpellChecker
impl Debug for NSSpellChecker
source§impl Deref for NSSpellChecker
impl Deref for NSSpellChecker
source§impl DerefMut for NSSpellChecker
impl DerefMut for NSSpellChecker
source§impl Hash for NSSpellChecker
impl Hash for NSSpellChecker
source§impl NSObjectProtocol for NSSpellChecker
impl NSObjectProtocol for NSSpellChecker
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Id<NSObject>
fn debugDescription(&self) -> Id<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl PartialEq for NSSpellChecker
impl PartialEq for NSSpellChecker
source§fn eq(&self, other: &NSSpellChecker) -> bool
fn eq(&self, other: &NSSpellChecker) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RefEncode for NSSpellChecker
impl RefEncode for NSSpellChecker
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for NSSpellChecker
impl Message for NSSpellChecker
impl StructuralPartialEq for NSSpellChecker
Auto Trait Implementations§
impl !Freeze for NSSpellChecker
impl !RefUnwindSafe for NSSpellChecker
impl !Send for NSSpellChecker
impl !Sync for NSSpellChecker
impl !Unpin for NSSpellChecker
impl !UnwindSafe for NSSpellChecker
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self
if the type has no
mutable counterpart. Read more