livepatheffect-editor.cpp revision 3ae3dd4eb0191cc986a035c790b8b97e6c6e4ee4
/**
* \brief LivePathEffect dialog
*
* Authors:
* Johan Engelen <j.b.c.engelen@utwente.nl>
*
* Copyright (C) 2007 Author
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "livepatheffect-editor.h"
#include "verbs.h"
#include "selection.h"
#include "sp-shape.h"
#include "sp-path.h"
#include "live_effects/effect.h"
#include "live_effects/lpeobject.h"
#include <vector>
#include "inkscape.h"
#include "desktop-handles.h"
#include "desktop.h"
#include "document-private.h"
#include "xml/document.h"
namespace Inkscape {
class Application;
namespace UI {
namespace Dialog {
/*####################
* Callback functions
*/
{
}
/*#######################
* LivePathEffectEditor
*/
effectapplication_frame(_("Apply new effect")),
effectcontrol_frame(_("Current effect")),
{
// connect callback functions to buttons
}
{
if (effectwidget) {
delete effectwidget;
effectwidget = NULL;
}
if (current_desktop) {
}
}
void
{
if (effectwidget) {
delete effectwidget;
effectwidget = NULL;
}
if (effectwidget) {
}
// fixme: add resizing of dialog
}
void
{
if (effectwidget) {
delete effectwidget;
effectwidget = NULL;
}
// fixme: do resizing of dialog ?
}
void
{
}
void
{
if ( item ) {
if ( SP_IS_SHAPE(item) ) {
set_sensitize_all(true);
if (lpeobj) {
} else {
showText(_("Unknown effect is applied"));
}
} else {
showText(_("No effect applied"));
button_remove.set_sensitive(false);
}
} else {
showText(_("Item is not a shape or path"));
set_sensitize_all(false);
}
} else {
showText(_("Only one item can be selected"));
set_sensitize_all(false);
}
} else {
showText(_("Empty selection"));
set_sensitize_all(false);
}
}
void
{
if ( desktop == current_desktop ) {
return;
}
if (current_desktop) {
}
if (desktop) {
} else {
}
}
/*########################################################################
# BUTTON CLICK HANDLERS (callbacks)
########################################################################*/
// TODO: factor out the effect applying code which can be called from anywhere. (selection-chemistry.cpp also needs it)
void
{
if (!data) return;
SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc))->addChild(repr, NULL); // adds to <defs> and assigns the 'id' attribute
// make sure there is an original-d for paths!!!
if ( SP_IS_PATH(item) ) {
}
}
}
_("Create and apply path effect"));
}
}
}
void
{
_("Remove path effect") );
}
}
}
} // namespace Dialog
} // namespace UI
} // namespace Inkscape