Main Page Widgets Namespaces Book

# Gtk::Object Class Reference

Inheritance diagram for Gtk::Object:

[legend]
List of all members.

## 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).

## Public Member Functions

const GtkObject* | gobj () const
| Provides access to the underlying C GtkObject.
GtkObject* | gobj ()
| Provides access to the underlying C GtkObject.
Glib::PropertyProxy_ReadOnly< void* > | property_user_data () const
| Anonymous User Data Pointer.
Glib::PropertyProxy<void*> | property_user_data ()
| Anonymous User Data Pointer.
virtual | ~Object ()

## Related Functions

(Note that these are not member functions.)
Gtk::Object* | wrap (GtkObject* object, bool take_copy=false)

## Constructor & Destructor Documentation

virtual Gtk::Object::~Object | ( |  | ) | `[virtual]`

| Reimplemented from Glib::Object.

## Member Function Documentation

const GtkObject* Gtk::Object::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Glib::ObjectBase.

Reimplemented in Gtk::AboutDialog, Gtk::AccelLabel, Gtk::Adjustment, Gtk::Alignment, Gtk::Arrow, Gtk::AspectFrame, Gtk::Assistant, Gtk::Bin, Gtk::Box, Gtk::VBox, Gtk::HBox, Gtk::Button, Gtk::ButtonBox, Gtk::VButtonBox, Gtk::HButtonBox, Gtk::Calendar, Gtk::CellRenderer, Gtk::CellRendererAccel, Gtk::CellRendererCombo, Gtk::CellRendererPixbuf, Gtk::CellRendererProgress, Gtk::CellRendererSpin, Gtk::CellRendererText, Gtk::CellRendererToggle, Gtk::CellView, Gtk::CheckButton, Gtk::CheckMenuItem, Gtk::ColorButton, Gtk::ColorSelection, Gtk::ColorSelectionDialog, Gtk::ComboDropDownItem, Gtk::ComboDropDown, Gtk::Combo, Gtk::ComboBox, Gtk::ComboBoxEntry, Gtk::Container, Gtk::Curve, Gtk::GammaCurve, Gtk::Dialog, Gtk::DrawingArea, Gtk::Entry, Gtk::EventBox, Gtk::Expander, Gtk::FileChooserButton, Gtk::FileChooserDialog, Gtk::FileChooserWidget, Gtk::FileFilter, Gtk::FileSelection, Gtk::Fixed, Gtk::FontButton, Gtk::FontSelection, Gtk::FontSelectionDialog, Gtk::Frame, Gtk::HandleBox, Gtk::IconView, Gtk::Image, Gtk::ImageMenuItem, Gtk::InputDialog, Gtk::Invisible, Gtk::Item, Gtk::Label, Gtk::Layout, Gtk::LinkButton, Gtk::Menu, Gtk::MenuBar, Gtk::MenuItem, Gtk::MenuShell, Gtk::MenuToolButton, Gtk::MessageDialog, Gtk::Misc, Gtk::Notebook, Gtk::OptionMenu, Gtk::PageSetupUnixDialog, Gtk::Paned, Gtk::HPaned, Gtk::VPaned, Gtk::Plug, Gtk::PrintUnixDialog, Gtk::ProgressBar, Gtk::RadioButton, Gtk::RadioMenuItem, Gtk::RadioToolButton, Gtk::Range, Gtk::RecentChooserDialog, Gtk::RecentChooserMenu, Gtk::RecentChooserWidget, Gtk::RecentFilter, Gtk::Ruler, Gtk::VRuler, Gtk::HRuler, Gtk::Scale, Gtk::VScale, Gtk::HScale, Gtk::Scrollbar, Gtk::VScrollbar, Gtk::HScrollbar, Gtk::ScrolledWindow, Gtk::Separator, Gtk::VSeparator, Gtk::HSeparator, Gtk::SeparatorMenuItem, Gtk::SeparatorToolItem, Gtk::Socket, Gtk::SpinButton, Gtk::Statusbar, Gtk::Table, Gtk::TearoffMenuItem, Gtk::TextView, Gtk::ToggleButton, Gtk::ToggleToolButton, Gtk::Toolbar, Gtk::ToolButton, Gtk::ToolItem, Gtk::Tooltips, Gtk::TreeView, Gtk::TreeViewColumn, Gtk::Viewport, Gtk::Widget, and Gtk::Window.

GtkObject* Gtk::Object::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Glib::ObjectBase.

Reimplemented in Gtk::AboutDialog, Gtk::AccelLabel, Gtk::Adjustment, Gtk::Alignment, Gtk::Arrow, Gtk::AspectFrame, Gtk::Assistant, Gtk::Bin, Gtk::Box, Gtk::VBox, Gtk::HBox, Gtk::Button, Gtk::ButtonBox, Gtk::VButtonBox, Gtk::HButtonBox, Gtk::Calendar, Gtk::CellRenderer, Gtk::CellRendererAccel, Gtk::CellRendererCombo, Gtk::CellRendererPixbuf, Gtk::CellRendererProgress, Gtk::CellRendererSpin, Gtk::CellRendererText, Gtk::CellRendererToggle, Gtk::CellView, Gtk::CheckButton, Gtk::CheckMenuItem, Gtk::ColorButton, Gtk::ColorSelection, Gtk::ColorSelectionDialog, Gtk::ComboDropDownItem, Gtk::ComboDropDown, Gtk::Combo, Gtk::ComboBox, Gtk::ComboBoxEntry, Gtk::Container, Gtk::Curve, Gtk::GammaCurve, Gtk::Dialog, Gtk::DrawingArea, Gtk::Entry, Gtk::EventBox, Gtk::Expander, Gtk::FileChooserButton, Gtk::FileChooserDialog, Gtk::FileChooserWidget, Gtk::FileFilter, Gtk::FileSelection, Gtk::Fixed, Gtk::FontButton, Gtk::FontSelection, Gtk::FontSelectionDialog, Gtk::Frame, Gtk::HandleBox, Gtk::IconView, Gtk::Image, Gtk::ImageMenuItem, Gtk::InputDialog, Gtk::Invisible, Gtk::Item, Gtk::Label, Gtk::Layout, Gtk::LinkButton, Gtk::Menu, Gtk::MenuBar, Gtk::MenuItem, Gtk::MenuShell, Gtk::MenuToolButton, Gtk::MessageDialog, Gtk::Misc, Gtk::Notebook, Gtk::OptionMenu, Gtk::PageSetupUnixDialog, Gtk::Paned, Gtk::HPaned, Gtk::VPaned, Gtk::Plug, Gtk::PrintUnixDialog, Gtk::ProgressBar, Gtk::RadioButton, Gtk::RadioMenuItem, Gtk::RadioToolButton, Gtk::Range, Gtk::RecentChooserDialog, Gtk::RecentChooserMenu, Gtk::RecentChooserWidget, Gtk::RecentFilter, Gtk::Ruler, Gtk::VRuler, Gtk::HRuler, Gtk::Scale, Gtk::VScale, Gtk::HScale, Gtk::Scrollbar, Gtk::VScrollbar, Gtk::HScrollbar, Gtk::ScrolledWindow, Gtk::Separator, Gtk::VSeparator, Gtk::HSeparator, Gtk::SeparatorMenuItem, Gtk::SeparatorToolItem, Gtk::Socket, Gtk::SpinButton, Gtk::Statusbar, Gtk::Table, Gtk::TearoffMenuItem, Gtk::TextView, Gtk::ToggleButton, Gtk::ToggleToolButton, Gtk::Toolbar, Gtk::ToolButton, Gtk::ToolItem, Gtk::Tooltips, Gtk::TreeView, Gtk::TreeViewColumn, Gtk::Viewport, Gtk::Widget, and Gtk::Window.

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 that allows you to get or set the property of the value, or receive notification when the value of the property changes.

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 property of the value, 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]`

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:

- gtk/gtkmm/object.h