Variable Type Dialog: Replace deprecated widgets
[pspp] / src / ui / gui / psppire-scanf.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2011 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17
18 #ifndef __PSPPIRE_SCANF_H__
19 #define __PSPPIRE_SCANF_H__
20
21
22 #include <glib.h>
23 #include <glib-object.h>
24 #include <gtk/gtk.h>
25
26 #include <gl/printf-parse.h>
27
28
29 G_BEGIN_DECLS
30
31 #define PSPPIRE_SCANF_TYPE            (psppire_scanf_get_type ())
32 #define PSPPIRE_SCANF(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_SCANF_TYPE, PsppireScanf))
33 #define PSPPIRE_SCANF_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_SCANF_TYPE, PsppireScanfClass))
34 #define PSPPIRE_IS_SCANF(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_SCANF_TYPE))
35 #define PSPPIRE_IS_SCANF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_SCANF_TYPE))
36
37
38 typedef struct _PsppireScanf       PsppireScanf;
39 typedef struct _PsppireScanfClass  PsppireScanfClass;
40
41 /* All members are private. */
42 struct _PsppireScanf
43 {
44   GtkBox parent;
45   const gchar *format;
46
47   GtkWidget **widgets;
48   char_directives d;
49
50   gboolean use_underline;
51   GtkWidget *mnemonic_widget;
52
53   gboolean dispose_has_run;
54 };
55
56
57 struct _PsppireScanfClass
58 {
59   GtkBoxClass parent_class;
60 };
61
62
63 GType          psppire_scanf_get_type        (void);
64 GtkWidget*     psppire_scanf_new             (const gchar *fmt, ...);
65 GtkWidget *    psppire_scanf_get_child (PsppireScanf *w, gint n);
66
67
68 G_END_DECLS
69
70 #endif /* __PSPPIRE_SCANF_H__ */