Code

d98bbf4417231775e4e942c233ee0e4b589fb6b7
[inkscape.git] / src / live_effects / parameter / text.h
1 #ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_TEXT_H
2 #define INKSCAPE_LIVEPATHEFFECT_PARAMETER_TEXT_H
4 /*
5  * Inkscape::LivePathEffectParameters
6  *
7  * Authors:
8  *   Maximilian Albert
9  *   Johan Engelen
10  *
11  * Copyright (C) Maximilian Albert 2008 <maximilian.albert@gmail.com>
12  *
13  * Released under GNU GPL, read the file 'COPYING' for more information
14  */
16 #include <glib/gtypes.h>
18 #include "display/canvas-text.h"
19 #include "live_effects/parameter/parameter.h"
21 namespace Inkscape {
23 namespace LivePathEffect {
25 class TextParam : public Parameter {
26 public:
27     TextParam( const Glib::ustring& label,
28                const Glib::ustring& tip,
29                const Glib::ustring& key,
30                Inkscape::UI::Widget::Registry* wr,
31                Effect* effect,
32                const Glib::ustring default_value = "");
33     virtual ~TextParam();
35     virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
37     virtual bool param_readSVGValue(const gchar * strvalue);
38     virtual gchar * param_getSVGValue() const;
40     void param_setValue(const Glib::ustring newvalue);
41     virtual void param_set_default();
42     void setPos(Geom::Point pos);
43     void setAnchor(double x_value, double y_value);
45     const Glib::ustring get_value() { return defvalue; };
47 private:
48     TextParam(const TextParam&);
49     TextParam& operator=(const TextParam&);
50     double anchor_x;
51     double anchor_y;
53     Glib::ustring defvalue;
55     SPCanvasText *canvas_text;
56 };
59 } //namespace LivePathEffect
61 } //namespace Inkscape
63 #endif