Top |
GtkTextBuffer * | buffer | Read / Write / Construct Only |
GspellChecker * | spell-checker | Read / Write |
GspellTextBuffer extends the GtkTextBuffer class but without subclassing it, because the GtkSourceView library has already a GtkTextBuffer subclass.
The syntax highlighting engine of the GtkSourceView library has a feature called “context classes”. One of the standard context classes is “no-spell-check”: it defines the regions in the GtkTextBuffer that should not be spell-checked.
GtkSourceView creates a GtkTextTag named
"gtksourceview:context-classes:no-spell-check"
. gspell reads this tag, to
skip the text contained within the tag.
If you use the GtkSourceView library in your application, keep in mind that the GtkTextTag created by GtkSourceView is for read-only purposes; you cannot apply it yourself to other regions.
On the other hand if the GtkSourceView library is not used, you can create a GtkTextTag with the same name to mark certain regions in the text that gspell should skip. As it is not a great API, it is planned to add an explicit API in GspellTextBuffer to set a GtkTextTag that gspell should skip.
See the class description of GtkSourceBuffer for more information about context classes.
GspellTextBuffer *
gspell_text_buffer_get_from_gtk_text_buffer
(GtkTextBuffer *gtk_buffer
);
Returns the GspellTextBuffer of gtk_buffer
. The returned object is
guaranteed to be the same for the lifetime of gtk_buffer
.
GtkTextBuffer *
gspell_text_buffer_get_buffer (GspellTextBuffer *gspell_buffer
);
GspellChecker *
gspell_text_buffer_get_spell_checker (GspellTextBuffer *gspell_buffer
);
void gspell_text_buffer_set_spell_checker (GspellTextBuffer *gspell_buffer
,GspellChecker *spell_checker
);
Sets a GspellChecker to a GspellTextBuffer. The gspell_buffer
will own a
reference to spell_checker
, so you can release your reference to
spell_checker
if you no longer need it.
gspell_buffer |
||
spell_checker |
a GspellChecker, or |
[nullable] |
“buffer”
property“buffer” GtkTextBuffer *
The GtkTextBuffer.
Owner: GspellTextBuffer
Flags: Read / Write / Construct Only
“spell-checker”
property“spell-checker” GspellChecker *
The GspellChecker.
Owner: GspellTextBuffer
Flags: Read / Write