A gtkspellmm example program.
A gtkspellmm example program.
#include <gtkmm.h>
#include <gtkspellmm.h>
int main(int argc, char **argv)
{
"org.gtkmm.examples.gtkspell");
Gtk::Label label(
"Type some text into the text box.\n"
"Try misspelling some words. Then right-click on them.");
try {
label.
set_text(Glib::ustring(
"GtkSpell initialization failed.\n") + e.what());
}
window.
set_title(
"Simple GtkSpell Demonstration");
return app->run(window);
}
bool attach(Gtk::TextView &view)
Attach the GtkSpell::Checker to the specified Gtk::TextView.
void set_language(const Glib::ustring &lang)
Sets the language to be used for spelling, throws an exception on failure.
static Glib::RefPtr< Application > create(const Glib::ustring &application_id=Glib::ustring(), Gio::ApplicationFlags flags=Gio::APPLICATION_FLAGS_NONE)
void pack_start(Widget &child, bool expand, bool fill, guint padding=0)
void set_border_width(guint border_width)
virtual void add(Widget &widget)
void set_text(const Glib::ustring &str)
void set_wrap_mode(WrapMode wrap_mode)
void set_title(const Glib::ustring &title)
void set_default_size(int width, int height)
void init()
Initializes the GtkSpell library.