1/* $Id: path-def.hg,v 1.4 2002/04/04 14:04:33 aholzmann Exp $ */ 2 3/* path-def.h 4 * 5 * 6 * Copyright (C) 2002 The libgnomecanvasmm Development Team 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free 20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 */ 22 23#include <libgnomecanvasmm/point.h> 24#include <glibmm/containers.h> 25#include <libgnomecanvas/gnome-canvas-path-def.h> 26#include <libart_lgpl/art_bpath.h> 27#include <libart_lgpl/art_point.h> 28#include <libart_lgpl/art_bpath.h> 29 30_DEFS(libgnomecanvasmm,libgnomecanvas) 31 32namespace Gnome 33{ 34 35namespace Canvas 36{ 37 38class PathDef 39{ 40 _CLASS_OPAQUE_REFCOUNTED(PathDef, GnomeCanvasPathDef, gnome_canvas_path_def_new, gnome_canvas_path_def_duplicate, gnome_canvas_path_def_unref) 41 _IGNORE(gnome_canvas_path_def_ref, gnome_canvas_path_def_unref, gnome_canvas_path_def_copy, gnome_canvas_path_def_duplicate) 42 43public: 44 _WRAP_METHOD(static Glib::RefPtr<PathDef> create(), gnome_canvas_path_def_new) 45 _WRAP_METHOD(static Glib::RefPtr<PathDef> create(int length), gnome_canvas_path_def_new_sized) 46 _WRAP_METHOD(static Glib::RefPtr<PathDef> create(ArtBpath& bpath), gnome_canvas_path_def_new_from_bpath) 47 48 //GnomeCanvasPathDef * gnome_canvas_path_def_new_from_static_bpath (ArtBpath * bpath); 49 //GnomeCanvasPathDef * gnome_canvas_path_def_new_from_foreign_bpath (ArtBpath * bpath); 50 51 //GnomeCanvasPathDef * gnome_canvas_path_def_concat (const GSList * list); 52 //GSList * gnome_canvas_path_def_split (const GnomeCanvasPathDef * path); 53 _WRAP_METHOD(Glib::RefPtr<PathDef> open_parts(), gnome_canvas_path_def_open_parts) 54 _WRAP_METHOD(Glib::RefPtr<PathDef> closed_parts(), gnome_canvas_path_def_closed_parts) 55 _WRAP_METHOD(Glib::RefPtr<PathDef> close_all(), gnome_canvas_path_def_close_all) 56 57 _WRAP_METHOD(void finish(), gnome_canvas_path_def_finish) 58 _WRAP_METHOD(void ensure_space(int space), gnome_canvas_path_def_ensure_space) 59 60 _WRAP_METHOD(void reset(), gnome_canvas_path_def_reset) 61 62 _WRAP_METHOD(void moveto(double x, double y), gnome_canvas_path_def_moveto) 63 _WRAP_METHOD(void lineto(double x, double y), gnome_canvas_path_def_lineto) 64 65 _WRAP_METHOD(void lineto_moving(double x, double y), gnome_canvas_path_def_lineto_moving) 66 _WRAP_METHOD(void curveto(double x1, double y1, double x2, double y2, double x3, double y3), gnome_canvas_path_def_curveto) 67 _WRAP_METHOD(void closepath(), gnome_canvas_path_def_closepath) 68 69 _WRAP_METHOD(void closepath_current(), gnome_canvas_path_def_closepath_current) 70 71 Gnome::Art::Point currentpoint() const; 72 73 _WRAP_METHOD(ArtBpath* get_bpath() const, gnome_canvas_path_def_bpath) 74 _WRAP_METHOD(ArtBpath* first_bpath() const, gnome_canvas_path_def_first_bpath) 75 _WRAP_METHOD(ArtBpath* last_bpath() const, gnome_canvas_path_def_last_bpath) 76 77 _WRAP_METHOD(bool is_empty() const, gnome_canvas_path_def_is_empty) 78 _WRAP_METHOD(int length() const, gnome_canvas_path_def_length) 79 _WRAP_METHOD(bool has_currentpoint() const, gnome_canvas_path_def_has_currentpoint) 80 _WRAP_METHOD(bool any_open() const, gnome_canvas_path_def_any_open) 81 _WRAP_METHOD(bool all_open() const, gnome_canvas_path_def_all_open) 82 _WRAP_METHOD(bool any_closed() const, gnome_canvas_path_def_any_closed) 83 _WRAP_METHOD(bool all_closed() const, gnome_canvas_path_def_all_closed) 84}; 85 86} /* namespace Canvas */ 87 88} /* namespace Gnome */ 89