1 // Generated by gtkmmproc -- DO NOT MODIFY!
2 
3 
4 #include <libgnomecanvasmm/path-def.h>
5 #include <libgnomecanvasmm/private/path-def_p.h>
6 
7 /* path-def.cc
8  *
9  * Copyright (C) 2002 The libgnomecanvasmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25 
26 
27 namespace Gnome
28 {
29 
30 namespace Canvas
31 {
currentpoint() const32 Gnome::Art::Point PathDef::currentpoint() const
33 {
34   Gnome::Art::Point point;
35   gnome_canvas_path_def_currentpoint(gobj(), point.gobj());
36   return point;
37 }
38 
39 
40 } /* namespace Canvas */
41 
42 } /* namespace Gnome */
43 namespace
44 {
45 } // anonymous namespace
46 
47 
48 /* Why reinterpret_cast<PathDef*>(gobject) is needed:
49  *
50  * A PathDef instance is in fact always a GnomeCanvasPathDef instance.
51  * Unfortunately, GnomeCanvasPathDef cannot be a member of PathDef,
52  * because it is an opaque struct.  Also, the C interface does not provide
53  * any hooks to install a destroy notification handler, thus we cannot
54  * wrap it dynamically either.
55  *
56  * The cast works because PathDef does not have any member data, and
57  * it is impossible to derive from it.  This is ensured by not implementing
58  * the (protected) default constructor.  The ctor is protected rather than
59  * private just to avoid a compile warning.
60  */
61 
62 namespace Glib
63 {
64 
wrap(GnomeCanvasPathDef * object,bool take_copy)65 Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy)
66 {
67   if(take_copy && object)
68     gnome_canvas_path_def_duplicate(object);
69 
70   // See the comment at the top of this file, if you want to know why the cast works.
71   return Glib::RefPtr<Gnome::Canvas::PathDef>(reinterpret_cast<Gnome::Canvas::PathDef*>(object));
72 }
73 
74 } // namespace Glib
75 
76 
77 namespace Gnome
78 {
79 
80 namespace Canvas
81 {
82 
83 
84 // static
create()85 Glib::RefPtr<PathDef> PathDef::create()
86 {
87   // See the comment at the top of this file, if you want to know why the cast works.
88   return Glib::RefPtr<PathDef>(reinterpret_cast<PathDef*>(gnome_canvas_path_def_new()));
89 }
90 
reference() const91 void PathDef::reference() const
92 {
93   // See the comment at the top of this file, if you want to know why the cast works.
94   gnome_canvas_path_def_duplicate(reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this)));
95 }
96 
unreference() const97 void PathDef::unreference() const
98 {
99   // See the comment at the top of this file, if you want to know why the cast works.
100   gnome_canvas_path_def_unref(reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this)));
101 }
102 
gobj()103 GnomeCanvasPathDef* PathDef::gobj()
104 {
105   // See the comment at the top of this file, if you want to know why the cast works.
106   return reinterpret_cast<GnomeCanvasPathDef*>(this);
107 }
108 
gobj() const109 const GnomeCanvasPathDef* PathDef::gobj() const
110 {
111   // See the comment at the top of this file, if you want to know why the cast works.
112   return reinterpret_cast<const GnomeCanvasPathDef*>(this);
113 }
114 
gobj_copy() const115 GnomeCanvasPathDef* PathDef::gobj_copy() const
116 {
117   // See the comment at the top of this file, if you want to know why the cast works.
118   GnomeCanvasPathDef *const gobject = reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this));
119   gnome_canvas_path_def_duplicate(gobject);
120   return gobject;
121 }
122 
123 
create(int length)124 Glib::RefPtr<PathDef> PathDef::create(int length)
125 {
126   return Glib::wrap(gnome_canvas_path_def_new_sized(length));
127 }
128 
129 
create(ArtBpath & bpath)130 Glib::RefPtr<PathDef> PathDef::create(ArtBpath& bpath)
131 {
132   return Glib::wrap(gnome_canvas_path_def_new_from_bpath(&(bpath)));
133 }
134 
135 
open_parts()136 Glib::RefPtr<PathDef> PathDef::open_parts()
137 {
138   return Glib::wrap(gnome_canvas_path_def_open_parts(gobj()));
139 }
140 
closed_parts()141 Glib::RefPtr<PathDef> PathDef::closed_parts()
142 {
143   return Glib::wrap(gnome_canvas_path_def_closed_parts(gobj()));
144 }
145 
close_all()146 Glib::RefPtr<PathDef> PathDef::close_all()
147 {
148   return Glib::wrap(gnome_canvas_path_def_close_all(gobj()));
149 }
150 
finish()151 void PathDef::finish()
152 {
153 gnome_canvas_path_def_finish(gobj());
154 }
155 
ensure_space(int space)156 void PathDef::ensure_space(int space)
157 {
158 gnome_canvas_path_def_ensure_space(gobj(), space);
159 }
160 
reset()161 void PathDef::reset()
162 {
163 gnome_canvas_path_def_reset(gobj());
164 }
165 
moveto(double x,double y)166 void PathDef::moveto(double x, double y)
167 {
168 gnome_canvas_path_def_moveto(gobj(), x, y);
169 }
170 
lineto(double x,double y)171 void PathDef::lineto(double x, double y)
172 {
173 gnome_canvas_path_def_lineto(gobj(), x, y);
174 }
175 
lineto_moving(double x,double y)176 void PathDef::lineto_moving(double x, double y)
177 {
178 gnome_canvas_path_def_lineto_moving(gobj(), x, y);
179 }
180 
curveto(double x1,double y1,double x2,double y2,double x3,double y3)181 void PathDef::curveto(double x1, double y1, double x2, double y2, double x3, double y3)
182 {
183 gnome_canvas_path_def_curveto(gobj(), x1, y1, x2, y2, x3, y3);
184 }
185 
closepath()186 void PathDef::closepath()
187 {
188 gnome_canvas_path_def_closepath(gobj());
189 }
190 
closepath_current()191 void PathDef::closepath_current()
192 {
193 gnome_canvas_path_def_closepath_current(gobj());
194 }
195 
get_bpath() const196 ArtBpath* PathDef::get_bpath() const
197 {
198   return gnome_canvas_path_def_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
199 }
200 
first_bpath() const201 ArtBpath* PathDef::first_bpath() const
202 {
203   return gnome_canvas_path_def_first_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
204 }
205 
last_bpath() const206 ArtBpath* PathDef::last_bpath() const
207 {
208   return gnome_canvas_path_def_last_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
209 }
210 
is_empty() const211 bool PathDef::is_empty() const
212 {
213   return gnome_canvas_path_def_is_empty(const_cast<GnomeCanvasPathDef*>(gobj()));
214 }
215 
length() const216 int PathDef::length() const
217 {
218   return gnome_canvas_path_def_length(const_cast<GnomeCanvasPathDef*>(gobj()));
219 }
220 
has_currentpoint() const221 bool PathDef::has_currentpoint() const
222 {
223   return gnome_canvas_path_def_has_currentpoint(const_cast<GnomeCanvasPathDef*>(gobj()));
224 }
225 
any_open() const226 bool PathDef::any_open() const
227 {
228   return gnome_canvas_path_def_any_open(const_cast<GnomeCanvasPathDef*>(gobj()));
229 }
230 
all_open() const231 bool PathDef::all_open() const
232 {
233   return gnome_canvas_path_def_all_open(const_cast<GnomeCanvasPathDef*>(gobj()));
234 }
235 
any_closed() const236 bool PathDef::any_closed() const
237 {
238   return gnome_canvas_path_def_any_closed(const_cast<GnomeCanvasPathDef*>(gobj()));
239 }
240 
all_closed() const241 bool PathDef::all_closed() const
242 {
243   return gnome_canvas_path_def_all_closed(const_cast<GnomeCanvasPathDef*>(gobj()));
244 }
245 
246 
247 } // namespace Canvas
248 
249 } // namespace Gnome
250 
251 
252