gtkspellmm  3.0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
GtkSpell::Checker Class Reference

#include <gtkspellmm/gtkspell.h>

Inheritance diagram for GtkSpell::Checker:
Inheritance graph
[legend]

Public Member Functions

virtual ~Checker ()
 
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...
 
Gtk::Menuget_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...
 
void recheck_all ()
 Rechecks the entire text buffer. 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...
 

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< Checkerget_from_text_view (Gtk::TextView& view)
 Retreives the GtkSpell::Checker attached to a Gtk::TextView. 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...
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< GtkSpell::Checkerwrap (GtkSpellChecker* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Additional Inherited Members

- Public Types inherited from sigc::trackable
typedef
internal::func_destroy_notify 
func_destroy_notify
 

Detailed Description

Examples:
example/example.cc.

Constructor & Destructor Documentation

virtual GtkSpell::Checker::~Checker ( )
virtual
GtkSpell::Checker::Checker ( )

Constructs a new GtkSpell::Checker object.

Member Function Documentation

bool GtkSpell::Checker::attach ( Gtk::TextView view)

Attach the GtkSpell::Checker to the specified Gtk::TextView.

Parameters
viewA Gtk::TextView
Returns
Whether the operation succeded
Examples:
example/example.cc.
void GtkSpell::Checker::detach ( )

Detaches the Gtk::SpellChecker.

If the Gtk::SpellChecker is not attached to any Gtk::TextView, the function silently exits

static Glib::RefPtr<Checker> GtkSpell::Checker::get_from_text_view ( Gtk::TextView view)
static

Retreives the GtkSpell::Checker attached to a Gtk::TextView.

Parameters
viewA Gtk::TextView
Returns
A Glib::RefPtr to the attached Gtk::SpellChecker, if any, otherwise a null Glib::RefPtr
Glib::ustring GtkSpell::Checker::get_language ( )

Gets the language currently being used for spelling.

Returns
The language, as a locale specifier (i.e. "en", or "en_US")
Gtk::Menu* GtkSpell::Checker::get_suggestions_menu ( Gtk::TextIter iter)

Retreives a Gtk::Menu of replacement spellings.

Parameters
iterA Gtk::TextIter position in the buffer to be corrected
Returns
A pointer to a Gtk::Menu, or null if the word is not misspelt
static GType GtkSpell::Checker::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

GtkSpellChecker* GtkSpell::Checker::gobj ( )
inline

Provides access to the underlying C GObject.

const GtkSpellChecker* GtkSpell::Checker::gobj ( ) const
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.

virtual void GtkSpell::Checker::on_language_changed ( const Glib::ustring newlang)
protectedvirtual

This is a default handler for the signal signal_language_changed().

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.

Parameters
langThe language, as a locale specifier (i.e. "en", or "en_US")
Exceptions
Gtk::ErrorAn exception describing the error occured
Examples:
example/example.cc.
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.

Parameters
newlangThe new spelling language
Slot Prototype:
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.

Parameters
langThe new language which was selected.

Friends And Related Function Documentation

Glib::RefPtr< GtkSpell::Checker > wrap ( GtkSpellChecker *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.