Code

r15506@tres: ted | 2007-05-24 22:30:55 -0700
[inkscape.git] / src / extension / paramenum.h
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;
36     
37     GSList * choices; /**< A table to store the choice strings  */
38     
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     ~ParamComboBox(void);
42     Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
43     Glib::ustring * string (void);
44         
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);
47 }; /* class ParamComboBox */
53 }  /* namespace Extension */
54 }  /* namespace Inkscape */
56 #endif /* __INK_EXTENSION_PARAMENUM_H__ */
58 /*
59   Local Variables:
60   mode:c++
61   c-file-style:"stroustrup"
62   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
63   indent-tabs-mode:nil
64   fill-column:99
65   End:
66 */
67 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :