effect.cpp revision 18f0fe2a37a130c6eff70868d574ee476f2b84cc
/*
* Authors:
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2002-2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "inkscape-private.h"
#include "desktop-handles.h"
#include "selection.h"
#include "sp-namedview.h"
#include "document.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_doc = true;
}
for (Inkscape::XML::Node *effect_child = sp_repr_children(child); 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
}
if (_effects_list != NULL) {
if (!hidden)
}
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 {
}
int position = -1;
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)
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 (!loaded())
if (!loaded()) return false;
executionEnv.run();
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 sp_document_done to commit the changes to the undo
stack.
*/
void
{
//printf("Execute effect\n");
if (!loaded())
if (!loaded()) return;
executionEnv.run();
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
{
} else if (_last_effect == NULL) {
}
return;
}
#define EFFECTS_LIST "effects-list"
bool
{
if (menustruct == NULL) return false;
return true;
}
if (firstchild != NULL)
if (find_effects_list(firstchild))
return true;
}
return false;
}
Effect::get_info_widget(void)
{
return Extension::get_info_widget();
}
void
{
if (_prefDialog == NULL) {
} else {
}
return;
}
/** \brief Create an action for a \c EffectVerb
\param view Which view the action should be created for
\return The built action.
Calls \c make_action_helper with the \c vector.
*/
SPAction *
{
}
/** \brief Decode the verb code and take appropriate action */
void
{
// SPDocument * current_document = current_view->doc;
if (current_view == NULL) return;
if (ev->_showPrefs) {
} else {
}
return;
}
/**
* Action vector to define functions called if a staticly defined file verb
* is called.
*/
} } /* 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 :