1 #ifndef __SP_FLOOD_CONTEXT_H__
2 #define __SP_FLOOD_CONTEXT_H__
4 /*
5 * Flood fill drawing context
6 *
7 * Authors:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 * John Bintz <jcoswell@coswellproductions.org>
10 *
11 * Released under GNU GPL
12 */
14 #include <sigc++/sigc++.h>
15 #include <gtk/gtk.h>
16 #include "event-context.h"
17 #include "helper/unit-menu.h"
18 #include "helper/units.h"
20 #define SP_TYPE_FLOOD_CONTEXT (sp_flood_context_get_type ())
21 #define SP_FLOOD_CONTEXT(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_FLOOD_CONTEXT, SPFloodContext))
22 #define SP_FLOOD_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_FLOOD_CONTEXT, SPFloodContextClass))
23 #define SP_IS_FLOOD_CONTEXT(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_FLOOD_CONTEXT))
24 #define SP_IS_FLOOD_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_FLOOD_CONTEXT))
26 #define FLOOD_COLOR_CHANNEL_R 1
27 #define FLOOD_COLOR_CHANNEL_G 2
28 #define FLOOD_COLOR_CHANNEL_B 4
29 #define FLOOD_COLOR_CHANNEL_A 8
31 class SPFloodContext;
32 class SPFloodContextClass;
34 struct SPFloodContext : public SPEventContext {
35 SPItem *item;
37 sigc::connection sel_changed_connection;
39 Inkscape::MessageContext *_message_context;
40 };
42 struct SPFloodContextClass {
43 SPEventContextClass parent_class;
44 };
46 /* Standard Gtk function */
48 GtkType sp_flood_context_get_type (void);
50 GList* flood_channels_dropdown_items_list (void);
51 GList* flood_autogap_dropdown_items_list (void);
52 void flood_channels_set_channels( gint channels );
54 enum PaintBucketChannels {
55 FLOOD_CHANNELS_RGB,
56 FLOOD_CHANNELS_R,
57 FLOOD_CHANNELS_G,
58 FLOOD_CHANNELS_B,
59 FLOOD_CHANNELS_H,
60 FLOOD_CHANNELS_S,
61 FLOOD_CHANNELS_L,
62 FLOOD_CHANNELS_ALPHA
63 };
65 #endif