~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/widgets/sp-widget.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SP_WIDGET_H__
 
2
#define __SP_WIDGET_H__
 
3
 
 
4
/*
 
5
 * Abstract base class for dynamic control widgets
 
6
 *
 
7
 * Authors:
 
8
 *   Lauris Kaplinski <lauris@kaplinski.com>
 
9
 *
 
10
 * Copyright (C) 1999-2002 Lauris Kaplinski
 
11
 * Copyright (C) 2000-2001 Ximian, Inc.
 
12
 *
 
13
 * Released under GNU GPL, read the file 'COPYING' for more information
 
14
 */
 
15
 
 
16
#include <glib.h>
 
17
 
 
18
#define SP_TYPE_WIDGET (sp_widget_get_type ())
 
19
#define SP_WIDGET(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_WIDGET, SPWidget))
 
20
#define SP_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_WIDGET, SPWidgetClass))
 
21
#define SP_IS_WIDGET(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_WIDGET))
 
22
#define SP_IS_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_WIDGET))
 
23
 
 
24
#include <gtk/gtkbin.h>
 
25
 
 
26
namespace Inkscape {
 
27
        class Application;
 
28
        class Selection;
 
29
}
 
30
 
 
31
struct SPWidget {
 
32
        GtkBin bin;
 
33
        Inkscape::Application *inkscape;
 
34
};
 
35
 
 
36
struct SPWidgetClass {
 
37
        GtkBinClass bin_class;
 
38
        void (* construct) (SPWidget *spw);
 
39
        /* Selection change handlers */
 
40
        void (* modify_selection) (SPWidget *spw, Inkscape::Selection *selection, guint flags);
 
41
        void (* change_selection) (SPWidget *spw, Inkscape::Selection *selection);
 
42
        void (* set_selection) (SPWidget *spw, Inkscape::Selection *selection);
 
43
};
 
44
 
 
45
GtkType sp_widget_get_type (void);
 
46
 
 
47
/* fixme: Think (Lauris) */
 
48
/* Generic constructor for global widget */
 
49
GtkWidget *sp_widget_new_global (Inkscape::Application *inkscape);
 
50
GtkWidget *sp_widget_construct_global (SPWidget *spw, Inkscape::Application *inkscape);
 
51
 
 
52
#endif