1 /*
2 * Authors:
3 * Ted Gould <ted@gould.cx>
4 *
5 * Copyright (C) 2007 Authors
6 *
7 * Released under GNU GPL, read the file 'COPYING' for more information
8 */
10 #ifndef INKSCAPE_EXTENSION_EXECUTION_ENV_H__
11 #define INKSCAPE_EXTENSION_EXECUTION_ENV_H__
13 #include <config.h>
15 #include <glibmm/main.h>
16 #include <glibmm/ustring.h>
18 #include <gtkmm/dialog.h>
20 #include "forward.h"
21 #include "extension-forward.h"
23 namespace Inkscape {
24 namespace Extension {
26 class ExecutionEnv {
27 private:
28 Effect * _effect;
29 Gtk::Dialog * _visibleDialog;
30 bool _prefsVisible;
31 bool _finished;
32 bool _humanWait;
33 bool _canceled;
34 bool _prefsChanged;
35 Glib::RefPtr<Glib::MainLoop> _mainloop;
36 Inkscape::UI::View::View * _doc;
37 std::list<Glib::ustring> _selected;
39 public:
40 ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk::Widget * controls = NULL);
41 ~ExecutionEnv (void);
43 void run (void);
44 void preferencesChange (void);
46 private:
47 void createPrefsDialog (Gtk::Widget * controls);
48 void createWorkingDialog (void);
49 void workingCanceled (const int resp);
50 void preferencesResponse (const int resp);
51 void processingCancel (void);
52 void processingComplete(void);
53 void documentCancel (void);
54 void documentCommit (void);
55 void reselect (void);
56 };
58 } } /* namespace Inkscape, Extension */
59 #endif /* INKSCAPE_EXTENSION_EXECUTION_ENV_H__ */
61 /*
62 Local Variables:
63 mode:c++
64 c-file-style:"stroustrup"
65 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
66 indent-tabs-mode:nil
67 fill-column:99
68 End:
69 */
70 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :