1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include "simpleline.h"
4 #include "simpleline_p.h"
9 * Copyright (C) 1998 EMC Capital Management Inc.
10 * Developed by Havoc Pennington <hp@pobox.com>
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.
27 //#include <libgnomecanvasmm/group.h>
35 SimpleLine::SimpleLine(Group
& parentx
)
36 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
38 item_construct(parentx
);
41 SimpleLine::SimpleLine(Group
& parentx
, double x1
, double y1
, double x2
, double y2
)
42 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
44 item_construct(parentx
);
45 set ("x1", x1
, "y1", y1
, "x2", x2
, "y2", y2
, 0);
48 } /* namespace Canvas */
49 } /* namespace Gnome */
55 Gnome::Canvas::SimpleLine
* wrap(GnomeCanvasSimpleLine
* object
, bool take_copy
)
57 return dynamic_cast<Gnome::Canvas::SimpleLine
*> (Glib::wrap_auto ((GObject
*)(object
), take_copy
));
60 } /* namespace Glib */
69 /* The *_Class implementation: */
71 const Glib::Class
& SimpleLine_Class::init()
73 if(!gtype_
) // create the GType if necessary
75 // Glib::Class has to know the class init function to clone custom types.
76 class_init_func_
= &SimpleLine_Class::class_init_function
;
78 // This is actually just optimized away, apparently with no harm.
79 // Make sure that the parent type has been created.
80 //CppClassParent::CppObjectType::get_type();
82 // Create the wrapper type, with the same class/instance size as the base type.
83 register_derived_type(gnome_canvas_simpleline_get_type());
85 // Add derived versions of interfaces, if the C type implements any interfaces:
91 void SimpleLine_Class::class_init_function(void* g_class
, void* class_data
)
93 BaseClassType
*const klass
= static_cast<BaseClassType
*>(g_class
);
94 CppClassParent::class_init_function(klass
, class_data
);
99 Glib::ObjectBase
* SimpleLine_Class::wrap_new(GObject
* o
)
101 return manage(new SimpleLine((GnomeCanvasSimpleLine
*)(o
)));
106 /* The implementation: */
108 SimpleLine::SimpleLine(const Glib::ConstructParams
& construct_params
)
110 Item(construct_params
)
114 SimpleLine::SimpleLine(GnomeCanvasSimpleLine
* castitem
)
116 Item((GnomeCanvasItem
*)(castitem
))
120 SimpleLine::~SimpleLine()
125 SimpleLine::CppClassType
SimpleLine::line_class_
; // initialize static member
127 GType
SimpleLine::get_type()
129 return line_class_
.init().get_type();
132 GType
SimpleLine::get_base_type()
134 return gnome_canvas_line_get_type();
137 Glib::PropertyProxy
<guint
> SimpleLine::property_color_rgba()
139 return Glib::PropertyProxy
<guint
>(this, "color_rgba");
142 Glib::PropertyProxy_ReadOnly
<guint
> SimpleLine::property_color_rgba() const
144 return Glib::PropertyProxy_ReadOnly
<guint
>(this, "color_rgba");
147 Glib::PropertyProxy
<double> SimpleLine::property_x1()
149 return Glib::PropertyProxy
<double>(this, "x1");
152 Glib::PropertyProxy_ReadOnly
<double> SimpleLine::property_x1() const
154 return Glib::PropertyProxy_ReadOnly
<double>(this, "x1");
157 Glib::PropertyProxy
<double> SimpleLine::property_x2()
159 return Glib::PropertyProxy
<double>(this, "x2");
162 Glib::PropertyProxy_ReadOnly
<double> SimpleLine::property_x2() const
164 return Glib::PropertyProxy_ReadOnly
<double>(this, "x2");
167 Glib::PropertyProxy
<double> SimpleLine::property_y1()
169 return Glib::PropertyProxy
<double>(this, "y1");
172 Glib::PropertyProxy_ReadOnly
<double> SimpleLine::property_y1() const
174 return Glib::PropertyProxy_ReadOnly
<double>(this, "y1");
177 Glib::PropertyProxy
<double> SimpleLine::property_y2()
179 return Glib::PropertyProxy
<double>(this, "y2");
182 Glib::PropertyProxy_ReadOnly
<double> SimpleLine::property_y2() const
184 return Glib::PropertyProxy_ReadOnly
<double>(this, "y2");
187 } // namespace Canvas