1 #ifndef __INK_EXTENSION_PARAMFLOAT_H
2 #define __INK_EXTENSION_PARAMFLOAT_H
4 /*
5 * Copyright (C) 2005-2007 Authors:
6 * Ted Gould <ted@gould.cx>
7 * Johan Engelen <johan@shouraizou.nl> *
8 * Released under GNU GPL, read the file 'COPYING' for more information
9 */
11 #include <gtkmm/widget.h>
12 #include <xml/node.h>
13 #include <document.h>
14 #include "parameter.h"
16 namespace Inkscape {
17 namespace Extension {
19 class ParamFloat : public Parameter {
20 private:
21 /** \brief Internal value. */
22 float _value;
23 float _min;
24 float _max;
25 public:
26 ParamFloat (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
27 /** \brief Returns \c _value */
28 float get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
29 float set (float in, SPDocument * doc, Inkscape::XML::Node * node);
30 float max (void) { return _max; }
31 float min (void) { return _min; }
32 Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
33 Glib::ustring * string (void);
34 };
36 } /* namespace Extension */
37 } /* namespace Inkscape */
39 #endif /* __INK_EXTENSION_PARAMFLOAT_H */
41 /*
42 Local Variables:
43 mode:c++
44 c-file-style:"stroustrup"
45 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
46 indent-tabs-mode:nil
47 fill-column:99
48 End:
49 */
50 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :