1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2005, 2011, 2012 Free Software Foundation
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.
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.
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/>. */
17 #ifndef PSPPIRE_VAL_LABS_DIALOG_H
18 #define PSPPIRE_VAL_LABS_DIALOG_H
21 /* This module describes the behaviour of the Value Labels dialog box,
22 used for input of the value labels in the variable sheet */
26 #include "data/format.h"
27 #include "data/variable.h"
28 #include "ui/gui/psppire-dialog.h"
29 #include "ui/gui/psppire-var-store.h"
33 #define PSPPIRE_TYPE_VAL_LABS_DIALOG (psppire_val_labs_dialog_get_type())
34 #define PSPPIRE_VAL_LABS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialog))
35 #define PSPPIRE_VAL_LABS_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialogClass))
36 #define PSPPIRE_IS_VAL_LABS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG))
37 #define PSPPIRE_IS_VAL_LABS_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_VAL_LABS_DIALOG))
38 #define PSPPIRE_VAL_LABS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialogClass))
40 typedef struct _PsppireValLabsDialog PsppireValLabsDialog;
41 typedef struct _PsppireValLabsDialogClass PsppireValLabsDialogClass;
43 struct _PsppireValLabsDialog {
46 struct val_labs *labs;
48 struct fmt_spec format;
51 GtkWidget *add_button;
52 GtkWidget *remove_button;
53 GtkWidget *change_button;
56 GtkWidget *value_entry;
57 GtkWidget *label_entry;
59 /* Signal handler ids */
60 gint change_handler_id;
61 gint value_handler_id;
66 struct _PsppireValLabsDialogClass {
67 PsppireDialogClass parent_class;
70 GType psppire_val_labs_dialog_get_type (void) G_GNUC_CONST;
71 PsppireValLabsDialog* psppire_val_labs_dialog_new (const struct variable *);
73 void psppire_val_labs_dialog_set_variable (PsppireValLabsDialog *,
74 const struct variable *);
75 const struct val_labs *psppire_val_labs_dialog_get_value_labels (
76 const PsppireValLabsDialog *);
78 struct val_labs *psppire_val_labs_dialog_run (GtkWindow *parent_window,
79 const struct variable *);
83 #endif /* psppire-val-labs-dialog.h */