/*
* Authors:
* Ted Gould <ted@gould.cx>
* Abhishek Sharma
*
* Copyright (C) 2007-2008 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#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 "document-undo.h"
#include "desktop.h"
#include "sp-namedview.h"
#include "display/sp-canvas.h"
namespace Inkscape {
namespace Extension {
/** \brief Create an execution environment that will allow the effect
to execute independently.
\param effect The effect that we should execute
\param doc The Document to execute on
\param docCache The cache created for that document
\param show_working Show the working dialog
\param show_error Show the error dialog (not working)
Grabs the selection of the current document so that it can get
restored. Will generate a document cache if one isn't provided.
*/
ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Implementation::ImplementationDocumentCache * docCache, bool show_working, bool show_errors) :
{
selected_id = (*x)->getId();
//std::cout << "Selected: " << selected_id << std::endl;
}
}
genDocCache();
return;
}
/** \brief Destroy an execution environment
Destroys the dialog if created and the document cache.
*/
ExecutionEnv::~ExecutionEnv (void) {
if (_visibleDialog != NULL) {
_visibleDialog->hide();
delete _visibleDialog;
}
killDocCache();
return;
}
/** \brief Generate a document cache if needed
If there isn't one we create a new one from the implementation
from the effect's implementation.
*/
void
// printf("Gen Doc Cache\n");
}
return;
}
/** \brief Destory a document cache
Just delete it.
*/
void
// printf("Killed Doc Cache\n");
delete _docCache;
}
return;
}
/** \brief Create the working dialog
Builds the dialog with a message saying that the effect is working.
And make sure to connect to the cancel.
*/
void
if (_visibleDialog != NULL) {
_visibleDialog->hide();
delete _visibleDialog;
}
return;
false, // use markup
true); // modal
_visibleDialog->show();
}
return;
}
void
cancel();
undo();
return;
}
void
return;
}
void
reselect();
return;
}
void
killDocCache();
return;
}
void
}
}
return;
}
void
if (_show_working) {
}
// _runComplete.signal();
return;
}
void
}
bool
if (_mainloop) {
}
conn.disconnect();
}
return true;
}
} } /* 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 :