Gspell.Navigator

g GObject.GInterface GObject.GInterface Gspell.Navigator Gspell.Navigator GObject.GInterface->Gspell.Navigator

Implementations:

Gspell.NavigatorTextView

Methods

change (word, change_to)

change_all (word, change_to)

goto_next ()

Virtual Methods

do_change (word, change_to)

do_change_all (word, change_to)

do_goto_next ()

Properties

None

Signals

None

Fields

None

Class Details

class Gspell.Navigator
Bases:

GObject.GInterface

Structure:

Gspell.NavigatorInterface

change(word, change_to)
Parameters:
  • word (str) – the word to change.

  • change_to (str) – the replacement.

Changes the current word by change_to in the text. word must be the same as returned by the last call to Gspell.Navigator.goto_next().

This function doesn’t call Gspell.Checker.set_correction(). A widget using a Gspell.Navigator should call Gspell.Checker.set_correction() in addition to this function.

change_all(word, change_to)
Parameters:
  • word (str) – the word to change.

  • change_to (str) – the replacement.

Changes all occurrences of word by change_to in the text.

This function doesn’t call Gspell.Checker.set_correction(). A widget using a Gspell.Navigator should call Gspell.Checker.set_correction() in addition to this function.

goto_next()
Raises:

GLib.Error

Returns:

True if a next misspelled word has been found, False if the spell checking is finished or if an error occurred.

word:

a location to store an allocated string, or None. Use GLib.free() to free the returned string.

spell_checker:

a location to store the Gspell.Checker used, or None. Use GObject.Object.unref() when no longer needed.

Return type:

(bool, word: str, spell_checker: Gspell.Checker)

Goes to the next misspelled word. When called the first time, goes to the first misspelled word.

do_change(word, change_to) virtual
Parameters:
  • word (str) – the word to change.

  • change_to (str) – the replacement.

Changes the current word by change_to in the text. word must be the same as returned by the last call to Gspell.Navigator.goto_next().

This function doesn’t call Gspell.Checker.set_correction(). A widget using a Gspell.Navigator should call Gspell.Checker.set_correction() in addition to this function.

do_change_all(word, change_to) virtual
Parameters:
  • word (str) – the word to change.

  • change_to (str) – the replacement.

Changes all occurrences of word by change_to in the text.

This function doesn’t call Gspell.Checker.set_correction(). A widget using a Gspell.Navigator should call Gspell.Checker.set_correction() in addition to this function.

do_goto_next() virtual
Returns:

True if a next misspelled word has been found, False if the spell checking is finished or if an error occurred.

word:

a location to store an allocated string, or None. Use GLib.free() to free the returned string.

spell_checker:

a location to store the Gspell.Checker used, or None. Use GObject.Object.unref() when no longer needed.

Return type:

(bool, word: str, spell_checker: Gspell.Checker)

Goes to the next misspelled word. When called the first time, goes to the first misspelled word.