3c4b13198efc812411bfc8a271332ac97b07d951
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 Gtk::Dialog * _visibleDialog;
29 bool _prefsVisible;
30 bool _finished;
31 bool _humanWait;
32 bool _canceled;
33 bool _prefsChanged;
34 bool _livePreview;
35 Glib::RefPtr<Glib::MainLoop> _mainloop;
36 Inkscape::UI::View::View * _doc;
37 std::list<Glib::ustring> _selected;
39 public:
40 Effect * _effect;
42 ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk::Widget * controls = NULL);
43 ~ExecutionEnv (void);
45 void run (void);
46 void preferencesChange (void);
47 void livePreview (bool state = true);
49 private:
50 void createPrefsDialog (Gtk::Widget * controls);
51 void createWorkingDialog (void);
52 void workingCanceled (const int resp);
53 void preferencesResponse (const int resp);
54 void processingCancel (void);
55 void processingComplete(void);
56 void documentCancel (void);
57 void documentCommit (void);
58 void reselect (void);
59 };
61 } } /* namespace Inkscape, Extension */
62 #endif /* INKSCAPE_EXTENSION_EXECUTION_ENV_H__ */
64 /*
65 Local Variables:
66 mode:c++
67 c-file-style:"stroustrup"
68 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
69 indent-tabs-mode:nil
70 fill-column:99
71 End:
72 */
73 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :