gtkspellmm
3.0.5
|
#include <gtkspellmm/gtkspell.h>
Public Member Functions | |
Checker (Checker&& src) noexcept | |
Checker& | operator= (Checker&& src) noexcept |
virtual | ~Checker () noexcept |
GtkSpellChecker* | gobj () |
Provides access to the underlying C GObject. More... | |
const GtkSpellChecker* | gobj () const |
Provides access to the underlying C GObject. More... | |
GtkSpellChecker* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Checker () | |
Constructs a new GtkSpell::Checker object. More... | |
bool | attach (Gtk::TextView& view) |
Attach the GtkSpell::Checker to the specified Gtk::TextView. More... | |
void | detach () |
Detaches the Gtk::SpellChecker. More... | |
std::vector< Glib::ustring > | get_suggestions (const Glib::ustring& word) |
Retreives a list of spelling suggestions for the specified word. More... | |
Gtk::Menu* | get_suggestions_menu (Gtk::TextIter& iter) |
Retreives a Gtk::Menu of replacement spellings. More... | |
void | set_language (const Glib::ustring& lang) |
Sets the language to be used for spelling, throws an exception on failure. More... | |
Glib::ustring | get_language () |
Gets the language currently being used for spelling. More... | |
bool | check_word (const Glib::ustring& word) |
Check the specified word. More... | |
void | recheck_all () |
Rechecks the entire text buffer. More... | |
void | add_to_dictionary (const Glib::ustring& word) |
Add the specified word to the user dictionary. More... | |
void | ignore_word (const Glib::ustring& word) |
Add the specified word to the user ignore list. More... | |
Glib::SignalProxy1< void, const Glib::ustring& > | signal_language_changed () |
This signal is emitted when a new language is selected from the context menu. More... | |
Glib::PropertyProxy< bool > | property_decode_language_codes () |
Whether to show decoded language codes in the context menu (requires the iso-codes package). More... | |
Glib::PropertyProxy_ReadOnly< bool > | property_decode_language_codes () const |
Whether to show decoded language codes in the context menu (requires the iso-codes package). More... | |
Public Member Functions inherited from Glib::Object | |
Object (const Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&src) noexcept | |
Object & | operator= (Object &&src) noexcept |
void * | get_data (const QueryQuark &key) |
void | set_data (const Quark &key, void *data) |
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
void | remove_data (const QueryQuark &quark) |
void * | steal_data (const QueryQuark &quark) |
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
Public Member Functions inherited from Glib::ObjectBase | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
Public Member Functions inherited from sigc::trackable | |
trackable () noexcept | |
trackable (const trackable &src) noexcept | |
trackable (trackable &&src) | |
~trackable () | |
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const |
void | notify_callbacks () |
trackable & | operator= (const trackable &src) |
trackable & | operator= (trackable &&src) |
void | remove_destroy_notify_callback (void *data) const |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Glib::RefPtr< Checker > | get_from_text_view (Gtk::TextView& view) |
Retreives the GtkSpell::Checker attached to a Gtk::TextView. More... | |
static std::vector< Glib::ustring > | get_language_list () |
Gets the list of available languages. More... | |
static Glib::ustring | decode_language_code (const Glib::ustring& lang) |
Translates the language code to a human readable format (i.e. More... | |
Protected Member Functions | |
virtual void | on_language_changed (const Glib::ustring& newlang) |
This is a default handler for the signal signal_language_changed(). More... | |
Protected Member Functions inherited from Glib::Object | |
Object () | |
Object (const Glib::ConstructParams &construct_params) | |
Object (GObject *castitem) | |
virtual | ~Object () noexcept |
Protected Member Functions inherited from Glib::ObjectBase | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< GtkSpell::Checker > | wrap (GtkSpellChecker* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
Public Types inherited from Glib::Object | |
typedef void(* | DestroyNotify) (gpointer data) |
Public Types inherited from sigc::trackable | |
typedef internal::func_destroy_notify | func_destroy_notify |
|
noexcept |
|
virtualnoexcept |
GtkSpell::Checker::Checker | ( | ) |
Constructs a new GtkSpell::Checker object.
void GtkSpell::Checker::add_to_dictionary | ( | const Glib::ustring & | word | ) |
Add the specified word to the user dictionary.
word | The word to add to the user dictionary. |
bool GtkSpell::Checker::attach | ( | Gtk::TextView & | view | ) |
Attach the GtkSpell::Checker to the specified Gtk::TextView.
view | A Gtk::TextView |
bool GtkSpell::Checker::check_word | ( | const Glib::ustring & | word | ) |
Check the specified word.
word | The word to check. |
|
static |
Translates the language code to a human readable format (i.e.
"en_US" -> "English (United States)").
lang | The language locale specifier (i.e. "en", or "en_US"). |
void GtkSpell::Checker::detach | ( | ) |
Detaches the Gtk::SpellChecker.
If the Gtk::SpellChecker is not attached to any Gtk::TextView, the function silently exits
|
static |
Retreives the GtkSpell::Checker attached to a Gtk::TextView.
view | A Gtk::TextView |
null
Glib::RefPtr Glib::ustring GtkSpell::Checker::get_language | ( | ) |
Gets the language currently being used for spelling.
|
static |
std::vector<Glib::ustring> GtkSpell::Checker::get_suggestions | ( | const Glib::ustring & | word | ) |
Retreives a list of spelling suggestions for the specified word.
word | The word for which to fetch suggestions |
Gtk::Menu* GtkSpell::Checker::get_suggestions_menu | ( | Gtk::TextIter & | iter | ) |
Retreives a Gtk::Menu of replacement spellings.
iter | A Gtk::TextIter position in the buffer to be corrected |
null
if the word is not misspelt
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GtkSpellChecker* GtkSpell::Checker::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void GtkSpell::Checker::ignore_word | ( | const Glib::ustring & | word | ) |
Add the specified word to the user ignore list.
word | The word to add to the user ignore list. |
|
protectedvirtual |
This is a default handler for the signal signal_language_changed().
Glib::PropertyProxy< bool > GtkSpell::Checker::property_decode_language_codes | ( | ) |
Whether to show decoded language codes in the context menu (requires the iso-codes package).
Whether to show decoded language codes in the context menu (requires the iso-codes package).
Glib::PropertyProxy_ReadOnly< bool > GtkSpell::Checker::property_decode_language_codes | ( | ) | const |
Whether to show decoded language codes in the context menu (requires the iso-codes package).
void GtkSpell::Checker::recheck_all | ( | ) |
Rechecks the entire text buffer.
void GtkSpell::Checker::set_language | ( | const Glib::ustring & | lang | ) |
Sets the language to be used for spelling, throws an exception on failure.
lang | The language, as a locale specifier (i.e. "en", or "en_US") |
Gtk::Error | An exception describing the error occured |
Glib::SignalProxy1< void,const Glib::ustring& > GtkSpell::Checker::signal_language_changed | ( | ) |
This signal is emitted when a new language is selected from the context menu.
newlang | The new spelling language |
void on_my_language_changed(const Glib::ustring& newlang)
The signal_language_changed() signal is emitted when the user selects a new spelling language from the context menu.
newlang | The new language which was selected. |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |