/*
* Authors:
* Ted Gould <ted@gould.cx>
* Abhishek Sharma
*
* Copyright (C) 2002-2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "prefdialog.h"
#include "inkscape.h"
#include "selection.h"
#include "sp-namedview.h"
#include "desktop.h"
#include "implementation/implementation.h"
#include "effect.h"
#include "execution-env.h"
#include "timer.h"
/* Inkscape::Extension::Effect */
namespace Inkscape {
namespace Extension {
{
// This is a weird hack
return;
bool hidden = false;
no_doc = false;
no_live_preview = false;
no_doc = true;
}
if (child->attribute("needs-live-preview") && !strcmp(child->attribute("needs-live-preview"), "false")) {
no_live_preview = true;
}
for (Inkscape::XML::Node *effect_child = child->firstChild(); effect_child != NULL; effect_child = effect_child->next()) {
// printf("Found local effects menu in %s\n", this->get_name());
hidden = true;
}
}
// printf("Found local effects menu in %s\n", this->get_name());
}
// printf("Found local effects menu in %s\n", this->get_name());
}
} // children of "effect"
break; // there can only be one effect
} // find "effect"
} // children of "inkscape-extension"
} // if we have an XML file
// \TODO this gets called from the Inkscape::Application constructor, where it initializes the menus.
// But in the constructor, our object isn't quite there yet!
if (_effects_list == NULL)
if (_filters_list == NULL)
}
if (!hidden) {
if (_filters_list &&
} else if (_effects_list) {
}
}
}
return;
}
void
/* printf("Merge menu with '%s' '%s' '%s'\n",
base != NULL ? base->name() : "NULL",
patern != NULL ? patern->name() : "NULL",
mergee != NULL ? mergee->name() : "NULL"); */
// Merge the verb name
} else {
}
for (menupass = start; menupass != NULL && strcmp(menupass->name(), "separator"); menupass = menupass->next()) {
continue;
}
if (compare_char == NULL)
}
/* This will cause us to skip tags we don't understand */
if (compare_char == NULL) {
continue;
}
break;
}
break;
}
} // for menu items
} // start != NULL
if (position != -1)
}
}
return;
}
{
if (get_last_effect() == this)
if (_menu_node)
return;
}
bool
{
/** \todo Check to see if parent has this as its only child,
if so, delete it too */
if (_menu_node != NULL)
_menu_node = NULL;
return false;
}
return true;
}
bool
{
if (_prefDialog != NULL) {
_prefDialog->raise();
return true;
}
if (param_visible_count() == 0) {
return true;
}
if (!loaded())
if (!loaded()) return false;
_prefDialog->show();
return true;
}
/**
\brief The function that 'does' the effect itself
\param doc The Inkscape::UI::View::View to do the effect on
This function first insures that the extension is loaded, and if not,
loads it. It then calls the implemention to do the actual work. It
also resets the last effect pointer to be this effect. Finally, it
executes a \c SPDocumentUndo::done to commit the changes to the undo
stack.
*/
void
{
//printf("Execute effect\n");
if (!loaded())
if (!loaded()) return;
executionEnv.run();
if (executionEnv.wait()) {
} else {
}
return;
}
/** \brief Sets which effect was called last
\param in_effect The effect that has been called
This function sets the static variable \c _last_effect and it
ensures that the last effect verb is sensitive.
If the \c in_effect variable is \c NULL then the last effect
verb is made insesitive.
*/
void
{
if (in_effect) {
// We don't want these "effects" to register as the last effect,
// this wouldn't be helpful to the user who selects a real effect,
// then goes to the help file (implemented as an effect), then goes
// back to the effect, only to see it written over by the help file
// selection.
// This snippet should fix this bug:
}
} else if (_last_effect == NULL) {
}
return;
}
{
return child;
}
if (firstchild != NULL) {
if (found)
return found;
}
}
return NULL;
}
{
return Extension::get_info_widget();
}
void
{
return;
}
SPAction *
{
}
/** \brief Decode the verb code and take appropriate action */
void
{
if (ev->_showPrefs) {
} else {
}
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 :