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 #ifndef __PSPPIRE_DIALOG_ACTION_RANK_H__
19 #define __PSPPIRE_DIALOG_ACTION_RANK_H__
20 
21 #include <glib-object.h>
22 #include <glib.h>
23 
24 #include "psppire-dialog-action.h"
25 
26 G_BEGIN_DECLS
27 
28 
29 #define PSPPIRE_TYPE_DIALOG_ACTION_RANK (psppire_dialog_action_rank_get_type ())
30 
31 #define PSPPIRE_DIALOG_ACTION_RANK(obj)	\
32                      (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
33 						  PSPPIRE_TYPE_DIALOG_ACTION_RANK, PsppireDialogActionRank))
34 
35 #define PSPPIRE_DIALOG_ACTION_RANK_CLASS(klass) \
36                      (G_TYPE_CHECK_CLASS_CAST ((klass), \
37 				 PSPPIRE_TYPE_DIALOG_ACTION_RANK, \
38                                  PsppireDialogActionRankClass))
39 
40 
41 #define PSPPIRE_IS_DIALOG_ACTION_RANK(obj) \
42 	             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DIALOG_ACTION_RANK))
43 
44 #define PSPPIRE_IS_DIALOG_ACTION_RANK_CLASS(klass) \
45                      (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DIALOG_ACTION_RANK))
46 
47 
48 #define PSPPIRE_DIALOG_ACTION_RANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
49 				   PSPPIRE_TYPE_DIALOG_ACTION_RANK, \
50 				   PsppireDialogActionRankClass))
51 
52 typedef struct _PsppireDialogActionRank       PsppireDialogActionRank;
53 typedef struct _PsppireDialogActionRankClass  PsppireDialogActionRankClass;
54 
55 
56 enum RANK_FUNC
57   {
58     RANK,
59     NORMAL,
60     PERCENT,
61     RFRACTION,
62     PROPORTION,
63     N,
64     NTILES,
65     SAVAGE,
66     n_RANK_FUNCS
67   };
68 
69 struct _PsppireDialogActionRank
70 {
71   PsppireDialogAction parent;
72 
73   /*< private >*/
74   GtkWidget *rank_vars;
75   GtkWidget *group_vars;
76 
77   GtkToggleButton *ascending_togglebutton;
78   GtkToggleButton *summary_togglebutton;
79 
80 
81   /* Types subdialog widgets */
82 
83   GtkWidget *types_dialog;
84   GtkWidget *ntiles_entry;
85 
86   GtkToggleButton *func_button[n_RANK_FUNCS];
87   GtkWidget *formula_box;
88 
89   GtkToggleButton *blom;
90   GtkToggleButton *tukey;
91   GtkToggleButton *rankit;
92   GtkToggleButton *vw;
93 
94   /* Ties subdialog widgets */
95 
96   PsppireDialog *ties_dialog;
97   GtkToggleButton *mean;
98   GtkToggleButton *low;
99   GtkToggleButton *high;
100   GtkToggleButton *condense;
101 };
102 
103 
104 struct _PsppireDialogActionRankClass
105 {
106   PsppireDialogActionClass parent_class;
107 };
108 
109 
110 GType psppire_dialog_action_rank_get_type (void) ;
111 
112 G_END_DECLS
113 
114 #endif /* __PSPPIRE_DIALOG_ACTION_RANK_H__ */
115