Code

Fix crash in cycle-selection (and restructure internals).
[inkscape.git] / src / select-context.h
1 #ifndef __SP_SELECT_CONTEXT_H__
2 #define __SP_SELECT_CONTEXT_H__
4 /*
5  * Select tool
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 "event-context.h"
16 #include <gtk/gtktypeutils.h>
18 #define SP_TYPE_SELECT_CONTEXT            (sp_select_context_get_type ())
19 #define SP_SELECT_CONTEXT(obj)            (GTK_CHECK_CAST ((obj), SP_TYPE_SELECT_CONTEXT, SPSelectContext))
20 #define SP_SELECT_CONTEXT_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_SELECT_CONTEXT, SPSelectContextClass))
21 #define SP_IS_SELECT_CONTEXT(obj)         (GTK_CHECK_TYPE ((obj), SP_TYPE_SELECT_CONTEXT))
22 #define SP_IS_SELECT_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_SELECT_CONTEXT))
24 struct SPCanvasItem;
25 class SPSelectContext;
26 class SPSelectContextClass;
28 namespace Inkscape {
29   class MessageContext;
30   class SelTrans;
31   class SelectionDescriber;
32 }
34 struct SPSelectContext : public SPEventContext {
35         guint dragging : 1;
36         guint moved : 1;
37         bool button_press_shift;
38         bool button_press_ctrl;
39         bool button_press_alt;
41         GList *cycling_items;
42         GList *cycling_items_cmp;
43         GList *cycling_items_selected_before;
44         GList *cycling_cur_item;
46         SPItem *item;
47         SPCanvasItem *grabbed;
48         Inkscape::SelTrans *_seltrans;
49         Inkscape::SelectionDescriber *_describer;
50 };
52 struct SPSelectContextClass {
53         SPEventContextClass parent_class;
54 };
56 /* Standard Gtk function */
58 GtkType sp_select_context_get_type (void);
60 #endif