contents. See [gtk.editable.Editable] for editable text widgets
gtk.cell_editable_mixin
Module for [CellEditable] interface mixin
Templates 2
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
Get editingCanceled property.
Returns
Set editingCanceled property.
Parameters
propval | Indicates whether editing on the cell has been canceled. |
Emits the GtkCellEditable::editing-done signal.
Emits the GtkCellEditable::remove-widget signal.
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
event | The [gdk.event.Event] that began the editing process, or null if editing was initiated programmatically |
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
callback | signal callback delegate or function to connect void callback(gtk.cell_editable.CellEditable cellEditable) cellEditable the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
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
callback | signal callback delegate or function to connect void callback(gtk.cell_editable.CellEditable cellEditable) cellEditable the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Set editingCanceled property.
Parameters
propval | Indicates whether editing on the cell has been canceled. |