diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-30 10:56:44 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-30 10:56:44 +0000 |
| commit | 71917528fa6897d596be4260fbb85a9a2ef9fe07 (patch) | |
| tree | 3a2b9aa85879defd51966e846984a1dddc14feeb | |
| parent | Make text widget for TextParams work and re-enable it (diff) | |
| download | inkscape-71917528fa6897d596be4260fbb85a9a2ef9fe07.tar.gz inkscape-71917528fa6897d596be4260fbb85a9a2ef9fe07.zip | |
New 'internal' TextParam which doesn't display a widget (useful if the text should not be settable by the user); lpe-ruler uses it now
(bzr r6470)
| -rw-r--r-- | src/live_effects/lpe-ruler.h | 2 | ||||
| -rw-r--r-- | src/live_effects/parameter/text.cpp | 4 | ||||
| -rw-r--r-- | src/live_effects/parameter/text.h | 30 |
3 files changed, 30 insertions, 6 deletions
diff --git a/src/live_effects/lpe-ruler.h b/src/live_effects/lpe-ruler.h index f19063271..7ebc62fdb 100644 --- a/src/live_effects/lpe-ruler.h +++ b/src/live_effects/lpe-ruler.h @@ -32,7 +32,7 @@ private: ScalarParam mark_distance; ScalarParam mark_length; ScalarParam scale; - TextParam info_text; + TextParamInternal info_text; LPERuler(const LPERuler&); LPERuler& operator=(const LPERuler&); }; diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp index bf11192dd..f55dca4d8 100644 --- a/src/live_effects/parameter/text.cpp +++ b/src/live_effects/parameter/text.cpp @@ -36,10 +36,6 @@ TextParam::TextParam( const Glib::ustring& label, const Glib::ustring& tip, sp_canvastext_set_coords (canvas_text, 0, 0); } -TextParam::~TextParam() -{ -} - void TextParam::param_set_default() { diff --git a/src/live_effects/parameter/text.h b/src/live_effects/parameter/text.h index ee47f028f..c3eddd9fa 100644 --- a/src/live_effects/parameter/text.h +++ b/src/live_effects/parameter/text.h @@ -31,7 +31,7 @@ public: Inkscape::UI::Widget::Registry* wr, Effect* effect, const Glib::ustring default_value = ""); - virtual ~TextParam(); + virtual ~TextParam() {} virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips); @@ -57,9 +57,37 @@ private: SPCanvasText *canvas_text; }; +/* + * This parameter does not display a widget in the LPE dialog; LPEs can use it to display text that + * should not be settable by the user + */ +class TextParamInternal : public TextParam { +public: + TextParamInternal(const Glib::ustring& label, + const Glib::ustring& tip, + const Glib::ustring& key, + Inkscape::UI::Widget::Registry* wr, + Effect* effect, + const Glib::ustring default_value = "") : + TextParam(label, tip, key, wr, effect, default_value) {} + //virtual ~TextParamInternal() {} + + virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips) { return NULL; } +}; } //namespace LivePathEffect } //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 : |
