1 #ifndef __INKSCAPE_BINDING_H__
2 #define __INKSCAPE_BINDING_H__
3 /**
4 * This file is an attempt to provide a hierarchical design
5 * to wrap Inkscape in an OO model. This file is parsed by Swig
6 * to produce scripting extension modules for such interpreters
7 * as Python or Perl
8 *
9 * Authors:
10 * Bob Jamison <rjamison@titan.com>
11 *
12 * Copyright (C) 2004 Authors
13 *
14 * Released under GNU GPL, read the file 'COPYING' for more information
15 */
17 /*
18 * Note: we are doc-ing this file instead of the .cpp since
19 * the .cpp file has impl's, not def's of these classes.
20 * Also note that you need to understand Swig before you edit this file.
21 */
24 namespace Inkscape {
25 namespace Extension {
26 namespace Script {
28 class Inkscape;
29 class DialogManager;
30 class Desktop;
31 class Document;
35 /**
36 * Get the root Inkscape object. The module wrapper should
37 * always call this first so that there will be an 'inkscape'
38 * object available to the user.
39 */
40 Inkscape *getInkscape();
43 /**
44 * Root inkscape object. Owner of everything
45 */
46 class Inkscape
47 {
48 public:
50 /**
51 *
52 */
53 Inkscape(){}
55 /**
56 *
57 */
58 virtual ~Inkscape(){};
60 /**
61 *
62 */
63 virtual Desktop *getDesktop() = 0;
65 /**
66 *
67 */
68 virtual DialogManager *getDialogManager() = 0;
70 };
72 /**
73 * Controller for the various Inkscape dialogs
74 */
75 class DialogManager
76 {
77 public:
79 /**
80 *
81 */
82 DialogManager(){}
84 /**
85 *
86 */
87 virtual ~DialogManager(){};
89 /**
90 *
91 */
92 virtual void showAbout() = 0;
94 };
97 /**
98 *
99 */
100 class Desktop
101 {
103 public:
105 /**
106 *
107 */
108 Desktop() {}
110 /**
111 *
112 */
113 virtual ~Desktop(){};
115 /**
116 *
117 */
118 virtual Document *getDocument() = 0;
120 };
124 /**
125 *
126 */
127 class Document
128 {
130 public:
132 /**
133 *
134 */
135 Document() {};
137 /**
138 *
139 */
140 virtual ~Document(){};
142 /**
143 *
144 */
145 virtual void hello() = 0;
148 };
151 }//namespace Script
152 }//namespace Extension
153 }//namespace Inkscape
157 #endif /*__INKSCAPE_BINDING_H__*/
159 /*
160 Local Variables:
161 mode:c++
162 c-file-style:"stroustrup"
163 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
164 indent-tabs-mode:nil
165 fill-column:99
166 End:
167 */
168 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :