gtk.cell_editable_mixin
Module for [CellEditable] interface mixin
Templates 2
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.
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 #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
event | The #GdkEvent 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 #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
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 #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
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. |