gtk.cell_editable_mixin

Module for [CellEditable] interface mixin

Templates 2

tmplCellEditableT()

The #GtkCellEditable interface must be implemented for widgets to be usable to edit the contents of a #GtkTreeView cell. It provides a way to specify how temporary widgets should be configured for editing, get the new value, etc.

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 #GtkCellRenderer for the cell creates and returns a #GtkCellEditable from [gtk.cell_renderer.CellRenderer.startEditing], configured for the #GtkCellRenderer 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 #GdkEvent 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 #GtkCellEditable are responsible for emitting this signal when they are done editing, e.g. #GtkEntry 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 #GtkCellRenderer, 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 #GtkCellEditable 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