point.h revision 9cadd148aa37a81210a58fc68e5c8c72ab7ea125
299N/A#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_POINT_H
299N/A#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_POINT_H
1356N/A
299N/A/*
1356N/A * Inkscape::LivePathEffectParameters
299N/A *
299N/A* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
919N/A *
919N/A * Released under GNU GPL, read the file 'COPYING' for more information
919N/A */
919N/A
919N/A#include <glib.h>
919N/A#include <2geom/point.h>
919N/A
919N/A#include "live_effects/parameter/parameter.h"
919N/A
919N/A#include "knot-holder-entity.h"
919N/A
919N/Anamespace Inkscape {
919N/A
919N/Anamespace LivePathEffect {
919N/A
919N/Aclass PointParamKnotHolderEntity;
919N/A
299N/Aclass PointParam : public Geom::Point, public Parameter {
299N/Apublic:
299N/A PointParam( const Glib::ustring& label,
299N/A const Glib::ustring& tip,
493N/A const Glib::ustring& key,
299N/A Inkscape::UI::Widget::Registry* wr,
970N/A Effect* effect,
977N/A const gchar *handle_tip = NULL,
970N/A Geom::Point default_value = Geom::Point(0,0) ); // tip for automatically associated on-canvas handle
970N/A virtual ~PointParam();
1356N/A
1356N/A virtual Gtk::Widget * param_newWidget();
1356N/A
299N/A bool param_readSVGValue(const gchar * strvalue);
1107N/A gchar * param_getSVGValue() const;
299N/A inline const gchar *handleTip() const { return handle_tip ? handle_tip : param_tooltip.c_str(); }
911N/A void param_setValue(Geom::Point newpoint, bool write = false);
1107N/A void param_set_default();
1107N/A Geom::Point param_get_default() const;
911N/A void param_update_default(Geom::Point newpoint);
299N/A virtual void param_transform_multiply(Geom::Affine const& /*postmul*/, bool /*set*/);
1157N/A
299N/A void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color);
299N/A
1069N/A virtual bool providesKnotHolderEntities() const { return true; }
493N/A virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item);
299N/A
300N/A friend class PointParamKnotHolderEntity;
493N/Aprivate:
300N/A PointParam(const PointParam&);
493N/A PointParam& operator=(const PointParam&);
375N/A Geom::Point defvalue;
970N/A KnotHolder *knoth;
970N/A SPKnotShapeType knot_shape;
970N/A SPKnotModeType knot_mode;
299N/A guint32 knot_color;
gchar *handle_tip;
};
} //namespace LivePathEffect
} //namespace Inkscape
#endif