summaryrefslogtreecommitdiffstats
path: root/src/extension/parameter.h
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2006-05-02 05:25:04 +0000
committergouldtj <gouldtj@users.sourceforge.net>2006-05-02 05:25:04 +0000
commitaea5af93c482fe70b18055bbe1853cdfe866a7ef (patch)
tree5f72fd4e63f123d40269af39e6389e1e0e8af649 /src/extension/parameter.h
parent(bzr r668) (diff)
downloadinkscape-aea5af93c482fe70b18055bbe1853cdfe866a7ef.tar.gz
inkscape-aea5af93c482fe70b18055bbe1853cdfe866a7ef.zip
r11450@tres: ted | 2006-04-17 22:08:15 -0700
Adding the _scope and _desc variables for the base parameters. Currently they're just initialized to NULL and USER, but now they can start to be used for more. (bzr r669)
Diffstat (limited to 'src/extension/parameter.h')
-rw-r--r--src/extension/parameter.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/extension/parameter.h b/src/extension/parameter.h
index d527421ed..54b5e554e 100644
--- a/src/extension/parameter.h
+++ b/src/extension/parameter.h
@@ -27,6 +27,16 @@ private:
Inkscape::Extension::Extension * extension;
/** \brief The name of this parameter. */
gchar * _name;
+ /** \brief Description of the parameter. */
+ gchar * _desc;
+ /** \brief List of possible scopes. */
+ typedef enum {
+ SCOPE_USER, /**< Parameter value is saved in the user's configuration file. (default) */
+ SCOPE_DOCUMENT, /**< Parameter value is saved in the document. */
+ SCOPE_NODE /**< Parameter value is attached to the node. */
+ } _scope_t;
+ /** \brief Scope of the parameter. */
+ _scope_t _scope;
protected:
/** \brief Text for the GUI selection of this. */
@@ -34,8 +44,17 @@ protected:
gchar * pref_name (void);
public:
- Parameter (const gchar * name, const gchar * guitext, Inkscape::Extension::Extension * ext);
- virtual ~Parameter(void);
+ Parameter (const gchar * name,
+ const gchar * guitext,
+ const gchar * desc,
+ const Parameter::_scope_t scope,
+ Inkscape::Extension::Extension * ext);
+ Parameter (const gchar * name,
+ const gchar * guitext,
+ Inkscape::Extension::Extension * ext) {
+ Parameter(name, guitext, NULL, Parameter::SCOPE_USER, ext);
+ };
+ virtual ~Parameter (void);
bool get_bool (const Inkscape::XML::Document * doc,
const Inkscape::XML::Node * node);
int get_int (const Inkscape::XML::Document * doc,