knot-holder-entity.h revision a9109751d1921429395e977f67622776a21a9fca
#ifndef SEEN_KNOT_HOLDER_ENTITY_H
#define SEEN_KNOT_HOLDER_ENTITY_H
/*
* Authors:
* Mitsuru Oka <oka326@parkcity.ne.jp>
* Maximilian Albert <maximilian.albert@gmail.com>
*
* Copyright (C) 1999-2001 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
* Copyright (C) 2001 Mitsuru Oka
* Copyright (C) 2004 Monash University
* Copyright (C) 2008 Maximilian Albert
*
* Released under GNU GPL
*/
#include <glib.h>
#include "knot.h"
#include "snapper.h"
struct SPKnot;
typedef void (* SPKnotHolderSetFunc) (SPItem *item, Geom::Point const &p, Geom::Point const &origin, guint state);
/* fixme: Think how to make callbacks most sensitive (Lauris) */
/**
* KnotHolderEntity definition.
*/
KnotHolderEntity() {}
/* derived classes used for LPE knotholder handles use this to indicate that they
must not be deleted when a knotholder is destroyed */
// TODO: it would be nice to ditch this but then we need to dynamically create instances of different
// KnotHolderEntity classes in Effect::addKnotHolderEntities. How to do this???
virtual bool isDeletable() { return true; }
should be derived from KnotHolderEntity and override these functions */
void update_knot();
//private:
Geom::Point snap_knot_position_constrained(Geom::Point const &p, Inkscape::Snapper::SnapConstraint const &constraint);
int my_counter;
static int counter;
/** Connection to \a knot's "moved" signal. */
/** Connection to \a knot's "clicked" signal. */
/** Connection to \a knot's "ungrabbed" signal. */
};
// derived KnotHolderEntity class for LPEs
virtual bool isDeletable() { return false; }
};
/* pattern manipulation */
};
};
};
#endif /* !SEEN_KNOT_HOLDER_ENTITY_H */
/*
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:fileencoding=utf-8:textwidth=99 :