Initial revision
[ardour.git] / libs / libgnomecanvasmm / libgnomecanvasmm / group.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <libgnomecanvasmm/group.h>
4 #include <libgnomecanvasmm/private/group_p.h>
5
6 // -*- C++ -*-
7 /* $Id$ */
8
9 /* group.cc
10  *
11  * Copyright (C) 1998 EMC Capital Management Inc.
12  * Developed by Havoc Pennington <hp@pobox.com>
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 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  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library 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 namespace Gnome
30 {
31
32 namespace Canvas
33 {
34
35 Group::Group(Group& parentx, double x, double y)
36   : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
37 {
38   item_construct(parentx);
39   set("x", x, "y", y, 0);
40 }
41
42 } /* namespace Canvas */
43 } /* namespace Gnome */
44
45
46 namespace
47 {
48 } // anonymous namespace
49
50
51 namespace Glib
52 {
53
54 Gnome::Canvas::Group* wrap(GnomeCanvasGroup* object, bool take_copy)
55 {
56   return dynamic_cast<Gnome::Canvas::Group *> (Glib::wrap_auto ((GObject*)(object), take_copy));
57 }
58
59 } /* namespace Glib */
60
61 namespace Gnome
62 {
63
64 namespace Canvas
65 {
66
67
68 /* The *_Class implementation: */
69
70 const Glib::Class& Group_Class::init()
71 {
72   if(!gtype_) // create the GType if necessary
73   {
74     // Glib::Class has to know the class init function to clone custom types.
75     class_init_func_ = &Group_Class::class_init_function;
76
77     // This is actually just optimized away, apparently with no harm.
78     // Make sure that the parent type has been created.
79     //CppClassParent::CppObjectType::get_type();
80
81     // Create the wrapper type, with the same class/instance size as the base type.
82     register_derived_type(gnome_canvas_group_get_type());
83
84     // Add derived versions of interfaces, if the C type implements any interfaces:
85   }
86
87   return *this;
88 }
89
90 void Group_Class::class_init_function(void* g_class, void* class_data)
91 {
92   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
93   CppClassParent::class_init_function(klass, class_data);
94
95 }
96
97
98 Glib::ObjectBase* Group_Class::wrap_new(GObject* o)
99 {
100   return manage(new Group((GnomeCanvasGroup*)(o)));
101
102 }
103
104
105 /* The implementation: */
106
107 Group::Group(const Glib::ConstructParams& construct_params)
108 :
109   Item(construct_params)
110 {
111   }
112
113 Group::Group(GnomeCanvasGroup* castitem)
114 :
115   Item((GnomeCanvasItem*)(castitem))
116 {
117   }
118
119 Group::~Group()
120 {
121   destroy_();
122 }
123
124 Group::CppClassType Group::group_class_; // initialize static member
125
126 GType Group::get_type()
127 {
128   return group_class_.init().get_type();
129 }
130
131 GType Group::get_base_type()
132 {
133   return gnome_canvas_group_get_type();
134 }
135
136
137 Group::Group()
138 :
139   Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
140   Item(Glib::ConstructParams(group_class_.init()))
141 {
142   }
143
144
145 Glib::PropertyProxy<double> Group::property_x() 
146 {
147   return Glib::PropertyProxy<double>(this, "x");
148 }
149
150 Glib::PropertyProxy_ReadOnly<double> Group::property_x() const
151 {
152   return Glib::PropertyProxy_ReadOnly<double>(this, "x");
153 }
154
155 Glib::PropertyProxy<double> Group::property_y() 
156 {
157   return Glib::PropertyProxy<double>(this, "y");
158 }
159
160 Glib::PropertyProxy_ReadOnly<double> Group::property_y() const
161 {
162   return Glib::PropertyProxy_ReadOnly<double>(this, "y");
163 }
164
165
166 } // namespace Canvas
167
168 } // namespace Gnome
169
170