2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_OBJECT_H
4 #define _GTKMM_OBJECT_H
10 /* Copyright (C) 1998-2002 The gtkmm Development Team
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <glibmm/object.h>
28 #include <gtkmm/base.h>
29 #include <gtkmmconfig.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkObject GtkObject;
34 typedef struct _GtkObjectClass GtkObjectClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 { class Object_Class; } // namespace Gtk
53 class Object : public Glib::Object
56 #ifndef DOXYGEN_SHOULD_SKIP_THIS
57 typedef Object CppObjectType;
58 typedef Object_Class CppClassType;
59 typedef GtkObject BaseObjectType;
60 typedef GtkObjectClass BaseClassType;
61 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
68 friend class Object_Class;
69 static CppClassType object_class_;
72 Object(const Object&);
73 Object& operator=(const Object&);
76 explicit Object(const Glib::ConstructParams& construct_params);
77 explicit Object(GtkObject* castitem);
79 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
82 #ifndef DOXYGEN_SHOULD_SKIP_THIS
83 static GType get_type() G_GNUC_CONST;
84 static GType get_base_type() G_GNUC_CONST;
87 ///Provides access to the underlying C GtkObject.
88 GtkObject* gobj() { return reinterpret_cast<GtkObject*>(gobject_); }
90 ///Provides access to the underlying C GtkObject.
91 const GtkObject* gobj() const { return reinterpret_cast<GtkObject*>(gobject_); }
95 //C++ methods used to invoke GTK+ virtual functions:
98 //GTK+ Virtual Functions (override these to change behaviour):
100 //Default Signal Handlers::
107 //void shutdown(); //We probably don't need this.
108 //void finalize(); //We probably don't need this.
110 //void set_user_data(gpointer data);
111 //gpointer get_user_data();
113 virtual void set_manage();
115 /** Anonymous User Data Pointer.
117 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
118 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
119 * the value of the property changes.
121 Glib::PropertyProxy<void*> property_user_data() ;
123 /** Anonymous User Data Pointer.
125 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
126 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
127 * the value of the property changes.
129 Glib::PropertyProxy_ReadOnly<void*> property_user_data() const;
132 bool is_managed_() const;
138 // If you need it, give me an example. murrayc. -- Me too. daniel.
139 //_WRAP_SIGNAL(void destroy(), "destroy")
142 void _init_unmanage(bool is_toplevel = false);
143 virtual void destroy_notify_(); //override.
144 void disconnect_cpp_wrapper();
145 void _destroy_c_instance();
146 static void callback_destroy_(GObject* gobject, void* data); //only connected for a short time.
148 // set if flags used by derived classes.
149 bool referenced_; // = not managed.
150 bool gobject_disposed_;
160 /** @relates Gtk::Object
161 * @param object The C instance
162 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
163 * @result A C++ instance that wraps this C instance.
165 Gtk::Object* wrap(GtkObject* object, bool take_copy = false);
167 #endif /* _GTKMM_OBJECT_H */