1 #ifndef __INK_EXTENSION_PARAMENUM_H__
2 #define __INK_EXTENSION_PARAMENUM_H__
4 /** \file
5 * Enumeration parameter for extensions.
6 */
8 /*
9 * Author:
10 * Johan Engelen <johan@shouraizou.nl>
11 *
12 * Copyright (C) 2006-2007 Johan Engelen
13 *
14 * Released under GNU GPL, read the file 'COPYING' for more information
15 */
17 #include <gtkmm/widget.h>
19 #include "xml/document.h"
20 #include "extension-forward.h"
22 #include "parameter.h"
24 namespace Inkscape {
25 namespace Extension {
29 // \brief A class to represent a notebookparameter of an extension
30 class ParamComboBox : public Parameter {
31 private:
32 /** \brief Internal value. This should point to a string that has
33 been allocated in memory. And should be free'd.
34 It is the value of the current selected string */
35 gchar * _value;
37 GSList * choices; /**< A table to store the choice strings */
39 public:
40 ParamComboBox(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
41 virtual ~ParamComboBox(void);
42 Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
43 Glib::ustring * string (void);
45 const gchar * get (const SPDocument * doc, const Inkscape::XML::Node * node) { return _value; }
46 const gchar * set (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node);
48 void changed (void);
49 }; /* class ParamComboBox */
55 } /* namespace Extension */
56 } /* namespace Inkscape */
58 #endif /* __INK_EXTENSION_PARAMENUM_H__ */
60 /*
61 Local Variables:
62 mode:c++
63 c-file-style:"stroustrup"
64 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
65 indent-tabs-mode:nil
66 fill-column:99
67 End:
68 */
69 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :