Gspell.Checker¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
  | 
|
  | 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/c  | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Emitted when the session dictionary is cleared.  | 
|
Emitted when a word is added to the personal dictionary.  | 
|
Emitted when a word is added to the session dictionary.  | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class Gspell.Checker(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod new(language)¶
 - Parameters:
 language (
Gspell.LanguageorNone) – theGspell.Languageto use, orNone.- Returns:
 a new
Gspell.Checkerobject.- Return type:
 
Creates a new
Gspell.Checker. If language isNone, the default language is picked withGspell.Language.get_default().
- add_word_to_personal(word, word_length)¶
 - Parameters:
 
Adds a word to the personal dictionary. It is typically saved in the user’s home directory.
- add_word_to_session(word, word_length)¶
 - Parameters:
 
Adds a word to the session dictionary. Each
Gspell.Checkerinstance has a different session dictionary. The session dictionary is lost when theGspell.Checker:languageproperty changes or when self is destroyed or whenGspell.Checker.clear_session() is called.This function is typically called for an “Ignore All” action.
- check_word(word, word_length)¶
 - Parameters:
 - Raises:
 - Returns:
 - Return type:
 
If the
Gspell.Checker:languageisNone, i.e. when no dictonaries are available, this function returnsTrueto limit the damage.
- clear_session()¶
 Clears the session dictionary.
- get_language()¶
 - Returns:
 the
Gspell.Languagecurrently used, orNoneif no dictionaries are available.- Return type:
 
- get_suggestions(word, word_length)¶
 - Parameters:
 - Returns:
 the list of suggestions.
- Return type:
 [
str]
Gets the suggestions for word. Free the return value with g_slist_free_full(suggestions,
GLib.free).
- set_correction(word, word_length, replacement, replacement_length)¶
 - Parameters:
 
Informs the spell checker that word is replaced/corrected by replacement.
- set_language(language)¶
 - Parameters:
 language (
Gspell.LanguageorNone) – theGspell.Languageto use, orNone.
Sets the language to use for the spell checking. If language is
None, the default language is picked withGspell.Language.get_default().
- do_session_cleared() virtual¶
 
Signal Details¶
- Gspell.Checker.signals.session_cleared(checker)¶
 - Signal Name:
 session-cleared- Flags:
 - Parameters:
 checker (
Gspell.Checker) – The object which received the signal
Emitted when the session dictionary is cleared.
- Gspell.Checker.signals.word_added_to_personal(checker, word)¶
 - Signal Name:
 word-added-to-personal- Flags:
 - Parameters:
 checker (
Gspell.Checker) – The object which received the signalword (
str) – the added word.
Emitted when a word is added to the personal dictionary.
- Gspell.Checker.signals.word_added_to_session(checker, word)¶
 - Signal Name:
 word-added-to-session- Flags:
 - Parameters:
 checker (
Gspell.Checker) – The object which received the signalword (
str) – the added word.
Emitted when a word is added to the session dictionary. See
Gspell.Checker.add_word_to_session().
Property Details¶
- Gspell.Checker.props.language¶
 - Name:
 language- Type:
 - Default Value:
 - Flags:
 
The
Gspell.Languageused.