gtkmm: Gtk::Object Class Reference

gtkmm 2.24.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Related 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::Adjustment. More...

Inheritance diagram for Gtk::Object:
[legend]
Collaboration diagram for Gtk::Object:
[legend]

## Public Member Functions
virtual | ~Object ()
GtkObject* | gobj ()
| Provides access to the underlying C GtkObject. More...
const GtkObject* | gobj () const
| Provides access to the underlying C GtkObject. More...
Glib::PropertyProxy< void* > | property_user_data ()
| Anonymous User Data Pointer. More...
Glib::PropertyProxy_ReadOnly < void* > | property_user_data () const
| Anonymous User Data Pointer. More...
Public Member Functions inherited from Glib::Object
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)
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
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const 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
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
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
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable (const trackable &src)
trackable & | operator= (const trackable &src)
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | remove_destroy_notify_callback (void *data) const
void | notify_callbacks ()

## Related Functions
(Note that these are not member functions.)
Gtk::Object* | wrap (GtkObject* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(* | DestroyNotify )(gpointer data)
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
virtual | ~ObjectBase ()=0
void | initialize (GObject *castitem)

## Detailed Description

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

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

virtual Gtk::Object::~Object | ( |  | ) |
| virtual

Reimplemented from Glib::Object.

## Member Function Documentation

GtkObject* Gtk::Object::gobj | ( |  | ) |
| inline

Provides access to the underlying C GtkObject.

const GtkObject* Gtk::Object::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GtkObject.

Glib::PropertyProxy< void* > Gtk::Object::property_user_data | ( |  | ) |

Anonymous User Data Pointer.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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< void* > Gtk::Object::property_user_data | ( |  | ) | const

Anonymous User Data Pointer.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## Friends And Related Function Documentation

Gtk::Object* wrap | ( | GtkObject * | 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.

The documentation for this class was generated from the following file:

- gtkmm/object.h