1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <libgnomecanvasmm/polygon.h>
4 #include <libgnomecanvasmm/private/polygon_p.h>
10 * Copyright (C) 1999 The Gtk-- 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.
33 Polygon::Polygon(Group& parent,const Points& points)
34 : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
36 item_construct(parent);
37 property_points().set_value(points);
40 Polygon::Polygon(Group& parent)
41 : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
43 item_construct(parent);
46 } /* namespace Canvas */
47 } /* namespace Gnome */
52 } // anonymous namespace
58 Gnome::Canvas::Polygon* wrap(GnomeCanvasPolygon* object, bool take_copy)
60 return dynamic_cast<Gnome::Canvas::Polygon *> (Glib::wrap_auto ((GObject*)(object), take_copy));
63 } /* namespace Glib */
72 /* The *_Class implementation: */
74 const Glib::Class& Polygon_Class::init()
76 if(!gtype_) // create the GType if necessary
78 // Glib::Class has to know the class init function to clone custom types.
79 class_init_func_ = &Polygon_Class::class_init_function;
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();
85 // Create the wrapper type, with the same class/instance size as the base type.
86 register_derived_type(gnome_canvas_polygon_get_type());
88 // Add derived versions of interfaces, if the C type implements any interfaces:
94 void Polygon_Class::class_init_function(void* g_class, void* class_data)
96 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
97 CppClassParent::class_init_function(klass, class_data);
102 Glib::ObjectBase* Polygon_Class::wrap_new(GObject* o)
104 return manage(new Polygon((GnomeCanvasPolygon*)(o)));
109 /* The implementation: */
111 Polygon::Polygon(const Glib::ConstructParams& construct_params)
113 Shape(construct_params)
117 Polygon::Polygon(GnomeCanvasPolygon* castitem)
119 Shape((GnomeCanvasShape*)(castitem))
128 Polygon::CppClassType Polygon::polygon_class_; // initialize static member
130 GType Polygon::get_type()
132 return polygon_class_.init().get_type();
135 GType Polygon::get_base_type()
137 return gnome_canvas_polygon_get_type();
141 Glib::PropertyProxy<Points> Polygon::property_points()
143 return Glib::PropertyProxy<Points>(this, "points");
146 Glib::PropertyProxy_ReadOnly<Points> Polygon::property_points() const
148 return Glib::PropertyProxy_ReadOnly<Points>(this, "points");
152 } // namespace Canvas