gtkmm 4.17.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gtk::CellEditable Class Reference

Interface for widgets which are used for editing cells. More...

#include <gtkmm/celleditable.h>

Inheritance diagram for Gtk::CellEditable:
Inheritance graph
[legend]

Public Member Functions

 CellEditable (CellEditable &&src) noexcept
 
CellEditableoperator= (CellEditable &&src) noexcept
 
 ~CellEditable () noexcept override
 
GtkCellEditablegobj ()
 Provides access to the underlying C GObject.
 
const GtkCellEditablegobj () const
 Provides access to the underlying C GObject.
 
void start_editing (const Glib::RefPtr< const Gdk::Event > & event)
 Begins editing on a cell_editable.
 
void editing_done ()
 Emits the GtkCellEditable::editing-done signal.
 
void remove_widget ()
 Emits the GtkCellEditable::remove-widget signal.
 
Glib::SignalProxy< void()> signal_editing_done ()
 
Glib::SignalProxy< void()> signal_remove_widget ()
 
Glib::PropertyProxy< bool > property_editing_canceled ()
 Indicates whether editing on the cell has been canceled.
 
Glib::PropertyProxy_ReadOnly< bool > property_editing_canceled () const
 Indicates whether editing on the cell has been canceled.
 
- Public Member Functions inherited from Glib::Interface
 Interface ()
 
 Interface (Interface &&src) noexcept
 
Interfaceoperator= (Interface &&src) noexcept
 
 Interface (const Glib::Interface_Class &interface_class)
 
 Interface (GObject *castitem)
 
 ~Interface () noexcept override
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
GObjectgobj ()
 
const GObjectgobj () const
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
PropertyType get_property (const Glib::ustring &property_name) const
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
 
sigc::connection connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObjectgobj ()
 
const GObjectgobj () const
 
GObjectgobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src) noexcept
 
 ~trackable ()
 
void add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src) noexcept
 
void remove_destroy_notify_callback (notifiable *data) const
 

Static Public Member Functions

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.
 

Protected Member Functions

 CellEditable ()
 You should derive from this class to use it.
 
virtual void start_editing_vfunc (const Glib::RefPtr< const Gdk::Event > & event)
 
virtual void on_editing_done ()
 This is a default handler for the signal signal_editing_done().
 
virtual void on_remove_widget ()
 This is a default handler for the signal signal_remove_widget().
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Gtk::CellEditablewrap (GtkCellEditable *object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Additional Inherited Members

- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Types inherited from sigc::notifiable
typedef internal::func_destroy_notify func_destroy_notify
 

Detailed Description

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.

Deprecated:
4.10: List views use widgets for displaying their contents. See Gtk::Editable for editable text widgets.

Constructor & Destructor Documentation

◆ CellEditable() [1/2]

Gtk::CellEditable::CellEditable ( )
protected

You should derive from this class to use it.

◆ CellEditable() [2/2]

Gtk::CellEditable::CellEditable ( CellEditable &&  src)
noexcept

◆ ~CellEditable()

Gtk::CellEditable::~CellEditable ( )
overridenoexcept

Member Function Documentation

◆ add_interface()

static void Gtk::CellEditable::add_interface ( GType  gtype_implementer)
static

◆ editing_done()

void Gtk::CellEditable::editing_done ( )

Emits the GtkCellEditable::editing-done signal.

Deprecated: 4.10

Deprecated:
See Gtk::Editable for editable text widgets.

◆ get_type()

static GType Gtk::CellEditable::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GtkCellEditable * Gtk::CellEditable::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GtkCellEditable * Gtk::CellEditable::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ on_editing_done()

virtual void Gtk::CellEditable::on_editing_done ( )
protectedvirtual

This is a default handler for the signal signal_editing_done().

◆ on_remove_widget()

virtual void Gtk::CellEditable::on_remove_widget ( )
protectedvirtual

This is a default handler for the signal signal_remove_widget().

◆ operator=()

CellEditable & Gtk::CellEditable::operator= ( CellEditable &&  src)
noexcept

◆ property_editing_canceled() [1/2]

Glib::PropertyProxy< bool > Gtk::CellEditable::property_editing_canceled ( )

Indicates whether editing on the cell has been canceled.

Deprecated:
See Gtk::Editable for editable text widgets.

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.

◆ property_editing_canceled() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::CellEditable::property_editing_canceled ( ) const

Indicates whether editing on the cell has been canceled.

Deprecated:
See Gtk::Editable for editable text widgets.

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.

◆ remove_widget()

void Gtk::CellEditable::remove_widget ( )

Emits the GtkCellEditable::remove-widget signal.

Deprecated: 4.10

Deprecated:
See Gtk::Editable for editable text widgets.

◆ signal_editing_done()

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 Gtk::CellEditable are responsible for emitting this signal when they are done editing, e.g. Gtk::Entry 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 Gtk::CellRenderer, etc.

Gtk::CellEditable::editing_done() is a convenience method for emitting GtkCellEditable::editing-done.

Deprecated:
See Gtk::Editable for editable text widgets.

◆ signal_remove_widget()

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 Gtk::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::CellEditable::remove_widget() is a convenience method for emitting GtkCellEditable::remove-widget.

Deprecated:
See Gtk::Editable for editable text widgets.

◆ start_editing()

void Gtk::CellEditable::start_editing ( const Glib::RefPtr< const Gdk::Event > &  event)

Begins editing on a cell_editable.

The Gtk::CellRenderer for the cell creates and returns a Gtk::CellEditable from Gtk::CellRenderer::start_editing(), configured for the Gtk::CellRenderer 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.

Deprecated:
See Gtk::Editable for editable text widgets.
Parameters
eventThe Gdk::Event that began the editing process, or nullptr if editing was initiated programmatically.

◆ start_editing_vfunc()

virtual void Gtk::CellEditable::start_editing_vfunc ( const Glib::RefPtr< const Gdk::Event > &  event)
protectedvirtual

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gtk::CellEditable > wrap ( GtkCellEditable object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse 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.