pointparam-knotholder.cpp revision 15e3dcef1404b66dcfd4658e63d2323fc41b98f0
/*
* Container for PointParamKnotHolder visual handles
*
* Authors:
* Johan Engelen <goejendaagh@zonnet.nl>
*
* Copyright (C) 2008 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/parameter/pointparam-knotholder.h"
#include "live_effects/lpeobject.h"
#include "document.h"
#include "sp-shape.h"
#include "knot.h"
#include "knotholder.h"
#include "knot-holder-entity.h"
#include "svg/stringstream.h"
class SPDesktop;
namespace Inkscape {
static void pointparam_knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state, PointParamKnotHolder *kh);
static void pointparam_knot_ungrabbed_handler (SPKnot *knot, unsigned int state, PointParamKnotHolder *kh);
PointParamKnotHolder::PointParamKnotHolder(SPDesktop *desktop, SPObject *lpeobject, const gchar * key, SPItem *item)
{
g_print ("Error! Throw an exception, please!\n");
}
this->local_change = FALSE;
}
{
}
class KnotHolderEntityPointParam : public LPEKnotHolderEntity {
public:
};
}
void
KnotHolderEntityPointParam::knot_set(NR::Point const &/*p*/, NR::Point const &/*origin*/, guint /*state*/) {
}
void
// TODO: check if knot_click being ignored is bad:
PointParamKnotHolderClickedFunc /*knot_click*/,
{
/* create new SPKnotHolderEntry */
KnotHolderEntity *e = new KnotHolderEntityPointParam();
// Move to current point.
e->handler_id = g_signal_connect(e->knot, "moved", G_CALLBACK(pointparam_knot_moved_handler), this);
e->_click_handler_id = g_signal_connect(e->knot, "clicked", G_CALLBACK(pointparam_knot_clicked_handler), this);
e->_ungrab_handler_id = g_signal_connect(e->knot, "ungrabbed", G_CALLBACK(pointparam_knot_ungrabbed_handler), this);
sp_knot_show(e->knot);
}
static void pointparam_knot_clicked_handler(SPKnot */*knot*/, guint /*state*/, PointParamKnotHolder */*kh*/)
{
}
/**
* \param p In desktop coordinates.
* This function does not write to XML, but tries to write directly to the PointParam to quickly live update the effect
*/
static void pointparam_knot_moved_handler(SPKnot */*knot*/, NR::Point const *p, guint /*state*/, PointParamKnotHolder *kh)
{
}
static void pointparam_knot_ungrabbed_handler(SPKnot *knot, unsigned int /*state*/, PointParamKnotHolder *kh)
{
sp_document_done(SP_OBJECT_DOCUMENT (kh->lpeobject), SP_VERB_CONTEXT_LPE, _("Change LPE point parameter"));
}
} // 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:encoding=utf-8:textwidth=99 :