Top |
Functions
void | gtk_cell_editable_start_editing () |
void | gtk_cell_editable_editing_done () |
void | gtk_cell_editable_remove_widget () |
Known Implementations
GtkCellEditable is implemented by GtkAppChooserButton, GtkComboBox, GtkComboBoxText, GtkEntry, GtkSearchEntry and GtkSpinButton.
Description
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
gtk_cell_editable_start_editing ()
void gtk_cell_editable_start_editing (GtkCellEditable *cell_editable
,GdkEvent *event
);
Begins editing on a cell_editable
.
The GtkCellRenderer for the cell creates and returns a GtkCellEditable from
gtk_cell_renderer_start_editing()
, configured for the GtkCellRenderer type.
gtk_cell_editable_start_editing() can then set up cell_editable
suitably for
editing a cell, e.g. making the Esc key emit “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.
gtk_cell_editable_editing_done ()
void
gtk_cell_editable_editing_done (GtkCellEditable *cell_editable
);
Emits the “editing-done” signal.
gtk_cell_editable_remove_widget ()
void
gtk_cell_editable_remove_widget (GtkCellEditable *cell_editable
);
Emits the “remove-widget” signal.
Types and Values
Signal Details
The “editing-done”
signal
void user_function (GtkCellEditable *cell_editable, gpointer user_data)
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_editing_done() is a convenience method for emitting “editing-done”.
Parameters
cell_editable |
the object on which the signal was emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
The “remove-widget”
signal
void user_function (GtkCellEditable *cell_editable, gpointer user_data)
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 “editing-done” signal, to give the cell renderer a chance to update the cell's value before the widget is removed.
gtk_cell_editable_remove_widget() is a convenience method for emitting “remove-widget”.
Parameters
cell_editable |
the object on which the signal was emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last