1 #ifndef __SP_SELTRANS_HANDLES_H__
2 #define __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>
18 namespace Inkscape
19 {
20 class SelTrans;
21 }
23 class SPSelTransHandle;
25 // request handlers
26 gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
27 SPSelTransHandle const &handle, Geom::Point &p, guint state);
28 gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
29 SPSelTransHandle const &handle, Geom::Point &p, guint state);
30 gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
31 SPSelTransHandle const &handle, Geom::Point &p, guint state);
32 gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
33 SPSelTransHandle const &handle, Geom::Point &p, guint state);
34 gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
35 SPSelTransHandle const &handle, Geom::Point &p, guint state);
37 // action handlers
38 void sp_sel_trans_scale(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
39 void sp_sel_trans_stretch(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
40 void sp_sel_trans_skew(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
41 void sp_sel_trans_rotate(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
42 void sp_sel_trans_center(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
44 struct SPSelTransHandle {
45 GtkAnchorType anchor;
46 GdkCursorType cursor;
47 guint control;
48 void (* action) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
49 gboolean (* request) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, Geom::Point &p, guint state);
50 gdouble x, y;
51 };
53 extern SPSelTransHandle const handles_scale[8];
54 extern SPSelTransHandle const handles_rotate[8];
55 extern SPSelTransHandle const handle_center;
57 #endif