summaryrefslogtreecommitdiffstats
path: root/src/extension/implementation/script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/implementation/script.h')
-rw-r--r--src/extension/implementation/script.h170
1 files changed, 128 insertions, 42 deletions
diff --git a/src/extension/implementation/script.h b/src/extension/implementation/script.h
index e13ffbb13..98c4a9fef 100644
--- a/src/extension/implementation/script.h
+++ b/src/extension/implementation/script.h
@@ -27,51 +27,137 @@ namespace Inkscape {
namespace Extension {
namespace Implementation {
+
+
+/**
+ * Utility class used for loading and launching script extensions
+ */
class Script : public Implementation {
-private:
- gchar * command; /**< The command that has been dirived from
- the configuration file with appropriate
- directories */
- gchar * helper_extension;
- /**< This is the extension that will be used
- as the helper to read in or write out the
- data */
- /** This function actually does the work, everything else is preparing
- for this function. It is the core here */
- int execute (gchar const *command,
- gchar const *filein,
- gchar const *fileout);
- /** Just a quick function to find and resolve relative paths for
- the incoming scripts */
- gchar * solve_reldir (Inkscape::XML::Node *reprin);
- bool check_existance (gchar const *command);
- void copy_doc (Inkscape::XML::Node * olddoc, Inkscape::XML::Node * newdoc);
- void checkStderr (gchar * filename, Gtk::MessageType type, gchar * message);
public:
- Script (void);
- virtual bool load (Inkscape::Extension::Extension *module);
- virtual void unload (Inkscape::Extension::Extension *module);
- virtual bool check (Inkscape::Extension::Extension *module);
- virtual Gtk::Widget * prefs_input (Inkscape::Extension::Input *module,
- gchar const *filename);
- virtual SPDocument * open (Inkscape::Extension::Input *module,
- gchar const *filename);
- virtual Gtk::Widget * prefs_output (Inkscape::Extension::Output *module);
- virtual void save (Inkscape::Extension::Output *module,
- SPDocument *doc,
- gchar const *filename);
- virtual Gtk::Widget *
- prefs_effect (Inkscape::Extension::Effect *module,
- Inkscape::UI::View::View * view);
- virtual void effect (Inkscape::Extension::Effect *module,
- Inkscape::UI::View::View *doc);
-
-};
-
-} /* Inkscape */
-} /* Extension */
-} /* Implementation */
+
+ /**
+ *
+ */
+ Script(void);
+
+ /**
+ *
+ */
+ virtual ~Script();
+
+
+ /**
+ *
+ */
+ virtual bool load(Inkscape::Extension::Extension *module);
+
+ /**
+ *
+ */
+ virtual void unload(Inkscape::Extension::Extension *module);
+
+ /**
+ *
+ */
+ virtual bool check(Inkscape::Extension::Extension *module);
+
+ /**
+ *
+ */
+ virtual Gtk::Widget *prefs_input(Inkscape::Extension::Input *module,
+ const Glib::ustring &filename);
+
+
+ /**
+ *
+ */
+ virtual SPDocument *open(Inkscape::Extension::Input *module,
+ const Glib::ustring &filename);
+
+ /**
+ *
+ */
+ virtual Gtk::Widget *prefs_output(Inkscape::Extension::Output *module);
+
+ /**
+ *
+ */
+ virtual void save(Inkscape::Extension::Output *module,
+ SPDocument *doc,
+ const Glib::ustring &filename);
+ /**
+ *
+ */
+ virtual Gtk::Widget *prefs_effect(Inkscape::Extension::Effect *module,
+ Inkscape::UI::View::View * view);
+
+ /**
+ *
+ */
+ virtual void effect(Inkscape::Extension::Effect *module,
+ Inkscape::UI::View::View *doc);
+
+
+
+private:
+
+ /**
+ * The command that has been dirived from
+ * the configuration file with appropriate directories
+ */
+ Glib::ustring command;
+
+ /**
+ * This is the extension that will be used
+ * as the helper to read in or write out the
+ * data
+ */
+ Glib::ustring helper_extension;
+
+ /**
+ * This function actually does the work, everything else is preparing
+ * for this function. It is the core here
+ */
+ int execute (const Glib::ustring &command,
+ const Glib::ustring &filein,
+ const Glib::ustring &fileout);
+
+ /**
+ * Just a quick function to find and resolve relative paths for
+ * the incoming scripts
+ */
+ Glib::ustring solve_reldir (Inkscape::XML::Node *reprin);
+
+ /**
+ *
+ */
+ bool check_existance (const Glib::ustring &command);
+
+ /**
+ *
+ */
+ void copy_doc (Inkscape::XML::Node * olddoc,
+ Inkscape::XML::Node * newdoc);
+
+ /**
+ *
+ */
+ void checkStderr (const Glib::ustring &filename,
+ Gtk::MessageType type,
+ const Glib::ustring &message);
+
+
+}; // class Script
+
+
+
+
+
+} // namespace Implementation
+} // namespace Extension
+} // namespace Inkscape
+
#endif /* __INKSCAPE_EXTENSION_IMPEMENTATION_SCRIPT_H__ */
/*