Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: EditableLabel

[28:7] extends: object

Allows users to edit the displayed text by switching to an “edit mode”. An example GtkEditableLabel GtkEditableLabel does not have API of its own, but it implements the [iface@Gtk.Editable] interface. The default bindings for activating the edit mode is to click or press the Enter key. The default bindings for leaving the edit mode are the Enter key (to save the results) or the Escape key (to cancel the editing). # Shortcuts and Gestures GtkEditableLabel supports the following keyboard shortcuts: - Enter starts editing. - Escape stops editing. # Actions GtkEditableLabel defines a set of built-in actions: - editing.starts switches the widget into editing mode. - editing.stop switches the widget out of editing mode. # CSS nodes editablelabel[.editing] ╰── stack ├── label ╰── text GtkEditableLabel has a main node with the name editablelabel. When the entry is in editing mode, it gets the .editing style class. For all the subnodes added to the text node in various situations, see [class@Gtk.Text].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • EditableLabel (str = null)

    Creates a new GtkEditableLabel widget.

    • @p str is the text for the label.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asWidget ()

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • asEditable ()

    Wraps this handle as Editable.

    • @r A Editable object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setEditing (bool Value)

    This property is %TRUE while the widget is in edit mode.

    • @p Value is the new property value.
    • @r None.
  • get_editing ()

    Returns whether the label is currently in “editing mode”.

  • start_editing ()

    Switches the label into “editing mode”.

    • @r None.
  • stop_editing (bool commit)

    Switches the label out of “editing mode”. If @commit is %TRUE, the resulting text is kept as the [property@Gtk.Editable:text] property value, otherwise the resulting text is discarded and the label will keep its previous [property@Gtk.Editable:text] property value.

    • @p commit is whether to set the edited text on the label.
    • @r None.

class: EditableLabelMeta

[213:14] static extends: object

Generated metadata helpers for EditableLabel class surfaces.

Methods

  • properties ()

    Returns property metadata for EditableLabel.

    • @r A list.