Trait gspell::prelude::NavigatorExt
source · pub trait NavigatorExt: IsA<Navigator> + Sealed + 'static {
// Provided methods
fn change(&self, word: &str, change_to: &str) { ... }
fn change_all(&self, word: &str, change_to: &str) { ... }
fn goto_next(&self) -> Result<(GString, Checker), Error> { ... }
}
Expand description
Provided Methods§
sourcefn change(&self, word: &str, change_to: &str)
fn change(&self, word: &str, change_to: &str)
Changes the current word
by change_to
in the text. word
must be the same
as returned by the last call to goto_next()
.
This function doesn’t call CheckerExt::set_correction()
. A widget using a
Navigator
should call CheckerExt::set_correction()
in addition to
this function.
word
the word to change.
change_to
the replacement.
sourcefn change_all(&self, word: &str, change_to: &str)
fn change_all(&self, word: &str, change_to: &str)
Changes all occurrences of word
by change_to
in the text.
This function doesn’t call CheckerExt::set_correction()
. A widget using a
Navigator
should call CheckerExt::set_correction()
in addition to
this function.
word
the word to change.
change_to
the replacement.
sourcefn goto_next(&self) -> Result<(GString, Checker), Error>
fn goto_next(&self) -> Result<(GString, Checker), Error>
Goes to the next misspelled word. When called the first time, goes to the first misspelled word.
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 g_free()
to free the returned string.
spell_checker
a location to store the
Checker
used, or None
. Use g_object_unref()
when no longer
needed.