Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / seltrans-handles.h
1 #ifndef SEEN_SP_SELTRANS_HANDLES_H
2 #define SEEN_SP_SELTRANS_HANDLES_H
4 /*
5  * Seltrans knots
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *
10  * Copyright (C) 1999-2002 authors
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #include "display/sodipodi-ctrl.h"
16 #include <2geom/forward.h>
17 #include <gdk/gdkcursor.h>
19 namespace Inkscape
20 {
21   class SelTrans;
22 }
24 class SPSelTransHandle;
26 // request handlers
27 gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
28                                     SPSelTransHandle const &handle, Geom::Point &p, guint state);
29 gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
30                                       SPSelTransHandle const &handle, Geom::Point &p, guint state);
31 gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
32                                    SPSelTransHandle const &handle, Geom::Point &p, guint state);
33 gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
34                                      SPSelTransHandle const &handle, Geom::Point &p, guint state);
35 gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
36                                      SPSelTransHandle const &handle, Geom::Point &p, guint state);
38 // action handlers
39 void sp_sel_trans_scale(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
40 void sp_sel_trans_stretch(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
41 void sp_sel_trans_skew(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
42 void sp_sel_trans_rotate(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
43 void sp_sel_trans_center(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
45 struct SPSelTransHandle {
46         GtkAnchorType anchor;
47         GdkCursorType cursor;
48         guint control;
49         void (* action) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
50         gboolean (* request) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
51         gdouble x, y;
52 };
54 // TODO these must be purged:
55 extern SPSelTransHandle const handles_scale[8];
56 extern SPSelTransHandle const handles_rotate[8];
57 extern SPSelTransHandle const handle_center;
59 #endif // SEEN_SP_SELTRANS_HANDLES_H
61 /*
62   Local Variables:
63   mode:c++
64   c-file-style:"stroustrup"
65   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
66   indent-tabs-mode:nil
67   fill-column:99
68   End:
69 */
70 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :