livepatheffect-editor.cpp revision 3a356a32592211bcef5a7e9adc44532d64e0b71e
/**
* \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
*/
{
}
static void lpeeditor_selection_modified (Inkscape::Selection *selection, guint flags, gpointer data)
{
}
{
if (!desktop) {
return;
}
}
/*#######################
* LivePathEffectEditor
*/
effectapplication_frame(_("Apply new effect")),
effectcontrol_frame(_("Current effect")),
{
// Top level vbox
// connect callback functions to buttons
// connect callback functions to changes in selected desktop.
G_CALLBACK(lpeeditor_desktop_change), this);
G_CALLBACK(lpeeditor_desktop_change), this);
}
{
if (effectwidget) {
effectwidget = NULL;
}
if (current_desktop) {
}
}
void
{
if (effectwidget) {
effectwidget = NULL;
}
if (effectwidget) {
}
// fixme: do resizing of dialog
}
void
{
if (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