Code

Make text widget for TextParams work and re-enable it
[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 "display/canvas-bpath.h"
20 #include "live_effects/parameter/parameter.h"
22 namespace Inkscape {
24 namespace LivePathEffect {
26 class TextParam : public Parameter {
27 public:
28     TextParam( const Glib::ustring& label,
29                const Glib::ustring& tip,
30                const Glib::ustring& key,
31                Inkscape::UI::Widget::Registry* wr,
32                Effect* effect,
33                const Glib::ustring default_value = "");
34     virtual ~TextParam();
36     virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
38     virtual bool param_readSVGValue(const gchar * strvalue);
39     virtual gchar * param_getSVGValue() const;
41     void param_setValue(const Glib::ustring newvalue);
42     virtual void param_set_default();
43     void setPos(Geom::Point pos);
44     void setAnchor(double x_value, double y_value);
46     const Glib::ustring get_value() { return defvalue; };
48 private:
49     TextParam(const TextParam&);
50     TextParam& operator=(const TextParam&);
51     double anchor_x;
52     double anchor_y;
54     Glib::ustring value;
55     Glib::ustring defvalue;
57     SPCanvasText *canvas_text;
58 };
61 } //namespace LivePathEffect
63 } //namespace Inkscape
65 #endif