1 /* PSPPIRE - a graphical user interface for PSPP. 2 Copyright (C) 2012, 2013 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 A special purpose widget used in the means dialog. 19 */ 20 21 #ifndef __PSPPIRE_MEANS_LAYER_H__ 22 #define __PSPPIRE_MEANS_LAYER_H__ 23 24 25 #include <glib.h> 26 #include <glib-object.h> 27 #include <gtk/gtk.h> 28 29 #include "psppire-var-view.h" 30 31 G_BEGIN_DECLS 32 33 34 #define PSPPIRE_TYPE_MEANS_LAYER (psppire_means_layer_get_type ()) 35 36 #define PSPPIRE_MEANS_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ 37 PSPPIRE_TYPE_MEANS_LAYER, PsppireMeansLayer)) 38 39 #define PSPPIRE_MEANS_LAYER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \ 40 PSPPIRE_TYPE_MEANS_LAYER, PsppireMeansLayerClass)) 41 42 #define PSPPIRE_IS_MEANS_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ 43 PSPPIRE_TYPE_MEANS_LAYER)) 44 45 #define PSPPIRE_IS_MEANS_LAYER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \ 46 PSPPIRE_TYPE_MEANS_LAYER)) 47 48 49 typedef struct _PsppireMeansLayer PsppireMeansLayer; 50 typedef struct _PsppireMeansLayerClass PsppireMeansLayerClass; 51 52 53 struct _PsppireMeansLayer 54 { 55 GtkBox parent; 56 57 /* <private> */ 58 GtkWidget *var_view; 59 int n_layers; 60 int current_layer; 61 GPtrArray *layer; 62 gboolean dispose_has_run; 63 64 GtkWidget *label; 65 GtkWidget *back; 66 GtkWidget *forward; 67 }; 68 69 70 struct _PsppireMeansLayerClass 71 { 72 GtkBoxClass parent_class; 73 }; 74 75 GType psppire_means_layer_get_type (void); 76 GType psppire_means_layer_model_get_type (void); 77 GtkWidget * psppire_means_layer_new (void); 78 79 void psppire_means_layer_clear (PsppireMeansLayer *ml); 80 GtkTreeModel *psppire_means_layer_get_model_n (PsppireMeansLayer *ml, gint n); 81 GtkTreeModel *psppire_means_layer_get_model (PsppireMeansLayer *ml); 82 83 void psppire_means_layer_update (PsppireMeansLayer *ml); 84 85 G_END_DECLS 86 87 #endif /* __PSPPIRE_MEANS_LAYER_H__ */ 88