gtkmm: Gtk::Object Class Reference

gtkmm 4.6.1

Public Member Functions | List of all members
Gtk::Object Class Reference

Gtk::Object is the base class for all widgets, and for a few non-widget objects such as Gtk::CellRenderer. More...

`#include <gtkmm/object.h>`

Inheritance diagram for Gtk::Object:
[legend]

## Public Member Functions
| Object (Object && src) noexcept
Object & | operator= (Object && src) noexcept
| ~Object () noexcept override
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (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
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexcept override
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
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Detailed Description

Gtk::Object is the base class for all widgets, and for a few non-widget objects such as Gtk::CellRenderer.

Gtk::Object predates Glib::Object; non-widgets that derive from Gtk::Object rather than Glib::Object do so for backward compatibility reasons.

The most interesting difference between Gtk::Object and Glib::Object is the ability to use Gtk::manage() to delegate memory management to the container widget. Gtk::Objects can also be explicitly deleted at any time, instead of using only reference-counting, and container widgets can respond when their child objects are being deleted (for instance by removing the widget).

## Constructor & Destructor Documentation

## ◆ Object()

Gtk::Object::Object | ( | Object && | src | ) |
| noexcept

## ◆ ~Object()

Gtk::Object::~Object | ( |  | ) |
| overridenoexcept

## Member Function Documentation

## ◆ operator=()

Object & Gtk::Object::operator= | ( | Object && | src | ) |
| noexcept