PsppSheetViewColumn: Replace GtkAlignment with a GtkBin
[pspp] / src / ui / gui / psppire-dialog-action-frequencies.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 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
18 #include <glib-object.h>
19 #include <glib.h>
20
21 #include "psppire-dialog-action.h"
22
23 #ifndef __PSPPIRE_DIALOG_ACTION_FREQUENCIES_H__
24 #define __PSPPIRE_DIALOG_ACTION_FREQUENCIES_H__
25
26 G_BEGIN_DECLS
27
28
29 #define PSPPIRE_TYPE_DIALOG_ACTION_FREQUENCIES (psppire_dialog_action_frequencies_get_type ())
30
31 #define PSPPIRE_DIALOG_ACTION_FREQUENCIES(obj)  \
32                      (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
33                                                   PSPPIRE_TYPE_DIALOG_ACTION_FREQUENCIES, \
34                                                   PsppireDialogActionFrequencies))
35
36 #define PSPPIRE_DIALOG_ACTION_FREQUENCIES_CLASS(klass) \
37                      (G_TYPE_CHECK_CLASS_CAST ((klass), \
38                                  PSPPIRE_TYPE_DIALOG_ACTION_FREQUENCIES, \
39                                  PsppireDialogActionFrequenciesClass))
40
41
42 #define PSPPIRE_IS_DIALOG_ACTION_FREQUENCIES(obj) \
43                      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_FREQUENCIES))
44
45 #define PSPPIRE_IS_DIALOG_ACTION_FREQUENCIES_CLASS(klass) \
46                      (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_FREQUENCIES))
47
48
49 #define PSPPIRE_DIALOG_ACTION_FREQUENCIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
50                                    PSPPIRE_TYPE_DIALOG_ACTION_FREQUENCIES, \
51                                    PsppireDialogActionFrequenciesClass))
52
53 typedef struct _PsppireDialogActionFrequencies       PsppireDialogActionFrequencies;
54 typedef struct _PsppireDialogActionFrequenciesClass  PsppireDialogActionFrequenciesClass;
55
56
57 enum frq_scale
58   {
59     FRQ_FREQ,
60     FRQ_PERCENT
61   };
62
63 enum frq_order
64   {
65     FRQ_AVALUE,
66     FRQ_DVALUE,
67     FRQ_ACOUNT,
68     FRQ_DCOUNT
69   };
70
71 enum frq_table
72   {
73     FRQ_TABLE,
74     FRQ_NOTABLE,
75     FRQ_LIMIT
76   };
77
78
79 struct _PsppireDialogActionFrequencies
80 {
81   PsppireDialogAction parent;
82
83   /*< private >*/
84   gboolean dispose_has_run ;
85
86   GtkWidget *stat_vars;
87   GtkTreeModel *stats;
88
89   GtkWidget *include_missing;
90
91   enum frq_order tables_opts_order;
92   enum frq_table tables_opts_table;
93   gint tables_opts_limit;
94
95   GtkWidget * always;
96   GtkWidget * never;
97   GtkWidget * limit;
98   GtkWidget * limit_spinbutton;
99
100   GtkWidget * avalue;
101   GtkWidget * dvalue;
102   GtkWidget * afreq;
103   GtkWidget * dfreq;  
104
105   GtkWidget *tables_dialog;
106
107   /* Charts dialog */
108
109   GtkWidget *min;
110   GtkWidget *min_spin;
111   GtkWidget *max;
112   GtkWidget *max_spin;
113
114   GtkWidget *hist;
115   GtkWidget *normal;
116
117   gboolean charts_opts_use_min;
118   gdouble charts_opts_min;
119
120   gboolean charts_opts_use_max;
121   gdouble charts_opts_max;
122
123   gboolean charts_opts_draw_hist;
124   gboolean charts_opts_draw_normal;
125
126   gboolean charts_opts_draw_pie;
127   gboolean charts_opts_pie_include_missing;
128
129   gboolean charts_opts_draw_bar;
130
131   enum frq_scale charts_opts_scale;
132
133   GtkWidget *freqs;
134   GtkWidget *percents;
135   GtkWidget *pie;
136   GtkWidget *pie_include_missing;
137
138   GtkWidget *bar;
139
140   GtkWidget *charts_dialog;
141 };
142
143
144 struct _PsppireDialogActionFrequenciesClass
145 {
146   PsppireDialogActionClass parent_class;
147 };
148
149
150 GType psppire_dialog_action_frequencies_get_type (void) ;
151
152 G_END_DECLS
153
154 #endif /* __PSPPIRE_DIALOG_ACTION_FREQUENCIES_H__ */