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;
32 /** Connection to \a knot's "clicked" signal. */
33 guint _click_handler_id;
34 /** Connection to \a knot's "ungrabbed" signal. */
35 guint _ungrab_handler_id;
37 /**
38 * Called solely from knot_moved_handler.
39 *
40 * \param p Requested position of the knot, in item coordinates
41 * \param origin Position where the knot started being dragged
42 * \param state GTK event state (for keyboard modifiers)
43 */
44 void (* knot_set) (SPItem *item, NR::Point const &p, NR::Point const &origin, guint state);
46 /**
47 * Returns the position of the knot representation, in item coordinates.
48 */
49 NR::Point (* knot_get) (SPItem *item);
51 void (* knot_click) (SPItem *item, guint state);
52 };
55 #endif /* !SEEN_KNOT_HOLDER_ENTITY_H */
57 /*
58 Local Variables:
59 mode:c++
60 c-file-style:"stroustrup"
61 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
62 indent-tabs-mode:nil
63 fill-column:99
64 End:
65 */
66 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :