Code

Fixed messed up transformations because of a missing cairo_restore() and removed...
[inkscape.git] / src / extension / paramradiobutton.h
1 #ifndef __INK_EXTENSION_PARAMRADIOBUTTON_H__
2 #define __INK_EXTENSION_PARAMRADIOBUTTON_H__
4 /** \file
5  * Radiobutton 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 radiobutton parameter of an extension
30 class ParamRadioButton : 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     ParamRadioButton(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
41     virtual ~ParamRadioButton(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 ParamRadioButton */
53 }  /* namespace Extension */
54 }  /* namespace Inkscape */
56 #endif /* __INK_EXTENSION_PARAMRADIOBUTTON_H__ */