Code

Node tool: special case node duplication for endnodes - select new endnode
[inkscape.git] / src / extension / input.h
1 /*
2  * Authors:
3  *   Ted Gould <ted@gould.cx>
4  *
5  * Copyright (C) 2002-2004 Authors
6  *
7  * Released under GNU GPL, read the file 'COPYING' for more information
8  */
11 #ifndef INKSCAPE_EXTENSION_INPUT_H__
12 #define INKSCAPE_EXTENSION_INPUT_H__
14 #include <exception>
15 #include <glib.h>
16 #include "extension.h"
17 #include "xml/repr.h"
18 #include "document.h"
19 #include <gtk/gtkdialog.h>
21 namespace Inkscape {
22 namespace Extension {
24 class Input : public Extension {
25     gchar *mimetype;             /**< What is the mime type this inputs? */
26     gchar *extension;            /**< The extension of the input files */
27     gchar *filetypename;         /**< A userfriendly name for the file type */
28     gchar *filetypetooltip;      /**< A more detailed description of the filetype */
30 public: /* this is a hack for this release, this will be private shortly */
31     gchar *output_extension;     /**< Setting of what output extension should be used */
33 public:
34     struct open_failed : public std::exception {
35         virtual ~open_failed() throw() {}
36         const char *what() const throw() { return "Open failed"; }
37     };
38     struct no_extension_found : public std::exception {
39         virtual ~no_extension_found() throw() {}
40         const char *what() const throw() { return "No suitable input extension found"; }
41     };
43                   Input                (Inkscape::XML::Node * in_repr,
44                                         Implementation::Implementation * in_imp);
45     virtual      ~Input                (void);
46     virtual bool  check                (void);
47     SPDocument *  open                 (gchar const *uri);
48     gchar *       get_mimetype         (void);
49     gchar *       get_extension        (void);
50     gchar *       get_filetypename     (void);
51     gchar *       get_filetypetooltip  (void);
52     bool          prefs                (gchar const *uri);
53 };
55 } }  /* namespace Inkscape, Extension */
56 #endif /* INKSCAPE_EXTENSION_INPUT_H__ */
58 /*
59   Local Variables:
60   mode:c++
61   c-file-style:"stroustrup"
62   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
63   indent-tabs-mode:nil
64   fill-column:99
65   End:
66 */
67 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :