org.gnome.gtk

## Interface Editable

- All Known Implementing Classes:
    Entry, SpinButton

      public interface Editable

  Methods common to Widgets which allow the line of text they display to be edited.
  Since:
    4.0.6
  Author:
    Andrew Cowie, Douglas Goulart

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Editable.Changed` The signal emitted when the text in the Editable has changed.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connect(Editable.Changed handler)` Hook up a handler for `Editable.Changed` signals.
    `int` | `getPosition()` Retrieves the current cursor position.
    `int` | `getSelectionBoundsEnd()` Retrieves the selection end position of the Editable.
    `int` | `getSelectionBoundsStart()` Retrieves the selection start position of the Editable.
    `void` | `selectRegion(int start, int end)` Select a region of the text in this Editable.
    `void` | `setPosition(int position)` Set the position of the cursor in this Editable.

- - ### Method Detail

    - #### connect

          void connect(Editable.Changed handler)

      Hook up a handler for `Editable.Changed` signals.
      Since:
        4.0.6

    - #### getPosition

          int getPosition()

      Retrieves the current cursor position. Returns the position of the cursor. The cursor is displayed before the character with the given (base 0) index in the widget. The value will be less than or equal to the number of characters in the widget.
      Since:
        4.0.16

    - #### getSelectionBoundsEnd

          int getSelectionBoundsEnd()

      Retrieves the selection end position of the Editable. If no text was selected both `getSelectionBoundsStart()` and `getSelectionBoundsEnd()` will be identical.
      Since:
        4.0.16

    - #### getSelectionBoundsStart

          int getSelectionBoundsStart()

      Retrieves the selection start position of the Editable. If no text was selected both `getSelectionBoundsStart()` and `getSelectionBoundsEnd()` will be identical.
      Since:
        4.0.16

    - #### selectRegion

          void selectRegion(int start,
                          int end)

      Select a region of the text in this Editable. The characters between `start` up to but not including `end` will be selected.

      Calling `selectRegion(0, 0)` will remove the selection (although that will only happen if some other Widget has the focus; in Windows where there is only one control the user can manipulate an Entry will end up selected no matter what).

      Parameters:
        `end` - If negative, then the selection will be from `start` to the end of the text in the Editable.
      Since:
        4.0.6

    - #### setPosition

          void setPosition(int position)

      Set the position of the cursor in this Editable. The cursor will be put before the character at the position indicated.
      Parameters:
        `position` - The value given must be less than or equal to the number of characters currently in the Editable field. Supplying a value of `-1` will cause the cursor to move to a position after the last character in the text.
      Since:
        4.0.6