Ardour  9.0-pre0-384-ga76afae0e9
object.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_OBJECT_H
4 #define _GTKMM_OBJECT_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: object.hg,v 1.5 2006/04/07 14:11:37 gustin Exp $ */
11 
12 /* Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <glibmm/object.h>
30 #include <gtkmm/base.h>
31 #include <gtkmmconfig.h>
32 
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkObject GtkObject;
36 typedef struct _GtkObjectClass GtkObjectClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 
39 
40 namespace Gtk
41 { class Object_Class; } // namespace Gtk
42 namespace Gtk
43 {
44 
45 class Object;
46 
57 template<class T>
58 T* manage(T* obj)
59 {
60  obj->set_manage();
61  return obj;
62 }
63 
73 class GTKMM_API Object : public Glib::Object
74 {
75  public:
76 #ifndef DOXYGEN_SHOULD_SKIP_THIS
77  typedef Object CppObjectType;
78  typedef Object_Class CppClassType;
79  typedef GtkObject BaseObjectType;
80  typedef GtkObjectClass BaseClassType;
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
82 
83  virtual ~Object();
84 
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 
87 private:
88  friend class Object_Class;
89  static CppClassType object_class_;
90 
91  // noncopyable
92  Object(const Object&);
93  Object& operator=(const Object&);
94 
95 protected:
96  explicit Object(const Glib::ConstructParams& construct_params);
97  explicit Object(GtkObject* castitem);
98 
99 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
100 
101 public:
102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
103  static GType get_type() G_GNUC_CONST;
104 
105 
106  static GType get_base_type() G_GNUC_CONST;
107 #endif
108 
110  GtkObject* gobj() { return reinterpret_cast<GtkObject*>(gobject_); }
111 
113  const GtkObject* gobj() const { return reinterpret_cast<GtkObject*>(gobject_); }
114 
115 
116 public:
117  //C++ methods used to invoke GTK+ virtual functions:
118 
119 protected:
120  //GTK+ Virtual Functions (override these to change behaviour):
121 
122  //Default Signal Handlers::
123 
124 
125 private:
126 
127 
128 public:
129  //void shutdown(); //We probably don't need this.
130  //void finalize(); //We probably don't need this.
131 
132  //void set_user_data(gpointer data);
133  //gpointer get_user_data();
134 
135  #ifndef DOXYGEN_SHOULD_SKIP_THIS
138  virtual void set_manage();
139  #endif //DOXYGEN_SHOULD_SKIP_THIS
140 
146  Glib::PropertyProxy< void* > property_user_data() ;
147 
153  Glib::PropertyProxy_ReadOnly< void* > property_user_data() const;
154 
155 
156  #ifndef DOXYGEN_SHOULD_SKIP_THIS
159  bool is_managed_() const;
160  #endif //DOXYGEN_SHOULD_SKIP_THIS
161 
162 protected:
163 
164  #ifndef DOXYGEN_SHOULD_SKIP_THIS
167  void destroy_();
168  #endif //DOXYGEN_SHOULD_SKIP_THIS
169 
170  // If you need it, give me an example. murrayc. -- Me too. daniel.
171  //_WRAP_SIGNAL(void destroy(), "destroy")
172 
173 
174  #ifndef DOXYGEN_SHOULD_SKIP_THIS
175  void _init_unmanage(bool is_toplevel = false);
176  virtual void destroy_notify_(); //override.
177  void disconnect_cpp_wrapper();
178  void _destroy_c_instance();
179  static void callback_destroy_(GObject* gobject, void* data); //only connected for a short time.
180 
181  // set if flags used by derived classes.
182  bool referenced_; // = not managed.
183  bool gobject_disposed_;
184  #endif //DOXYGEN_SHOULD_SKIP_THIS
185 
186 
187 };
188 
189 } // namespace Gtk
190 
191 
192 namespace Glib
193 {
202  Gtk::Object* wrap(GtkObject* object, bool take_copy = false);
203 } //namespace Glib
204 
205 
206 #endif /* _GTKMM_OBJECT_H */
207 
virtual ~Object()
const GtkObject * gobj() const
Provides access to the underlying C GtkObject.
Definition: object.h:113
Glib::PropertyProxy< void * > property_user_data()
Gtk::Object * wrap(GtkObject *object, bool take_copy=false)
Glib::PropertyProxy_ReadOnly< void * > property_user_data() const
GtkObject * gobj()
Provides access to the underlying C GtkObject.
Definition: object.h:110
Definition: ardour_ui.h:187
T * manage(T *obj)
Definition: object.h:58