Gnome::Gtk4::R-CellEditable
Description
Interface for widgets that can be used for editing cells
The Gnome::Gtk4::R-CellEditable interface must be implemented for widgets to be usable to edit the contents of a Gnome::Gtk4::TreeView cell. It provides a way to specify how temporary widgets should be configured for editing, get the new value, etc.
Methods
editing-done
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Emits the Gnome::Gtk4::R-CellEditable::editing-done` signal.
method editing-done ( )
remove-widget
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Emits the Gnome::Gtk4::R-CellEditable::remove-widget` signal.
method remove-widget ( )
start-editing
Begins editing on a $cell-editable
.
The Gnome::Gtk4::CellRenderer for the cell creates and returns a Gnome::Gtk4::R-CellEditable from gtk_cell_renderer_start_editing(), configured for the Gnome::Gtk4::CellRenderer type.
.start-editing()
can then set up $cell-editable
suitably for editing a cell, e.g. making the Esc key emit Gnome::Gtk4::R-CellEditable::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.
method start-editing ( N-Object() $event )
$event; The Gnome::Gdk4::Event that began the editing process, or undefined if editing was initiated programmatically.
Signals
editing-done
This signal is a sign for the cell renderer to update its value from the $cell-editable
.
Implementations of Gnome::Gtk4::R-CellEditable are responsible for emitting this signal when they are done editing, e.g. Gnome::Gtk4::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 Gnome::Gtk4::CellRenderer, etc.
.editing-done()
is a convenience method for emitting Gnome::Gtk4::R-CellEditable::editing-done`.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::CellEditable :$_widget, *C<user>-options )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::CellEditable object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.
remove-widget
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 Gnome::Gtk4::R-CellEditable are responsible for emitting this signal when they are done editing. It must be emitted after the Gnome::Gtk4::R-CellEditable::editing-done` signal, to give the cell renderer a chance to update the cell's value before the widget is removed.
.remove-widget()
is a convenience method for emitting Gnome::Gtk4::R-CellEditable::remove-widget`.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::CellEditable :$_widget, *C<user>-options )
$_handle_id; The registered event handler id.
$_native-object; The native object provided by the Raku object which registered this event. This a native Gnome::Gtk4::CellEditable object.
$_widget; The object which registered the signal. User code may have left the object going out of scope.
user
-options; A list of named arguments provided at the.register-signal()
method from Gnome::GObject::Object.