Code

Add paramType() method to LPE parameter classes
[inkscape.git] / src / live_effects / parameter / bool.h
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 ParamType paramType() { return BOOL_PARAM; }
33     virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
35     virtual bool param_readSVGValue(const gchar * strvalue);
36     virtual gchar * param_writeSVGValue() const;
38     void param_setValue(bool newvalue);
39     virtual void param_set_default();
41     bool get_value() { return value; };
43     inline operator bool()
44         { return value; };
46 private:
47     BoolParam(const BoolParam&);
48     BoolParam& operator=(const BoolParam&);
50     bool value;
51     bool defvalue;
52 };
55 } //namespace LivePathEffect
57 } //namespace Inkscape
59 #endif