Code

r16430@tres: ted | 2007-08-30 20:32:23 -0700
[inkscape.git] / src / extension / execution-env.h
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     bool _selfdelete;
36     sigc::signal<void> * _changeSignal;
37     Glib::RefPtr<Glib::MainLoop> _mainloop;
38     Inkscape::UI::View::View * _doc;
39     std::list<Glib::ustring> _selected;
40     sigc::connection _dialogsig;
41     sigc::connection _changesig;
42     sigc::connection _timersig;
44 public:
45     Effect * _effect;
47     ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk::Widget * controls = NULL, sigc::signal<void> * changeSignal = NULL, Gtk::Dialog * prefDialog = NULL);
48     ~ExecutionEnv (void);
50     void run (void);
51     void livePreview (bool state = true);
52     void shutdown (bool del = false);
54 private:
55     void createPrefsDialog (Gtk::Widget * controls);
56     void createWorkingDialog (void);
57     void workingCanceled (const int resp);
58     void preferencesResponse (const int resp);
59     void preferencesChange (void);
60     bool preferencesTimer (void);
61     void processingCancel (void);
62     void processingComplete(void);
63     void documentCancel (void);
64     void documentCommit (void);
65     void reselect (void);
66 };
68 } }  /* namespace Inkscape, Extension */
69 #endif /* INKSCAPE_EXTENSION_EXECUTION_ENV_H__ */
71 /*
72   Local Variables:
73   mode:c++
74   c-file-style:"stroustrup"
75   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
76   indent-tabs-mode:nil
77   fill-column:99
78   End:
79 */
80 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :