From 71917528fa6897d596be4260fbb85a9a2ef9fe07 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Wed, 30 Jul 2008 10:56:44 +0000 Subject: 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) --- src/live_effects/parameter/text.cpp | 4 ---- src/live_effects/parameter/text.h | 30 +++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) (limited to 'src/live_effects/parameter') 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 : -- cgit v1.2.3