1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include "simpleline.h"
4 #include "simpleline_p.h"
10 * Copyright (C) 1998 EMC Capital Management Inc.
11 * Developed by Havoc Pennington <hp@pobox.com>
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 //#include <libgnomecanvasmm/group.h>
36 SimpleLine::SimpleLine(Group& parentx)
37 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
39 item_construct(parentx);
42 SimpleLine::SimpleLine(Group& parentx, double x1, double y1, double x2, double y2)
43 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
45 item_construct(parentx);
46 set ("x1", x1, "y1", y1, "x2", x2, "y2", y2, 0);
49 } /* namespace Canvas */
50 } /* namespace Gnome */
56 Gnome::Canvas::SimpleLine* wrap(GnomeCanvasSimpleLine* object, bool take_copy)
58 return dynamic_cast<Gnome::Canvas::SimpleLine *> (Glib::wrap_auto ((GObject*)(object), take_copy));
61 } /* namespace Glib */
70 /* The *_Class implementation: */
72 const Glib::Class& SimpleLine_Class::init()
74 if(!gtype_) // create the GType if necessary
76 // Glib::Class has to know the class init function to clone custom types.
77 class_init_func_ = &SimpleLine_Class::class_init_function;
79 // This is actually just optimized away, apparently with no harm.
80 // Make sure that the parent type has been created.
81 //CppClassParent::CppObjectType::get_type();
83 // Create the wrapper type, with the same class/instance size as the base type.
84 register_derived_type(gnome_canvas_simpleline_get_type());
86 // Add derived versions of interfaces, if the C type implements any interfaces:
92 void SimpleLine_Class::class_init_function(void* g_class, void* class_data)
94 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
95 CppClassParent::class_init_function(klass, class_data);
100 Glib::ObjectBase* SimpleLine_Class::wrap_new(GObject* o)
102 return manage(new SimpleLine((GnomeCanvasSimpleLine*)(o)));
107 /* The implementation: */
109 SimpleLine::SimpleLine(const Glib::ConstructParams& construct_params)
111 Item(construct_params)
115 SimpleLine::SimpleLine(GnomeCanvasSimpleLine* castitem)
117 Item((GnomeCanvasItem*)(castitem))
121 SimpleLine::~SimpleLine()
126 SimpleLine::CppClassType SimpleLine::line_class_; // initialize static member
128 GType SimpleLine::get_type()
130 return line_class_.init().get_type();
133 GType SimpleLine::get_base_type()
135 return gnome_canvas_line_get_type();
138 Glib::PropertyProxy<guint> SimpleLine::property_color_rgba()
140 return Glib::PropertyProxy<guint>(this, "color_rgba");
143 Glib::PropertyProxy_ReadOnly<guint> SimpleLine::property_color_rgba() const
145 return Glib::PropertyProxy_ReadOnly<guint>(this, "color_rgba");
148 Glib::PropertyProxy<double> SimpleLine::property_x1()
150 return Glib::PropertyProxy<double>(this, "x1");
153 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_x1() const
155 return Glib::PropertyProxy_ReadOnly<double>(this, "x1");
158 Glib::PropertyProxy<double> SimpleLine::property_x2()
160 return Glib::PropertyProxy<double>(this, "x2");
163 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_x2() const
165 return Glib::PropertyProxy_ReadOnly<double>(this, "x2");
168 Glib::PropertyProxy<double> SimpleLine::property_y1()
170 return Glib::PropertyProxy<double>(this, "y1");
173 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_y1() const
175 return Glib::PropertyProxy_ReadOnly<double>(this, "y1");
178 Glib::PropertyProxy<double> SimpleLine::property_y2()
180 return Glib::PropertyProxy<double>(this, "y2");
183 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_y2() const
185 return Glib::PropertyProxy_ReadOnly<double>(this, "y2");
188 } // namespace Canvas