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"
32 #define PSPPIRE_TYPE_VAL_LABS_DIALOG (psppire_val_labs_dialog_get_type())
33 #define PSPPIRE_VAL_LABS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialog))
34 #define PSPPIRE_VAL_LABS_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialogClass))
35 #define PSPPIRE_IS_VAL_LABS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG))
36 #define PSPPIRE_IS_VAL_LABS_DIALOG_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class),PSPPIRE_TYPE_VAL_LABS_DIALOG))
37 #define PSPPIRE_VAL_LABS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),PSPPIRE_TYPE_VAL_LABS_DIALOG,PsppireValLabsDialogClass))
39 typedef struct _PsppireValLabsDialog PsppireValLabsDialog;
40 typedef struct _PsppireValLabsDialogClass PsppireValLabsDialogClass;
42 struct _PsppireValLabsDialog {
45 struct val_labs *labs;
47 struct fmt_spec format;
50 GtkWidget *add_button;
51 GtkWidget *remove_button;
52 GtkWidget *change_button;
55 GtkWidget *value_entry;
56 GtkWidget *label_entry;
58 /* Signal handler ids */
59 gint change_handler_id;
60 gint value_handler_id;
65 struct _PsppireValLabsDialogClass {
66 PsppireDialogClass parent_class;
69 GType psppire_val_labs_dialog_get_type (void) G_GNUC_CONST;
70 PsppireValLabsDialog* psppire_val_labs_dialog_new (const struct variable *);
72 void psppire_val_labs_dialog_set_variable (PsppireValLabsDialog *,
73 const struct variable *);
74 const struct val_labs *psppire_val_labs_dialog_get_value_labels (
75 const PsppireValLabsDialog *);
77 struct val_labs *psppire_val_labs_dialog_run (GtkWindow *parent_window,
78 const struct variable *);
82 #endif /* psppire-val-labs-dialog.h */