X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-shape.h;h=4932687110fdb7c58eb9e79baac2778822749baa;hb=c7cf14ac71346f76ae219ce67fb88c1bd34832e2;hp=0a3b3e37f6308dea5fdd6f7107998bb4a209051f;hpb=3160bbbab034cde9669d9dbe736bd834b9cb0352;p=inkscape.git diff --git a/src/sp-shape.h b/src/sp-shape.h index 0a3b3e37f..493268711 100644 --- a/src/sp-shape.h +++ b/src/sp-shape.h @@ -1,11 +1,13 @@ -#ifndef __SP_SHAPE_H__ -#define __SP_SHAPE_H__ +#ifndef SEEN_SP_SHAPE_H +#define SEEN_SP_SHAPE_H /* * Base class for shapes, including element * * Author: * Lauris Kaplinski + * Abhishek Sharma + * Jon A. Cruz * * Copyright (C) 1999-2002 Lauris Kaplinski * Copyright (C) 2000-2001 Ximian, Inc. @@ -14,7 +16,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include "display/display-forward.h" #include "sp-lpe-item.h" #include "sp-marker-loc.h" #include <2geom/forward.h> @@ -31,81 +32,75 @@ struct SPDesktop; -//struct SPShape : public SPLPEItem { class SPShape : public SPLPEItem { - public: - SPCurve *curve; +public: + SPCurve *curve; - SPObject *marker[SP_MARKER_LOC_QTY]; - sigc::connection release_connect [SP_MARKER_LOC_QTY]; - sigc::connection modified_connect [SP_MARKER_LOC_QTY]; + SPObject *marker[SP_MARKER_LOC_QTY]; + sigc::connection release_connect [SP_MARKER_LOC_QTY]; + sigc::connection modified_connect [SP_MARKER_LOC_QTY]; - static GType getType (void); - void setShape (); - SPCurve * getCurve (); - void setCurve (SPCurve *curve, unsigned int owner); - void setCurveInsync (SPCurve *curve, unsigned int owner); - int hasMarkers () const; - int numberOfMarkers (int type); - private: - static void sp_shape_init (SPShape *shape); - static void sp_shape_finalize (GObject *object); + static GType getType (void); + void setShape (); + SPCurve * getCurve (); + void setCurve (SPCurve *curve, unsigned int owner); + void setCurveInsync (SPCurve *curve, unsigned int owner); + int hasMarkers () const; + int numberOfMarkers (int type); - static void sp_shape_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); - static void sp_shape_release (SPObject *object); +private: + static void sp_shape_init (SPShape *shape); + static void sp_shape_finalize (GObject *object); - static void sp_shape_set(SPObject *object, unsigned key, gchar const *value); - static void sp_shape_update (SPObject *object, SPCtx *ctx, unsigned int flags); - static void sp_shape_modified (SPObject *object, unsigned int flags); - static Inkscape::XML::Node *sp_shape_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); + static void sp_shape_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); + static void sp_shape_release (SPObject *object); - static void sp_shape_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags); - static NRArenaItem *sp_shape_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flags); - static void sp_shape_hide (SPItem *item, unsigned int key); - static void sp_shape_snappoints (SPItem const *item, std::vector &p, Inkscape::SnapPreferences const *snapprefs); + static void sp_shape_set(SPObject *object, unsigned key, gchar const *value); + static void sp_shape_update (SPObject *object, SPCtx *ctx, unsigned int flags); + static void sp_shape_modified (SPObject *object, unsigned int flags); + static Inkscape::XML::Node *sp_shape_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); - static void sp_shape_update_marker_view (SPShape *shape, NRArenaItem *ai); + static void sp_shape_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, unsigned const flags); + static NRArenaItem *sp_shape_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flags); + static void sp_shape_hide (SPItem *item, unsigned int key); + static void sp_shape_snappoints (SPItem const *item, std::vector &p, Inkscape::SnapPreferences const *snapprefs); + static void sp_shape_update_marker_view (SPShape *shape, NRArenaItem *ai); - friend class SPShapeClass; + + friend class SPShapeClass; }; -//struct SPShapeClass { class SPShapeClass { - public: - SPLPEItemClass item_class; +public: + SPLPEItemClass item_class; - /* Build bpath from extra shape attributes */ - void (* set_shape) (SPShape *shape); + /* Build bpath from extra shape attributes */ + void (* set_shape) (SPShape *shape); - private: - static SPLPEItemClass *parent_class; - static void sp_shape_class_init (SPShapeClass *klass); +private: + static SPLPEItemClass *parent_class; + static void sp_shape_class_init (SPShapeClass *klass); - friend class SPShape; + friend class SPShape; }; -//GType sp_shape_get_type (void); - -//void sp_shape_set_shape (SPShape *shape); - -/* Return duplicate of curve or NULL */ -//SPCurve *sp_shape_get_curve (SPShape *shape); - -// sets a curve, updates display -//void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner); - -// same as sp_shape_set_curve, but without updating display -//void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner); - -// markers API void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value); -//int sp_shape_has_markers (SPShape const *shape); -//int sp_shape_number_of_markers (SPShape* Shape, int type); Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2); Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c); Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c); -#endif +#endif // SEEN_SP_SHAPE_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :