Fixed compile warnings.
[ardour.git] / gtk2_ardour / simpleline.cc
1 // Generated by gtkmmproc -- DO NOT MODIFY!
2
3 #include "simpleline.h"
4 #include "simpleline_p.h"
5
6 /* $Id$ */
7
8 /* line.ccg
9  *
10  * Copyright (C) 1998 EMC Capital Management Inc.
11  * Developed by Havoc Pennington <hp@pobox.com>
12  *
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.
17  *
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.
22  *
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.
26  */
27
28 //#include <libgnomecanvasmm/group.h>
29
30 namespace Gnome
31 {
32
33 namespace Canvas
34 {
35
36 SimpleLine::SimpleLine(Group& parentx)
37   : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
38 {
39   item_construct(parentx);
40 }
41
42         SimpleLine::SimpleLine(Group& parentx, double x1, double y1, double x2, double y2)
43   : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
44 {
45   item_construct(parentx);
46   set ("x1", x1, "y1", y1, "x2", x2, "y2", y2, 0);
47 }
48
49 } /* namespace Canvas */
50 } /* namespace Gnome */
51
52
53 namespace Glib
54 {
55
56 Gnome::Canvas::SimpleLine* wrap(GnomeCanvasSimpleLine* object, bool take_copy)
57 {
58   return dynamic_cast<Gnome::Canvas::SimpleLine *> (Glib::wrap_auto ((GObject*)(object), take_copy));
59 }
60
61 } /* namespace Glib */
62
63 namespace Gnome
64 {
65
66 namespace Canvas
67 {
68
69
70 /* The *_Class implementation: */
71
72 const Glib::Class& SimpleLine_Class::init()
73 {
74   if(!gtype_) // create the GType if necessary
75   {
76     // Glib::Class has to know the class init function to clone custom types.
77     class_init_func_ = &SimpleLine_Class::class_init_function;
78
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();
82
83     // Create the wrapper type, with the same class/instance size as the base type.
84     register_derived_type(gnome_canvas_simpleline_get_type());
85
86     // Add derived versions of interfaces, if the C type implements any interfaces:
87   }
88
89   return *this;
90 }
91
92 void SimpleLine_Class::class_init_function(void* g_class, void* class_data)
93 {
94   BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
95   CppClassParent::class_init_function(klass, class_data);
96
97 }
98
99
100 Glib::ObjectBase* SimpleLine_Class::wrap_new(GObject* o)
101 {
102   return manage(new SimpleLine((GnomeCanvasSimpleLine*)(o)));
103
104 }
105
106
107 /* The implementation: */
108
109 SimpleLine::SimpleLine(const Glib::ConstructParams& construct_params)
110 :
111   Item(construct_params)
112 {
113   }
114
115 SimpleLine::SimpleLine(GnomeCanvasSimpleLine* castitem)
116 :
117   Item((GnomeCanvasItem*)(castitem))
118 {
119   }
120
121 SimpleLine::~SimpleLine()
122 {
123   destroy_();
124 }
125
126 SimpleLine::CppClassType SimpleLine::line_class_; // initialize static member
127
128 GType SimpleLine::get_type()
129 {
130   return line_class_.init().get_type();
131 }
132
133 GType SimpleLine::get_base_type()
134 {
135   return gnome_canvas_line_get_type();
136 }
137
138 Glib::PropertyProxy<guint> SimpleLine::property_color_rgba() 
139 {
140   return Glib::PropertyProxy<guint>(this, "color_rgba");
141 }
142
143 Glib::PropertyProxy_ReadOnly<guint> SimpleLine::property_color_rgba() const
144 {
145   return Glib::PropertyProxy_ReadOnly<guint>(this, "color_rgba");
146 }
147
148 Glib::PropertyProxy<double> SimpleLine::property_x1() 
149 {
150   return Glib::PropertyProxy<double>(this, "x1");
151 }
152
153 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_x1() const
154 {
155   return Glib::PropertyProxy_ReadOnly<double>(this, "x1");
156 }
157
158 Glib::PropertyProxy<double> SimpleLine::property_x2() 
159 {
160   return Glib::PropertyProxy<double>(this, "x2");
161 }
162
163 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_x2() const
164 {
165   return Glib::PropertyProxy_ReadOnly<double>(this, "x2");
166 }
167
168 Glib::PropertyProxy<double> SimpleLine::property_y1() 
169 {
170   return Glib::PropertyProxy<double>(this, "y1");
171 }
172
173 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_y1() const
174 {
175   return Glib::PropertyProxy_ReadOnly<double>(this, "y1");
176 }
177
178 Glib::PropertyProxy<double> SimpleLine::property_y2() 
179 {
180   return Glib::PropertyProxy<double>(this, "y2");
181 }
182
183 Glib::PropertyProxy_ReadOnly<double> SimpleLine::property_y2() const
184 {
185   return Glib::PropertyProxy_ReadOnly<double>(this, "y2");
186 }
187
188 } // namespace Canvas
189
190 } // namespace Gnome
191
192