livepatheffect-editor.cpp revision dd0ae0a28fda34d3805f7fe6deece97c4192910a
3832N/A#ifdef HAVE_CONFIG_H
3832N/A#include "livepatheffect-editor.h"
3832N/A#include "desktop-handles.h"
3832N/A#include "document.h"
4458N/A#include "document-undo.h"
3832N/A#include "inkscape.h"
3832N/A#include "live_effects/effect.h"
3832N/A#include "live_effects/lpeobject.h"
4692N/A#include "live_effects/lpeobject-reference.h"
4692N/A#include "path-chemistry.h"
4776N/A#include "selection-chemistry.h"
4776N/A#include "selection.h"
4776N/A#include "sp-item-group.h"
4776N/A#include "sp-lpe-item.h"
4692N/A#include "sp-shape.h"
4776N/A#include "ui/icon-names.h"
4776N/A#include "ui/widget/imagetoggler.h"
4692N/A#include "livepatheffect-add.h"
4458N/Astatic void lpeeditor_selection_modified (Inkscape::Selection * selection, guint /*flags*/, gpointer data)
5061N/A lpe_list_locked(false),
3832N/A button_add.set_image_from_icon_name(INKSCAPE_ICON("list-add"), Gtk::ICON_SIZE_SMALL_TOOLBAR);
3832N/A button_remove.set_image_from_icon_name(INKSCAPE_ICON("list-remove"), Gtk::ICON_SIZE_SMALL_TOOLBAR);
3832N/A image_remove->set_from_icon_name(INKSCAPE_ICON("list-remove"), Gtk::ICON_SIZE_SMALL_TOOLBAR);
4458N/A button_down.set_image_from_icon_name(INKSCAPE_ICON("go-down"), Gtk::ICON_SIZE_SMALL_TOOLBAR);
4458N/A effectlist_selection->signal_changed().connect( sigc::mem_fun(*this, &LivePathEffectEditor::on_effect_selection_changed) );
4495N/A Inkscape::UI::Widget::ImageToggler *eyeRenderer = Gtk::manage( new Inkscape::UI::Widget::ImageToggler(
4495N/A eyeRenderer->signal_toggled().connect( sigc::mem_fun(*this, &LivePathEffectEditor::on_visibility_toggled) );
4458N/A button_remove.signal_clicked().connect(sigc::mem_fun(*this, &LivePathEffectEditor::onRemove));
4458N/A desktopChangeConn = deskTrack.connectDesktopChanged( sigc::mem_fun(*this, &LivePathEffectEditor::setDesktop) );
4458N/A if (effectwidget) {
4458N/A delete effectwidget;
3832N/A if (current_desktop) {
5061N/A if (effectwidget) {
4458N/A delete effectwidget;
4458N/A if (effectwidget) {
4458N/A if (effectwidget) {
4458N/A delete effectwidget;
4458N/A //combo_effecttype.set_sensitive(sensitive);
4458N/A if (lpe_list_locked) {
4458N/A lpe_list_locked = false;
4495N/A set_sensitize_all(true);
4495N/A lpe_list_locked = true;
4458N/A // Note that an SP_USE cannot have an LPE applied, so we only need to worry about the "add effect" case.
4458N/A set_sensitize_all(true);
4458N/A set_sensitize_all(false);
4458N/A set_sensitize_all(false);
4458N/A set_sensitize_all(false);
4458N/A set_sensitize_all(false);
3832N/A if (current_desktop) {
3832N/A lpe_list_locked = false;
5105N/A// TODO: factor out the effect applying code which can be called from anywhere. (selection-chemistry.cpp also needs it)
5105N/A const Util::EnumData<LivePathEffect::EffectType>* data = LivePathEffectAdd::getActiveData();
4645N/A lpe_list_locked = false;
5105N/A // Check that the cloning was successful. We don't want to change the ID of the original referenced path!
5105N/A lpe_list_locked = false;
if ( lpeitem ) {
if ( lpeitem ) {
/* FIXME: this explicit writing to SVG is wrong. The lpe_item should have a method to disable/enable an effect within its stack.
lpeobjref->lpeobject->get_lpe()->getRepr()->setAttribute("is_visible", newValue ? "true" : "false");