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;
38 sigc::connection _dialogsig;
40 public:
41 Effect * _effect;
43 ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk::Widget * controls = NULL, Gtk::Dialog * prefDialog = NULL);
44 ~ExecutionEnv (void);
46 void run (void);
47 void preferencesChange (void);
48 void livePreview (bool state = true);
49 void shutdown (void);
51 private:
52 void createPrefsDialog (Gtk::Widget * controls);
53 void createWorkingDialog (void);
54 void workingCanceled (const int resp);
55 void preferencesResponse (const int resp);
56 void processingCancel (void);
57 void processingComplete(void);
58 void documentCancel (void);
59 void documentCommit (void);
60 void reselect (void);
61 };
63 } } /* namespace Inkscape, Extension */
64 #endif /* INKSCAPE_EXTENSION_EXECUTION_ENV_H__ */
66 /*
67 Local Variables:
68 mode:c++
69 c-file-style:"stroustrup"
70 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71 indent-tabs-mode:nil
72 fill-column:99
73 End:
74 */
75 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :