system-file-format: More string fields with null bytes spotted.
[pspp] / src / ui / gui / missing-val-dialog.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2005, 2011, 2012  Free Software Foundation
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 #ifndef PSPPIRE_MISSING_VAL_DIALOG_H
18 #define PSPPIRE_MISSING_VAL_DIALOG_H 1
19
20 /*  This module describes the behaviour of the Missing Values dialog box,
21     used for input of the missing values in the variable sheet */
22
23 #include <gtk/gtk.h>
24 #include "data/format.h"
25 #include "data/missing-values.h"
26 #include "ui/gui/psppire-dialog.h"
27
28 G_BEGIN_DECLS
29
30 struct variable;
31
32 #define PSPPIRE_TYPE_MISSING_VAL_DIALOG             (psppire_missing_val_dialog_get_type())
33 #define PSPPIRE_MISSING_VAL_DIALOG(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_MISSING_VAL_DIALOG,PsppireMissingValDialog))
34 #define PSPPIRE_MISSING_VAL_DIALOG_CLASS(class)     (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_MISSING_VAL_DIALOG,PsppireMissingValDialogClass))
35 #define PSPPIRE_IS_MISSING_VAL_DIALOG(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_MISSING_VAL_DIALOG))
36 #define PSPPIRE_IS_MISSING_VAL_DIALOG_CLASS(class)  (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_MISSING_VAL_DIALOG))
37 #define PSPPIRE_MISSING_VAL_DIALOG_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_MISSING_VAL_DIALOG,PsppireMissingValDialogClass))
38
39 typedef struct _PsppireMissingValDialog      PsppireMissingValDialog;
40 typedef struct _PsppireMissingValDialogClass PsppireMissingValDialogClass;
41
42 struct _PsppireMissingValDialog {
43   PsppireDialog parent;
44
45   struct missing_values mvl;
46   gchar *encoding;
47   struct fmt_spec format;
48
49   /* Radio Buttons */
50   GtkToggleButton *button_none;
51   GtkToggleButton *button_discrete;
52   GtkToggleButton *button_range;
53
54   /* Entry boxes */
55   GtkWidget *mv[3];
56   GtkWidget *low;
57   GtkWidget *high;
58   GtkWidget *discrete;
59 };
60
61 struct _PsppireMissingValDialogClass {
62   PsppireDialogClass parent_class;
63 };
64
65 GType psppire_missing_val_dialog_get_type (void) G_GNUC_CONST;
66 PsppireMissingValDialog* psppire_missing_val_dialog_new (
67   const struct variable *);
68
69 void psppire_missing_val_dialog_set_variable (PsppireMissingValDialog *,
70                                               const struct variable *);
71 const struct missing_values *psppire_missing_val_dialog_get_missing_values (
72   const PsppireMissingValDialog *);
73
74 void psppire_missing_val_dialog_run (GtkWindow *parent_window,
75                                      const struct variable *,
76                                      struct missing_values *);
77
78
79 G_END_DECLS
80
81 #endif /* PSPPIRE_MISSING_VAL_DIALOG_H */