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"
17 namespace Inkscape
18 {
19 class SelTrans;
20 }
22 class SPSelTransHandle;
24 // request handlers
25 gboolean sp_sel_trans_scale_request(Inkscape::SelTrans *seltrans,
26 SPSelTransHandle const &handle, NR::Point &p, guint state);
27 gboolean sp_sel_trans_stretch_request(Inkscape::SelTrans *seltrans,
28 SPSelTransHandle const &handle, NR::Point &p, guint state);
29 gboolean sp_sel_trans_skew_request(Inkscape::SelTrans *seltrans,
30 SPSelTransHandle const &handle, NR::Point &p, guint state);
31 gboolean sp_sel_trans_rotate_request(Inkscape::SelTrans *seltrans,
32 SPSelTransHandle const &handle, NR::Point &p, guint state);
33 gboolean sp_sel_trans_center_request(Inkscape::SelTrans *seltrans,
34 SPSelTransHandle const &handle, NR::Point &p, guint state);
36 // action handlers
37 void sp_sel_trans_scale(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
38 void sp_sel_trans_stretch(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
39 void sp_sel_trans_skew(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
40 void sp_sel_trans_rotate(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
41 void sp_sel_trans_center(Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
43 struct SPSelTransHandle {
44 GtkAnchorType anchor;
45 GdkCursorType cursor;
46 guint control;
47 void (* action) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
48 gboolean (* request) (Inkscape::SelTrans *seltrans, SPSelTransHandle const &handle, NR::Point &p, guint state);
49 gdouble x, y;
50 };
52 extern SPSelTransHandle const handles_scale[8];
53 extern SPSelTransHandle const handles_rotate[8];
54 extern SPSelTransHandle const handle_center;
56 #endif