Gspell.TextView¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
|||
r/w  | 
|||
r/w/co  | 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class Gspell.TextView(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod get_from_gtk_text_view(gtk_view)¶
 - Parameters:
 gtk_view (
Gtk.TextView) – aGtk.TextView.- Returns:
 the
Gspell.TextViewof gtk_view.- Return type:
 
Returns the
Gspell.TextViewof gtk_view. The returned object is guaranteed to be the same for the lifetime of gtk_view.
- basic_setup()¶
 This function is a convenience function that does the following:
Set a spell checker. The language chosen is the one returned by
Gspell.Language.get_default().Set the
Gspell.TextView:inline-spell-checkingproperty toTrue.Set the
Gspell.TextView:enable-language-menuproperty toTrue.
Example:
GtkTextView *gtk_view; GspellTextView *gspell_view; gspell_view = gspell_text_view_get_from_gtk_text_view (gtk_view); gspell_text_view_basic_setup (gspell_view);
This is equivalent to:
GtkTextView *gtk_view; GspellTextView *gspell_view; GspellChecker *checker; GtkTextBuffer *gtk_buffer; GspellTextBuffer *gspell_buffer; checker = gspell_checker_new (NULL); gtk_buffer = gtk_text_view_get_buffer (gtk_view); gspell_buffer = gspell_text_buffer_get_from_gtk_text_buffer (gtk_buffer); gspell_text_buffer_set_spell_checker (gspell_buffer, checker); g_object_unref (checker); gspell_view = gspell_text_view_get_from_gtk_text_view (gtk_view); gspell_text_view_set_inline_spell_checking (gspell_view, TRUE); gspell_text_view_set_enable_language_menu (gspell_view, TRUE);
New in version 1.2.
- Returns:
 whether the language context menu is enabled.
- Return type:
 
New in version 1.2.
- get_inline_spell_checking()¶
 - Returns:
 whether the inline spell checking is enabled.
- Return type:
 
- get_view()¶
 - Returns:
 the
Gtk.TextViewof self.- Return type:
 
- Parameters:
 enable_language_menu (
bool) – whether to enable the language context menu.
Sets whether to enable the language context menu. If enabled, doing a right click on the
Gtk.TextViewwill show a sub-menu to choose the language for the spell checking. If another language is chosen, it changes theGspell.Checker:languageproperty of theGspell.TextBuffer:spell-checkerof theGtk.TextView:bufferof theGspell.TextView:view.New in version 1.2.
Property Details¶
- 
When the context menu is shown, whether to add a sub-menu to select the language for the spell checking.
New in version 1.2.
 
- Gspell.TextView.props.inline_spell_checking¶
 - 
Whether the inline spell checking is enabled.
 
- Gspell.TextView.props.view¶
 - Name:
 view- Type:
 - Default Value:
 - Flags:
 
The
Gtk.TextView.