gtk.cell_editable_mixin

Module for [CellEditable] interface mixin

Templates 2

tmplCellEditableT()

Interface for widgets that can be used for editing cells

The [gtk.cell_editable.CellEditable] interface must be implemented for widgets to be usable to edit the contents of a [gtk.tree_view.TreeView] cell. It provides a way to specify how temporary widgets should be configured for editing, get the new value, etc.

Deprecated

List views use widgets for displaying their

contents. See [gtk.editable.Editable] for editable text widgets

Functions
bool editingCanceled()

Get editingCanceled property.

Returns

Indicates whether editing on the cell has been canceled.
void editingCanceled(bool propval)

Set editingCanceled property.

Parameters

propvalIndicates whether editing on the cell has been canceled.
void editingDone()

Emits the GtkCellEditable::editing-done signal.

void removeWidget()

Emits the GtkCellEditable::remove-widget signal.

void startEditing(gdk.event.Event event = null)

Begins editing on a cell_editable.

The [gtk.cell_renderer.CellRenderer] for the cell creates and returns a [gtk.cell_editable.CellEditable] from [gtk.cell_renderer.CellRenderer.startEditing], configured for the [gtk.cell_renderer.CellRenderer] type.

[gtk.cell_editable.CellEditable.startEditing] can then set up cell_editable suitably for editing a cell, e.g. making the Esc key emit GtkCellEditable::editing-done.

Note that the cell_editable is created on-demand for the current edit; its lifetime is temporary and does not persist across other edits and/or cells.

Parameters

eventThe [gdk.event.Event] that began the editing process, or null if editing was initiated programmatically
gulong connectEditingDone(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.cell_editable.CellEditable))) && Parameters!T.length < 2)

Connect to EditingDone signal.

This signal is a sign for the cell renderer to update its value from the cell_editable.

Implementations of [gtk.cell_editable.CellEditable] are responsible for emitting this signal when they are done editing, e.g. [gtk.entry.Entry] emits this signal when the user presses Enter. Typical things to do in a handler for ::editing-done are to capture the edited value, disconnect the cell_editable from signals on the [gtk.cell_renderer.CellRenderer], etc.

[gtk.cell_editable.CellEditable.editingDone] is a convenience method for emitting GtkCellEditable::editing-done.

Parameters

callbacksignal callback delegate or function to connect void callback(gtk.cell_editable.CellEditable cellEditable) cellEditable the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
gulong connectRemoveWidget(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.cell_editable.CellEditable))) && Parameters!T.length < 2)

Connect to RemoveWidget signal.

This signal is meant to indicate that the cell is finished editing, and the cell_editable widget is being removed and may subsequently be destroyed.

Implementations of [gtk.cell_editable.CellEditable] are responsible for emitting this signal when they are done editing. It must be emitted after the GtkCellEditable::editing-done signal, to give the cell renderer a chance to update the cell's value before the widget is removed.

[gtk.cell_editable.CellEditable.removeWidget] is a convenience method for emitting GtkCellEditable::remove-widget.

Parameters

callbacksignal callback delegate or function to connect void callback(gtk.cell_editable.CellEditable cellEditable) cellEditable the instance the signal is connected to (optional)
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID
tmplCellEditableGidBuilderT()
Functions
T editingCanceled(bool propval)

Set editingCanceled property.

Parameters

propvalIndicates whether editing on the cell has been canceled.

Returns

Builder instance for fluent chaining