1 #ifndef SEEN_KNOT_HOLDER_ENTITY_H
2 #define SEEN_KNOT_HOLDER_ENTITY_H
4 /** \file
5 * SPKnotHolderEntity definition.
6 *
7 * Authors:
8 * Mitsuru Oka <oka326@parkcity.ne.jp>
9 *
10 * Copyright (C) 1999-2001 Lauris Kaplinski
11 * Copyright (C) 2000-2001 Ximian, Inc.
12 * Copyright (C) 2001 Mitsuru Oka
13 * Copyright (C) 2004 Monash University
14 *
15 * Released under GNU GPL
16 */
18 #include <glib/gtypes.h>
20 struct SPItem;
21 struct SPKnot;
22 namespace NR {
23 class Point;
24 }
26 /// SPKnotHolderEntity definition.
27 struct SPKnotHolderEntity {
28 SPKnot *knot;
30 /** Connection to \a knot's "moved" signal. */
31 guint handler_id;
33 /**
34 * Called solely from knot_moved_handler.
35 *
36 * \param p Requested position of the knot, in item coordinates
37 * \param origin Position where the knot started being dragged
38 * \param state GTK event state (for keyboard modifiers)
39 */
40 void (* knot_set) (SPItem *item, NR::Point const &p, NR::Point const &origin, guint state);
42 /**
43 * Returns the position of the knot representation, in item coordinates.
44 */
45 NR::Point (* knot_get) (SPItem *item);
47 void (* knot_click) (SPItem *item, guint state);
48 };
51 #endif /* !SEEN_KNOT_HOLDER_ENTITY_H */
53 /*
54 Local Variables:
55 mode:c++
56 c-file-style:"stroustrup"
57 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
58 indent-tabs-mode:nil
59 fill-column:99
60 End:
61 */
62 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :