Top |
gboolean | gspell_navigator_goto_next () |
void | gspell_navigator_change () |
void | gspell_navigator_change_all () |
GspellNavigator is an interface to navigate through misspelled words, and correct the mistakes.
It is used by widgets like GspellCheckerDialog. The purpose is to spell-check a document one word at a time.
It is not mandatory to navigate through all the text. Depending on the context, an implementation could spell-check only the current page, or the selection, etc.
For GtkTextView, see the GspellNavigatorTextView implementation of this interface.
The GspellNavigator interface requires GInitiallyUnowned because a
GspellNavigator object is meant to be passed as an argument to a GtkWidget
constructor, for example gspell_checker_dialog_new()
. This permits to
decouple the frontend from the backend, making the GtkWidget re-usable for
different GspellNavigator's.
gboolean gspell_navigator_goto_next (GspellNavigator *navigator
,gchar **word
,GspellChecker **spell_checker
,GError **error
);
Goes to the next misspelled word. When called the first time, goes to the first misspelled word.
navigator |
||
word |
a location to store an allocated string, or |
[out][optional] |
spell_checker |
a location to store the
GspellChecker used, or |
[out][optional][transfer full] |
error |
[out][optional] |
void gspell_navigator_change (GspellNavigator *navigator
,const gchar *word
,const gchar *change_to
);
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
GspellNavigator should call gspell_checker_set_correction()
in addition to
this function.
void gspell_navigator_change_all (GspellNavigator *navigator
,const gchar *word
,const gchar *change_to
);
Changes all occurrences of word
by change_to
in the text.
This function doesn't call gspell_checker_set_correction()
. A widget using a
GspellNavigator should call gspell_checker_set_correction()
in addition to
this function.