summaryrefslogtreecommitdiffstats
path: root/src/extension/prefdialog/parameter-notebook.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/prefdialog/parameter-notebook.h')
-rw-r--r--src/extension/prefdialog/parameter-notebook.h59
1 files changed, 23 insertions, 36 deletions
diff --git a/src/extension/prefdialog/parameter-notebook.h b/src/extension/prefdialog/parameter-notebook.h
index f1e16308b..8f6243fc8 100644
--- a/src/extension/prefdialog/parameter-notebook.h
+++ b/src/extension/prefdialog/parameter-notebook.h
@@ -24,63 +24,50 @@ namespace Gtk {
class Widget;
}
+namespace Glib {
+class ustring;
+}
+
namespace Inkscape {
namespace Extension {
class Extension;
-/** A class to represent a notebookparameter of an extension. */
+/** A class to represent a notebook parameter of an extension. */
class ParamNotebook : public Parameter {
private:
- /**
- * Internal value. This should point to a string that has
- * been allocated in memory. And should be free'd.
- * It is the name of the current page.
- */
- gchar * _value;
+ /** Internal value. */
+ Glib::ustring _value;
/**
- * A class to represent the pages of a notebookparameter of an extension.
+ * A class to represent the pages of a notebook parameter of an extension.
*/
class ParamNotebookPage : public Parameter {
private:
- std::vector<Parameter *> parameters; /**< A table to store the parameters for this page.
- This only gets created if there are parameters on this
- page */
+ /** A table to store the parameters for this page.
+ * This only gets created if there are parameters on this page */
+ std::vector<Parameter *> parameters;
public:
- static ParamNotebookPage * makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension * in_ext);
-
- ParamNotebookPage(const gchar * name,
- const gchar * text,
- const gchar * description,
- bool hidden,
- Inkscape::Extension::Extension * ext,
- Inkscape::XML::Node * xml);
+ ParamNotebookPage(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext);
~ParamNotebookPage() override;
- Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) override;
+ Gtk::Widget *get_widget(SPDocument *doc, Inkscape::XML::Node *node, sigc::signal<void> *changeSignal) override;
void paramString (std::list <std::string> &list);
- gchar * get_text () {return _text;};
- Parameter * get_param (const gchar * name) override;
+ gchar *get_text () {return _text;};
+ Parameter *get_param (const gchar *name) override;
}; /* class ParamNotebookPage */
+ /** A table to store the pages with parameters for this notebook.
+ * This only gets created if there are pages in this notebook */
+ std::vector<ParamNotebookPage*> pages;
- std::vector<ParamNotebookPage*> pages; /**< A table to store the pages with parameters for this notebook.
- This only gets created if there are pages in this
- notebook */
public:
- ParamNotebook(const gchar * name,
- const gchar * text,
- const gchar * description,
- bool hidden,
- int indent,
- Inkscape::Extension::Extension * ext,
- Inkscape::XML::Node * xml);
+ ParamNotebook(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext);
~ParamNotebook() override;
- Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) override;
+ Gtk::Widget *get_widget(SPDocument *doc, Inkscape::XML::Node *node, sigc::signal<void> *changeSignal) override;
/**
* A function to get the currentpage and the parameters in a string form.
@@ -92,10 +79,10 @@ public:
void string(std::string &string) const override {return Parameter::string(string);}
- Parameter * get_param (const gchar * name) override;
+ Parameter *get_param (const gchar *name) override;
- const gchar * get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
- const gchar * set (const int in, SPDocument * doc, Inkscape::XML::Node * node);
+ const Glib::ustring& get (const SPDocument * /*doc*/, const Inkscape::XML::Node * /*node*/) { return _value; }
+ const Glib::ustring& set (const int in, SPDocument *doc, Inkscape::XML::Node *node);
}; /* class ParamNotebook */