index 0129f4d742584e2fcec9c23bf63f0db726425321..936d2a907e44ae7777e53ba8bf624b49d0da843c 100644 (file)
#include <gtkmm/table.h>
#include <glibmm/ustring.h>
#include "xml/repr.h"
-#include "document.h"
#include "extension/extension-forward.h"
/** The key that is used to identify that the I/O should be autodetected */
#define INKSCAPE_EXTENSION_NS_NC "extension"
#define INKSCAPE_EXTENSION_NS "extension:"
+struct SPDocument;
+
namespace Inkscape {
namespace Extension {
state_t _state; /**< Which state the Extension is currently in */
std::vector<Dependency *> _deps; /**< Dependencies for this extension */
static std::ofstream error_file; /**< This is the place where errors get reported */
+ bool _gui;
protected:
Inkscape::XML::Node *repr; /**< The XML description of the Extension */
g_slist_length(parameters); };
/** \brief A function to get the the number of parameters that
are visible to the user that the extension has.
- \return The number of visible parameters.
-
+ \return The number of visible parameters.
+
\note Currently this just calls param_count as visible isn't implemented
but in the future it'll do something different. Please call
the appropriate function in code so that it'll work in the
class param_wrong_type {};
class param_not_color_param {};
class param_not_enum_param {};
+ class param_not_optiongroup_param {};
class param_not_string_param {};
class param_not_float_param {};
class param_not_int_param {};
class param_not_bool_param {};
-
- /** An error class for when a parameter is looked for that just
+
+ /** An error class for when a parameter is looked for that just
* simply doesn't exist */
class param_not_exist {};
-
- /** An error class for when a filename already exists, but the user
+
+ /** An error class for when a filename already exists, but the user
* doesn't want to overwrite it */
class no_overwrite {};
private:
void make_param (Inkscape::XML::Node * paramrepr);
-#if 0
- inline param_t * param_shared (const gchar * name,
- GSList * list);
-#endif
+
+ Parameter * get_param (const gchar * name);
+
public:
bool get_param_bool (const gchar * name,
const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
+
int get_param_int (const gchar * name,
const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
+
float get_param_float (const gchar * name,
const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
+
const gchar * get_param_string (const gchar * name,
const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
+
guint32 get_param_color (const gchar * name,
const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
+
const gchar * get_param_enum (const gchar * name,
const SPDocument * doc = NULL,
const Inkscape::XML::Node * node = NULL);
+
+ gchar const *get_param_optiongroup( gchar const * name,
+ SPDocument const * doc = 0,
+ Inkscape::XML::Node const * node = 0);
+
bool set_param_bool (const gchar * name,
bool value,
SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
+
int set_param_int (const gchar * name,
int value,
SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
+
float set_param_float (const gchar * name,
float value,
SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
+
const gchar * set_param_string (const gchar * name,
const gchar * value,
SPDocument * doc = NULL,
Inkscape::XML::Node * node = NULL);
+
+ gchar const * set_param_optiongroup(gchar const * name,
+ gchar const * value,
+ SPDocument * doc = 0,
+ Inkscape::XML::Node * node = 0);
+
guint32 set_param_color (const gchar * name,
guint32 color,
SPDocument * doc = NULL,
public:
Gtk::Widget * autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal = NULL);
void paramListString (std::list <std::string> & retlist);
+ void set_gui(bool s) { _gui = s; }
/* Extension editor dialog stuff */
public: