knotholder.cpp revision f951374eef04129c6a0d213e7ab4d9ed2095ca69
#define __KNOT_HOLDER_C__
/*
* Container for SPKnot visual handles
*
* Authors:
* Mitsuru Oka <oka326@parkcity.ne.jp>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 2001-2005 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#define noKNOT_HOLDER_DEBUG
#include "document.h"
#include "sp-shape.h"
#include "knot.h"
#include "knotholder.h"
#include "knot-holder-entity.h"
#include <libnr/nr-matrix-div.h>
class SPDesktop;
#ifdef KNOT_HOLDER_DEBUG
{
g_print("sp-knot-holder-debug: [type=%s] [data=%s]\n", gtk_type_name(GTK_OBJECT_TYPE(object)), (const gchar *) data);
}
#endif
SPKnotHolder *sp_knot_holder_new(SPDesktop *desktop, SPItem *item, SPKnotHolderReleasedFunc relhandler)
{
#ifdef KNOT_HOLDER_DEBUG
g_signal_connect(G_OBJECT(desktop), "destroy", sp_knot_holder_debug, (gpointer) "SPKnotHolder::item");
#endif
return knot_holder;
}
{
if (kh) {
/* unref should call destroy */
g_free(e);
}
}
}
void sp_knot_holder_add(
)
{
sp_knot_holder_add_full(knot_holder, knot_set, knot_get, knot_click, SP_KNOT_SHAPE_DIAMOND, SP_KNOT_MODE_XOR, tip);
}
void sp_knot_holder_add_full(
)
{
/* create new SPKnotHolderEntry */
if (knot_click) {
e->knot_click = knot_click;
} else {
e->knot_click = NULL;
}
// TODO: add a color argument
//e->knot->fill [SP_KNOT_STATE_NORMAL] = 0x00ff0000;
//g_object_set (G_OBJECT (e->knot->item), "fill_color", 0x00ff0000, NULL);
/* Move to current point. */
e->handler_id = g_signal_connect(G_OBJECT(e->knot), "moved", G_CALLBACK(knot_moved_handler), knot_holder);
#ifdef KNOT_HOLDER_DEBUG
#endif
sp_knot_show(e->knot);
}
/**
* \param p In desktop coordinates.
*/
{
}
}
{
if (e->knot_click) {
}
break;
}
}
if (SP_IS_SHAPE(item)) {
}
// for drag, this is done by ungrabbed_handler, but for click we must do it here
}
{
// this was a local change and the knotholder does not need to be recreated:
break;
}
}
if (SP_IS_SHAPE (item)) {
}
}
{
} else {
}
}
/*
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 :