text.h revision c0537dcfe264414d52ad86579d57cb0cb2183dcb
107N/A#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_TEXT_H
107N/A#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_TEXT_H
107N/A
107N/A/*
107N/A * Inkscape::LivePathEffectParameters
107N/A *
107N/A * Authors:
107N/A * Maximilian Albert
107N/A * Johan Engelen
107N/A *
107N/A * Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
107N/A *
107N/A * Released under GNU GPL, read the file 'COPYING' for more information
107N/A */
107N/A
107N/A#include <glib.h>
107N/A
107N/A#include "display/canvas-bpath.h"
107N/A#include "live_effects/parameter/parameter.h"
107N/A
107N/Astruct SPCanvasText;
107N/A
2899N/Anamespace Inkscape {
107N/A
107N/Anamespace LivePathEffect {
107N/A
107N/Aclass TextParam : public Parameter {
107N/Apublic:
107N/A TextParam( const Glib::ustring& label,
618N/A const Glib::ustring& tip,
107N/A const Glib::ustring& key,
107N/A Inkscape::UI::Widget::Registry* wr,
844N/A Effect* effect,
844N/A const Glib::ustring default_value = "");
618N/A virtual ~TextParam() {}
1258N/A
107N/A virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
2899N/A
2899N/A virtual bool param_readSVGValue(const gchar * strvalue);
2000N/A virtual gchar * param_getSVGValue() const;
2000N/A
107N/A void param_setValue(const Glib::ustring newvalue);
107N/A virtual void param_set_default();
107N/A void setPos(Geom::Point pos);
107N/A void setPosAndAnchor(const Geom::Piecewise<Geom::D2<Geom::SBasis> > &pwd2,
107N/A const double t, const double length, bool use_curvature = false);
107N/A void setAnchor(double x_value, double y_value);
107N/A
107N/A const Glib::ustring get_value() { return defvalue; };
107N/A
107N/Aprivate:
107N/A TextParam(const TextParam&);
107N/A TextParam& operator=(const TextParam&);
107N/A double anchor_x;
107N/A double anchor_y;
107N/A
107N/A Glib::ustring value;
107N/A Glib::ustring defvalue;
107N/A
107N/A SPCanvasText *canvas_text;
107N/A};
107N/A
107N/A/*
107N/A * This parameter does not display a widget in the LPE dialog; LPEs can use it to display on-canvas
107N/A * text that should not be settable by the user. Note that since no widget is provided, the
151N/A * parameter must be initialized differently than usual (only with a pointer to the parent effect;
107N/A * no label, no tooltip, etc.).
2000N/A */
2000N/Aclass TextParamInternal : public TextParam {
107N/Apublic:
2000N/A TextParamInternal(Effect* effect) :
107N/A TextParam("", "", "", NULL, effect) {}
2000N/A
181N/A virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * /*tooltips*/) { return NULL; }
181N/A};
107N/A
107N/A} //namespace LivePathEffect
107N/A
107N/A} //namespace Inkscape
#endif
/*
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 :