Next: , Previous: cell-layout, Up: Gtk+ Interfaces


6.3.6 editable

— Class: editable

The editable interface is an interface which should be implemented by text editing widgets, such as entry. 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.

Slots:

Signals:

— Method: editable-select-region
     (editable-select-region editable start end)

Selects a region of text in editable. The characters that are selected are those characters at positions from start (an integer) up to, but not including end (an integer). If end is negative, then the the characters selected are those characters from start to the end of the text.

Note that positions are specified in characters, not bytes.

— Method: editable-selection
     (editable-selection editable) => (values selected-p start end)

Retrieves the selection bounds of the editable. selected-p is a boolean specifying whether there is a selection, start is the start of the selection and end is the end of the selection. If no text was selected, start and end will be identical and selected-p will be NIL.

Note that positions are specified in characters, not bytes.

— Method: editable-insert-text
     (editable-insert-text editable text position) => new-position

Inserts the text (a string) into the contents of the editable, at position specified by position (an integer). Returns the position after the inserted text.

Note that the position is in characters, not in bytes.

— Method: editable-delete-text
     (editable-delete-text editable start end)

Deletes a sequence of characters. The characters that are deleted are those characters at positions from start up to, but not including end. If end is negative, then the the characters deleted are those from start to the end of the text.

Note that the positions are specified in characters, not bytes.

— Method: editable-get-chars
     (editable-get-chars editable &key (start 0) (end -1)) => string

Retrieves a substring from editable contents. The characters that are retrieved are those characters at positions from start up to, but not including end. If end is negative, then the the characters retrieved are those characters from start to the end of the text.

— Method: editable-cut-clipboard
     (editable-cut-clipboard editable)

Removes the contents of the currently selected content in the editable and puts it on the clipboard.

— Method: editable-copy-clipboard
     (editable-copy-clipboard editable)

Copies the contents of the currently selected content in the editable and puts it on the clipboard.

— Method: editable-paste-clipboard
     (editable-paste-clipboard editable)

Pastes the content of the clipboard to the current position of the cursor in the editable.