1 #ifndef SEEN_PENCIL_CONTEXT_H
2 #define SEEN_PENCIL_CONTEXT_H
4 /** \file
5 * SPPencilContext: a context for pencil tool events
6 */
8 #include "draw-context.h"
11 #define SP_TYPE_PENCIL_CONTEXT (sp_pencil_context_get_type())
12 #define SP_PENCIL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_PENCIL_CONTEXT, SPPencilContext))
13 #define SP_PENCIL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_PENCIL_CONTEXT, SPPencilContextClass))
14 #define SP_IS_PENCIL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_PENCIL_CONTEXT))
15 #define SP_IS_PENCIL_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_PENCIL_CONTEXT))
17 enum PencilState {
18 SP_PENCIL_CONTEXT_IDLE,
19 SP_PENCIL_CONTEXT_ADDLINE,
20 SP_PENCIL_CONTEXT_FREEHAND
21 };
23 /**
24 * SPPencilContext: a context for pencil tool events
25 */
26 struct SPPencilContext : public SPDrawContext {
27 NR::Point p[16];
28 gint npoints;
29 PencilState state;
30 NR::Point req_tangent;
32 bool is_drawing;
33 };
35 /// The SPPencilContext vtable (empty).
36 struct SPPencilContextClass : public SPEventContextClass { };
38 GType sp_pencil_context_get_type();
41 #endif /* !SEEN_PENCIL_CONTEXT_H */
43 /*
44 Local Variables:
45 mode:c++
46 c-file-style:"stroustrup"
47 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
48 indent-tabs-mode:nil
49 fill-column:99
50 End:
51 */
52 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :