From: cilix42 Date: Wed, 30 Jul 2008 10:56:44 +0000 (+0000) Subject: New 'internal' TextParam which doesn't display a widget (useful if the text should... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=40e75a00ae2d5d5eae03292b22742e71208e47d5;p=inkscape.git 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 --- 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 :