libgnomecanvasmm
path-def.h
Go to the documentation of this file.
1// -*- c++ -*-
2// Generated by gtkmmproc -- DO NOT MODIFY!
3#ifndef _LIBGNOMECANVASMM_PATH_DEF_H
4#define _LIBGNOMECANVASMM_PATH_DEF_H
5
6
7#include <glibmm.h>
8
9/* $Id: path-def.hg,v 1.4 2002/04/04 14:04:33 aholzmann Exp $ */
10
11/* path-def.h
12 *
13 *
14 * Copyright (C) 2002 The libgnomecanvasmm Development Team
15 *
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 2.1 of the License, or (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free
28 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30
32#include <glibmm/containers.h>
33#include <libgnomecanvas/gnome-canvas-path-def.h>
34#include <libart_lgpl/art_bpath.h>
35#include <libart_lgpl/art_point.h>
36#include <libart_lgpl/art_bpath.h>
37
38
39namespace Gnome
40{
41
42namespace Canvas
43{
44
46{
47 public:
48#ifndef DOXYGEN_SHOULD_SKIP_THIS
49 typedef PathDef CppObjectType;
50 typedef GnomeCanvasPathDef BaseObjectType;
51#endif /* DOXYGEN_SHOULD_SKIP_THIS */
52
53 static Glib::RefPtr<PathDef> create();
54
55 // For use with Glib::RefPtr<> only.
56 void reference() const;
57 void unreference() const;
58
60 GnomeCanvasPathDef* gobj();
61
63 const GnomeCanvasPathDef* gobj() const;
64
66 GnomeCanvasPathDef* gobj_copy() const;
67
68protected:
69 // Do not derive this. Gnome::Canvas::PathDef can neither be constructed nor deleted.
71 void operator delete(void*, size_t);
72
73private:
74 // noncopyable
75 PathDef(const PathDef&);
76 PathDef& operator=(const PathDef&);
77
78
79public:
80 //gtkmmproc error: gnome_canvas_path_def_new : method defs lookup failed (1)
81
89 static Glib::RefPtr<PathDef> create(int length);
90
103 static Glib::RefPtr<PathDef> create(ArtBpath& bpath);
104
105 //GnomeCanvasPathDef * gnome_canvas_path_def_new_from_static_bpath (ArtBpath * bpath);
106 //GnomeCanvasPathDef * gnome_canvas_path_def_new_from_foreign_bpath (ArtBpath * bpath);
107
108 //GnomeCanvasPathDef * gnome_canvas_path_def_concat (const GSList * list);
109 //GSList * gnome_canvas_path_def_split (const GnomeCanvasPathDef * path);
110
115 Glib::RefPtr<PathDef> open_parts();
116
122 Glib::RefPtr<PathDef> closed_parts();
123
129 Glib::RefPtr<PathDef> close_all();
130
131
134 void finish();
135
141 void ensure_space(int space);
142
143
146 void reset();
147
148
155 void moveto(double x, double y);
156
162 void lineto(double x, double y);
163
164
173 void lineto_moving(double x, double y);
174
183 void curveto(double x1, double y1, double x2, double y2, double x3, double y3);
184
189 void closepath();
190
191
196
198
199
204 ArtBpath* get_bpath() const;
205
210 ArtBpath* first_bpath() const;
211
217 ArtBpath* last_bpath() const;
218
219
224 bool is_empty() const;
225
231 int length() const;
232
238 bool has_currentpoint() const;
239
244 bool any_open() const;
245
250 bool all_open() const;
251
256 bool any_closed() const;
257
262 bool all_closed() const;
263
264
265};
266
267} /* namespace Canvas */
268
269} /* namespace Gnome */
270
271
272namespace Glib
273{
274
283 Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy = false);
284
285} // namespace Glib
286
287
288#endif /* _LIBGNOMECANVASMM_PATH_DEF_H */
289
Wrapper for ArtPoint struct.
Definition: point.h:40
Definition: path-def.h:46
GnomeCanvasPathDef * gobj()
Provides access to the underlying C instance.
Glib::RefPtr< Gnome::Canvas::PathDef > wrap(GnomeCanvasPathDef *object, bool take_copy=false)
A Glib::wrap() method for this object.
static Glib::RefPtr< PathDef > create(ArtBpath &bpath)
This function constructs a new #gnome_canvas_path_def and uses the passed bpath as the contents.
bool is_empty() const
This function is a boolean test to see if the path is empty, meaning containing no line segments.
void reference() const
bool any_closed() const
This function returns a boolean valid indicating if the path has any closed segements.
Gnome::Art::Point currentpoint() const
void reset()
This function clears the contents of the passed path.
void lineto_moving(double x, double y)
This functions adds a new line segment with loose endpoint to the path, or if endpoint is already loo...
const GnomeCanvasPathDef * gobj() const
Provides access to the underlying C instance.
static Glib::RefPtr< PathDef > create(int length)
This funtion creates a new #gnome_canvas_path_def with length number of points allocated.
void finish()
Trims dynamic point array to exact length of path.
static Glib::RefPtr< PathDef > create()
ArtBpath * last_bpath() const
This function returns pointer to the last ArtBpath segment in the path definition.
bool any_open() const
This function returns a boolean value indicating if the path has any open segments.
int length() const
This function returns the length of the path definition.
Glib::RefPtr< PathDef > open_parts()
This function creates a new GnomeCanvasPathDef that contains all of the open segments on the passed p...
ArtBpath * first_bpath() const
This function returns the first ArtBpath point in the definition.
Glib::RefPtr< PathDef > close_all()
This function closes all of the open segments in the passed path and returns a new GnomeCanvasPathDef...
void moveto(double x, double y)
This function adds starts new subpath on path, and sets its starting point to x and y.
void unreference() const
bool has_currentpoint() const
This function is a boolean test checking to see if the path has a current point defined.
Glib::RefPtr< PathDef > closed_parts()
This function returns a new GnomeCanvasPathDef that contains the all of close parts of passed path.
void ensure_space(int space)
This function ensures that enough space for space points is allocated at the end of the path.
ArtBpath * get_bpath() const
This function returns a ArtBpath that consists of the path definition.
bool all_closed() const
This function returns a boolean value indicating if the path only contains closed segments.
bool all_open() const
This function returns a boolean value indicating if the path only contains open segments.
GnomeCanvasPathDef * gobj_copy() const
Provides access to the underlying C instance. The caller is responsible for unrefing it....
void lineto(double x, double y)
This function add a line segment to the passed path with the specified x and y coordinates.
void closepath_current()
This function closes the last subpath by setting the coordinates of the endpoint of the last segment ...
void curveto(double x1, double y1, double x2, double y2, double x3, double y3)
This function adds a bezier curve segment to the path definition.
void closepath()
This function closes the last subpath of path, adding a ART_LINETO to subpath starting point,...
Definition: bpath.h:150
Definition: affinetrans.h:30