---
name: "Gtk2::Spell"
section: "3pm"
platform: "linux"
package: "libgtk2-spell-perl"
version: "1.04-3+b1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::Spell"
---

# Gtk2::Spell(3pm)

Bindings for GtkSpell with Gtk2

## NAME

Gtk2::Spell - Bindings for GtkSpell with Gtk2

## SYNOPSIS

```
  use Gtk2;
  use Gtk2::Spell;
  $txtview = Gtk2::TextView->new;
  $spell = Gtk2::Spell->new_attach($txtview);
  $spell2 = Gtk2::Spell->get_from_text_view($txtview);
  # $spell2 will be the same object as $spell
  $spell->set_language(SOME_LANG);
  $spell->recheck_all;
  $spell->detach;
```

## ABSTRACT

```
  Perl bindings to GtkSpell, used in concert with Gtk2::TextView.
```

## DESCRIPTION

Perl bindings to GtkSpell, used in concert with Gtk2::TextView. Provides  mis-spelled word highlighting in red and offers a right click pop-up menu with suggested corrections.

## FUNCTIONS

- $spell = Gtk2::Spell-\>new(GTK2\_TEXT\_VIEW)

  - $spell = Gtk2::Spell-\>new\_attach(GTK2\_TEXT\_VIEW)

  Creates and returns a new Gtk2::Spell object attached to GTK2\_TEXT\_VIEW.

- $spell-\>set\_language(LANG\_STR)

  Sets the language which the underlying spell-checker will use. According to the  GtkSpell API reference this 'appears to be a locale specifier.'

- $spell-\>recheck\_all

  Rechecks the spelling of the entire text view buffer.

- Gtk2::Spell-\>get\_from\_text\_view(GTK2\_TEXT\_VIEW)

  Returns the Gtk2::Spell object attached to the given Gtk2::TextBuffer or undef if there isn't one attached.

- $spell-\>detach

  Detaches the Gtk2::Spell from it's associated text view.

## SEE ALSO

[*perl*(1)](/perl/1.md), *Glib*(1), *Gtk2*(1).

## AUTHOR

rwmcfa1 \<rwmcfa1@neces.com\>

## COPYRIGHT AND LICENSE

Copyright 2003 by rwmcfa1

Copyright 2003 by the gtk2-perl team.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the  Free Software Foundation, Inc., 59 Temple Place - Suite 330,  Boston, MA  02111-1307  USA.
