Reimplement the variable info dialog.
[pspp] / src / ui / gui / psppire-var-info.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2020 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_VAR_INFO_H__
19 #define __PSPPIRE_VAR_INFO_H__
20
21 #include <glib.h>
22 #include <glib-object.h>
23 #include <gtk/gtk.h>
24
25
26 G_BEGIN_DECLS
27
28 #define PSPPIRE_VAR_INFO_TYPE            (psppire_var_info_get_type ())
29 #define PSPPIRE_VAR_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_VAR_INFO_TYPE, PsppireVarInfo))
30 #define PSPPIRE_VAR_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_VAR_INFO_TYPE, PsppireVarInfoClass))
31 #define PSPPIRE_IS_VAR_INFO(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_VAR_INFO_TYPE))
32 #define PSPPIRE_IS_VAR_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_VAR_INFO_TYPE))
33
34 enum
35     {
36      VAR_INFO_NAME,
37      VAR_INFO_LABEL,
38      VAR_INFO_POSITION,
39      VAR_INFO_MEASUREMENT_LEVEL,
40      VAR_INFO_ROLE,
41      VAR_INFO_WIDTH,
42      VAR_INFO_ALIGNMENT,
43      VAR_INFO_PRINT_FORMAT,
44      VAR_INFO_WRITE_FORMAT,
45      VAR_INFO_MISSING_VALUES,
46      VAR_INFO_VALUE_LABELS,
47      n_VAR_INFO
48     };
49
50 typedef struct _PsppireVarInfo       PsppireVarInfo;
51 typedef struct _PsppireVarInfoClass  PsppireVarInfoClass;
52
53 struct _PsppireVarInfo
54 {
55   GtkGrid parent;
56
57   gboolean dispose_has_run;
58
59   GtkWidget *entry[n_VAR_INFO - 1];
60   GtkWidget *combo;
61 };
62
63
64 struct _PsppireVarInfoClass
65 {
66   GtkGridClass parent_class;
67 };
68
69
70
71 GType       psppire_var_info_get_type        (void);
72 GtkWidget*  psppire_var_info_new             (void);
73
74 G_END_DECLS
75
76 #endif /* __PSPPIRE_VAR_INFO_H__ */