Interface for widgets which are used for editing cells.
More...
#include <gtkmm/celleditable.h>
|
static void | add_interface (GType gtype_implementer) |
|
static GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system. More...
|
|
Interface for widgets which are used for editing cells.
The CellEditable interface must be implemented for widgets to be usable when editing the contents of a TreeView cell.
Gtk::CellEditable::CellEditable |
( |
| ) |
|
|
protected |
You should derive from this class to use it.
Gtk::CellEditable::~CellEditable |
( |
| ) |
|
|
overridenoexcept |
static void Gtk::CellEditable::add_interface |
( |
GType |
gtype_implementer | ) |
|
|
static |
void Gtk::CellEditable::editing_done |
( |
| ) |
|
Emits the GtkCellEditable::editing-done
signal.
static GType Gtk::CellEditable::get_type |
( |
| ) |
|
|
static |
Get the GType for this class, for use with the underlying GObject type system.
GtkCellEditable* Gtk::CellEditable::gobj |
( |
| ) |
|
|
inline |
Provides access to the underlying C GObject.
const GtkCellEditable* Gtk::CellEditable::gobj |
( |
| ) |
const |
|
inline |
Provides access to the underlying C GObject.
virtual void Gtk::CellEditable::on_editing_done |
( |
| ) |
|
|
protectedvirtual |
virtual void Gtk::CellEditable::on_remove_widget |
( |
| ) |
|
|
protectedvirtual |
Glib::PropertyProxy< bool > Gtk::CellEditable::property_editing_canceled |
( |
| ) |
|
Indicates whether editing on the cell has been canceled.
Default value: false
- Returns
- A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< bool > Gtk::CellEditable::property_editing_canceled |
( |
| ) |
const |
Indicates whether editing on the cell has been canceled.
Default value: false
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
void Gtk::CellEditable::remove_widget |
( |
| ) |
|
Emits the GtkCellEditable::remove-widget
signal.
Glib::SignalProxy<void()> Gtk::CellEditable::signal_editing_done |
( |
| ) |
|
- Slot Prototype:
void on_my_editing_done()
Flags: Run Last
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 signal_editing_done() are to capture the edited value, disconnect the cell_editable from signals on the GtkCellRenderer
, etc.
Gtk::CellEditable::editing_done() is a convenience method for emitting GtkCellEditable::editing-done
.
Glib::SignalProxy<void()> Gtk::CellEditable::signal_remove_widget |
( |
| ) |
|
- Slot Prototype:
void on_my_remove_widget()
Flags: Run Last
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::CellEditable::remove_widget() is a convenience method for emitting GtkCellEditable::remove-widget
.
void Gtk::CellEditable::start_editing |
( |
const Glib::RefPtr< const Gdk::Event >& |
event | ) |
|
Begins editing on a cell_editable.
The GtkCellRenderer
for the cell creates and returns a GtkCellEditable
from Gtk::CellRenderer::start_editing(), configured for the GtkCellRenderer
type.
start_editing() 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 nullptr if editing was initiated programmatically. |
virtual void Gtk::CellEditable::start_editing_vfunc |
( |
const Glib::RefPtr< const Gdk::Event >& |
event | ) |
|
|
protectedvirtual |
Glib::RefPtr< Gtk::CellEditable > wrap |
( |
GtkCellEditable * |
object, |
|
|
bool |
take_copy = false |
|
) |
| |
|
related |
A Glib::wrap() method for this object.
- Parameters
-
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
- Returns
- A C++ instance that wraps this C instance.