1 #ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_BOOL_H
2 #define INKSCAPE_LIVEPATHEFFECT_PARAMETER_BOOL_H
4 /*
5 * Inkscape::LivePathEffectParameters
6 *
7 * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
12 #include <glib/gtypes.h>
14 #include "live_effects/parameter/parameter.h"
16 namespace Inkscape {
18 namespace LivePathEffect {
21 class BoolParam : public Parameter {
22 public:
23 BoolParam( const Glib::ustring& label,
24 const Glib::ustring& tip,
25 const Glib::ustring& key,
26 Inkscape::UI::Widget::Registry* wr,
27 Effect* effect,
28 bool default_value = false);
29 virtual ~BoolParam();
31 virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
33 virtual bool param_readSVGValue(const gchar * strvalue);
34 virtual gchar * param_getSVGValue() const;
36 void param_setValue(bool newvalue);
37 virtual void param_set_default();
39 bool get_value() { return value; };
41 inline operator bool()
42 { return value; };
44 private:
45 BoolParam(const BoolParam&);
46 BoolParam& operator=(const BoolParam&);
48 bool value;
49 bool defvalue;
50 };
53 } //namespace LivePathEffect
55 } //namespace Inkscape
57 #endif