/*
* Inkscape::ShapeEditor
*
* Authors:
* bulia byak <buliabyak@users.sf.net>
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include "desktop.h"
#include "document.h"
#include "gc-anchored.h"
#include "knotholder.h"
#include "ui/object-edit.h"
#include "sp-item.h"
#include "sp-object.h"
#include "ui/shape-editor.h"
#include "xml/node-event-vector.h"
//using Inkscape::createKnotHolder;
namespace Inkscape {
namespace UI {
this->knotholder = NULL;
this->knotholder_listener_attached_for = NULL;
}
ShapeEditor::~ShapeEditor() {
unset_item();
}
if (this->knotholder) {
}
if (!keep_knotholder) {
delete this->knotholder;
this->knotholder = NULL;
}
}
}
return this->knotholder != NULL;
}
if (this->knotholder)
this->knotholder->update_knots();
}
}
if (this->knotholder) {
}
}
if (this->has_knotholder()) {
}
return item;
}
void ShapeEditor::event_attr_changed(Inkscape::XML::Node *, gchar const *name, gchar const *, gchar const *, bool, void *data)
{
bool changed_kh = false;
if (sh->has_knotholder())
{
if (changed_kh) {
// this can happen if an LPEItem's knotholder handle was dragged, in which case we want
// to keep the knotholder; in all other cases (e.g., if the LPE itself changes) we delete it
}
}
}
NULL, /* child_added */
NULL, /* child_removed */
NULL, /* content_changed */
NULL /* order_changed */
};
if (_blockSetItem) {
return;
}
// this happens (and should only happen) when for an LPEItem having both knotholder and
// nodepath the knotholder is adapted; in this case we don't want to delete the knotholder
// since this freezes the handles
if (item) {
if (!this->knotholder) {
// only recreate knotholder if none is present
}
if (this->knotholder) {
this->knotholder->update_knots();
// setting new listener
if (repr != knotholder_listener_attached_for) {
}
}
}
}
/** FIXME: This thing is only called when the item needs to be updated in response to repr change.
Why not make a reload function in KnotHolder? */
{
if (knotholder) {
SPObject *obj = desktop->getDocument()->getObjectByRepr(knotholder_listener_attached_for); /// note that it is not certain that this is an SPItem; it could be a LivePathEffectObject.
}
}
/**
* Returns true if this ShapeEditor has a knot above which the mouse currently hovers.
*/
if (this->knotholder) {
return knotholder->knot_mouseover();
}
return false;
}
} // namespace UI
} // namespace Inkscape
/*
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 :