14#include <gtkmm/dialog.h>
15#include <gtkmm/messagedialog.h>
47 _show_working(show_working)
123 auto const window =
dynamic_cast<Gtk::Window *
>(
root);
128 gchar * dlgmessage = g_strdup_printf(_(
"'%s' complete, loading result..."),
_effect->
get_name());
132 Gtk::MessageType::INFO,
133 Gtk::ButtonsType::CANCEL,
195 _selectionState = std::make_unique<Inkscape::SelectionState>(selection->getState());
222 _mainloop = Glib::MainLoop::create(
false);
RAII-style mechanism for creating a temporary undo-insensitive context.
static void done(SPDocument *document, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
static void cancel(SPDocument *document)
Effects are extensions that take a document and do something to it in place.
static void set_last_effect(Effect *in_effect)
Sets which effect was called last.
PrefDialog * get_pref_dialog()
void undo()
Undoes what the effect completed.
void createWorkingDialog()
Create the working dialog.
bool wait()
Wait for the effect to complete if it hasn't.
Gtk::Dialog * _visibleDialog
If there is a working dialog it'll be referenced right here.
state_t _state
What state the execution engine is in.
void workingCanceled(const int resp)
bool _show_working
Show the working dialog when the effect is executing.
virtual ~ExecutionEnv()
Destroy an execution environment.
Implementation::ImplementationDocumentCache * _docCache
A document cache if we were passed one.
Glib::RefPtr< Glib::MainLoop > _mainloop
In some cases we need a mainLoop, when we do, this is a pointer to it.
void commit()
Commit the changes to the document.
std::unique_ptr< Inkscape::SelectionState > _selectionState
Saved selection state before running the effect.
ExecutionEnv(Effect *effect, SPDesktop *desktop, Implementation::ImplementationDocumentCache *docCache=nullptr, bool show_working=true, bool show_errors=true)
Create a new context for execution of an effect.
sigc::signal< void()> _runComplete
Signal that the run is complete.
void killDocCache()
Destroy a document cache.
void cancel()
Cancel the execution of the effect.
SPDesktop * _desktop
The desktop containing the document that we're working on.
void run()
Starts the execution of the effect.
void genDocCache()
Generate a document cache if needed.
Effect * _effect
The effect that we're executing in this context.
char const * get_name() const
Get the name of this extension - not a copy don't delete!
Implementation::Implementation * get_imp()
A cache for the document and this implementation.
virtual bool cancelProcessing()
virtual void commitDocument()
virtual ImplementationDocumentCache * newDocCache(Inkscape::Extension::Extension *, SPDesktop *)
Create a new document cache object.
virtual void effect(Inkscape::Extension::Effect *, ExecutionEnv *, SPDesktop *, ImplementationDocumentCache *)
void enforceIds()
Assign IDs to selected objects that don't have an ID attribute Checks if the object's id attribute is...
The set of selected SPObjects for a given document and layer model.
To do: update description of desktop.
Inkscape::UI::Widget::Canvas * getCanvas() const
InkscapeWindow const * getInkscapeWindow() const
Inkscape::Selection * getSelection() const
void clearWaitingCursor()
Editable view implementation.
TODO: insert short description here.
Inkscape - An SVG editor.
Helper class to stream background task notifications as a series of messages.