GtkEditable

Interface for text-editing widgets.

Object Hierarchy

GInterface
`-- GtkEditable

Implemented by

Description

This is an interface and cannot be instantiated directly.

The GtkEditable interface is an interface which should be implemented by text editing widgets, such as GtkEntry and GtkText. It contains functions for generically manipulating an editable widget, a large number of action signals used for key bindings, and several signals that an application can connect to to modify the behavior of a widget.

As an example of the latter usage, by connecting the following handler to "insert-text", an application can convert all entry into a widget into uppercase.

Methods

copy_clipboard()
  Copy the current selection into clipboard.
cut_clipboard()
  Copy the current selection into clipboard & delete.
delete_selection()
  Deletes the current contents of the selection.
delete_text()
  Deletes a sequence of characters.
get_chars()
  Retrieves a sequence of characters.
get_editable()
  If the text can be changed.
get_position()
  Retrieves the current cursor position.
get_selection_bounds()
  Gets the current selection bounds.
insert_text()
  Inserts text at a given position.
paste_clipboard()
  Paste the clipboard contents at the current cursor position.
select_region()
  Selects a part of the text.
set_editable()
  If the user can edit the text in the editable widget.
set_position()
  Sets the cursor position.

Properties

Use get_property and set_property methods to access these.

editable:
  Whether or not the widget is editable by the user.
selection_start:
  The starting position of the selected characters in the widget.
selection_end:
  The end position of the selected characters in the widget.

Signals

"changed"
  Indicates that the user has changed the contents of the widget.
"delete-text"
  Emitted when text is deleted from the widget by the user.
"insert-text"
  Emitted when text is inserted into the widget by the user.