rollback to 3428, before the mysterious removal of libs/* at 3431/3432
[ardour.git] / libs / libgnomecanvasmm / libgnomecanvasmm / polygon.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include <libgnomecanvasmm/polygon.h>
4 #include <libgnomecanvasmm/private/polygon_p.h>
5
6 /* $Id$ */
7
8 /* polygon.ccg
9  * 
10  * Copyright (C) 1999 The Gtk-- Development Team
11  *
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.
16  *
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.
21  *
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.
25  */
26
27 namespace Gnome
28 {
29
30 namespace Canvas
31 {
32
33 Polygon::Polygon(Group& parent,const Points& points)
34   : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
35 {
36   item_construct(parent);
37   property_points().set_value(points);
38 }
39
40 Polygon::Polygon(Group& parent)
41     : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
42 {
43   item_construct(parent);
44 }
45
46 } /* namespace Canvas */
47 } /* namespace Gnome */
48
49
50 namespace
51 {
52 } // anonymous namespace
53
54
55 namespace Glib
56 {
57
58 Gnome::Canvas::Polygon* wrap(GnomeCanvasPolygon* object, bool take_copy)
59 {
60   return dynamic_cast<Gnome::Canvas::Polygon *> (Glib::wrap_auto ((GObject*)(object), take_copy));
61 }
62
63 } /* namespace Glib */
64
65 namespace Gnome
66 {
67
68 namespace Canvas
69 {
70
71
72 /* The *_Class implementation: */
73
74 const Glib::Class& Polygon_Class::init()
75 {
76   if(!gtype_) // create the GType if necessary
77   {
78     // Glib::Class has to know the class init function to clone custom types.
79     class_init_func_ = &Polygon_Class::class_init_function;
80
81     // This is actually just optimized away, apparently with no harm.
82     // Make sure that the parent type has been created.
83     //CppClassParent::CppObjectType::get_type();
84
85     // Create the wrapper type, with the same class/instance size as the base type.
86     register_derived_type(gnome_canvas_polygon_get_type());
87
88     // Add derived versions of interfaces, if the C type implements any interfaces:
89   }
90
91   return *this;
92 }
93
94 void Polygon_Class::class_init_function(void* g_class, void* class_data)
95 {
96   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
97   CppClassParent::class_init_function(klass, class_data);
98
99 }
100
101
102 Glib::ObjectBase* Polygon_Class::wrap_new(GObject* o)
103 {
104   return manage(new Polygon((GnomeCanvasPolygon*)(o)));
105
106 }
107
108
109 /* The implementation: */
110
111 Polygon::Polygon(const Glib::ConstructParams& construct_params)
112 :
113   Shape(construct_params)
114 {
115   }
116
117 Polygon::Polygon(GnomeCanvasPolygon* castitem)
118 :
119   Shape((GnomeCanvasShape*)(castitem))
120 {
121   }
122
123 Polygon::~Polygon()
124 {
125   destroy_();
126 }
127
128 Polygon::CppClassType Polygon::polygon_class_; // initialize static member
129
130 GType Polygon::get_type()
131 {
132   return polygon_class_.init().get_type();
133 }
134
135 GType Polygon::get_base_type()
136 {
137   return gnome_canvas_polygon_get_type();
138 }
139
140
141 Glib::PropertyProxy<Points> Polygon::property_points() 
142 {
143   return Glib::PropertyProxy<Points>(this, "points");
144 }
145
146 Glib::PropertyProxy_ReadOnly<Points> Polygon::property_points() const
147 {
148   return Glib::PropertyProxy_ReadOnly<Points>(this, "points");
149 }
150
151
152 } // namespace Canvas
153
154 } // namespace Gnome
155
156