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