execution-env.cpp revision 9b0657868c25a8c7ffc4c164975473d316bf001e
/*
* Authors:
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <config.h>
#include "gtkmm/messagedialog.h"
#include "execution-env.h"
#include "prefdialog.h"
#include "implementation/implementation.h"
#include "selection.h"
#include "effect.h"
#include "document.h"
#include "sp-namedview.h"
#include "desktop-handles.h"
#include "util/glib-list-iterators.h"
namespace Inkscape {
namespace Extension {
ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Gtk::Widget * controls, Gtk::Dialog * prefDialog) :
_prefsVisible(false),
_finished(false),
_humanWait(false),
_canceled(false),
_prefsChanged(false),
_livePreview(true),
_selfdelete(false),
++selected;
}
}
if (prefDialog == NULL) {
} else {
}
} else {
_prefsVisible = true;
}
return;
}
ExecutionEnv::~ExecutionEnv (void) {
delete _visibleDialog;
}
return;
}
void
ExecutionEnv::preferencesChange (void) {
//std::cout << "Preferences are a changin'" << std::endl;
_prefsChanged = true;
if (_humanWait) {
_humanWait = false;
} else {
}
return;
}
void
if (_visibleDialog != NULL) {
delete _visibleDialog;
}
_visibleDialog->show();
_dialogsig = _visibleDialog->signal_response().connect(sigc::mem_fun(this, &ExecutionEnv::preferencesResponse));
_prefsVisible = true;
return;
}
void
ExecutionEnv::createWorkingDialog (void) {
if (_visibleDialog != NULL) {
delete _visibleDialog;
}
false, // use markup
true); // modal
_dialogsig = _visibleDialog->signal_response().connect(sigc::mem_fun(this, &ExecutionEnv::workingCanceled));
_visibleDialog->show();
_prefsVisible = false;
return;
}
void
_finished = true;
return;
}
void
if (_humanWait) {
_finished = true;
} else {
}
} else {
if (_humanWait) {
} else {
}
_finished = true;
}
return;
}
void
ExecutionEnv::processingComplete(void) {
//std::cout << "Processing Complete" << std::endl;
if (_prefsChanged) { return; } // do it all again
if (_prefsVisible) {
_humanWait = true;
} else {
_finished = true;
}
return;
}
void
ExecutionEnv::processingCancel (void) {
return;
}
void
ExecutionEnv::documentCancel (void) {
_canceled = true;
return;
}
void
ExecutionEnv::documentCommit (void) {
return;
}
void
ExecutionEnv::reselect (void) {
}
}
return;
}
void
ExecutionEnv::run (void) {
while (!_finished) {
_canceled = false;
if (_humanWait || !_livePreview) {
} else {
_prefsChanged = false;
}
if (_canceled) {
reselect();
}
}
printf("Execution environment done running\n");
if (_selfdelete) {
delete this;
}
return;
}
void
if (_livePreview && !state) {
}
if (!_livePreview && state) {
_humanWait = false;
}
return;
}
void
printf("Shutting down Execution Environment\n");
if (_humanWait) {
} else {
}
_finished = true;
}
_selfdelete = del;
return;
}
} } /* namespace Inkscape, Extension */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :