effect.cpp revision 8bc547b01926fa6f998028afe7298d32e65d48da
/*
* Authors:
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2002-2006 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "inkscape-private.h"
#include "document.h"
#include "prefdialog.h"
#include "implementation/implementation.h"
#include "effect.h"
/* Inkscape::Extension::Effect */
namespace Inkscape {
namespace Extension {
{
// This is a weird hack
return;
for (child_repr = sp_repr_children(child_repr); child_repr != NULL; child_repr = child_repr->next()) {
// printf("Found local effects menu in %s\n", this->get_name());
}
// 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 (_effects_list != NULL) {
}
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 (!loaded())
if (!loaded()) return false;
// std::cout << "No preferences for Effect" << std::endl;
return true;
}
delete dialog;
return false;
}
/**
\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
{
if (!loaded())
if (!loaded()) return;
set_last_effect(this);
return;
}
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;
}
/** \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;
// std::cout << "Executing: " << effect->get_name() << std::endl;
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 :