Add "dictionary" property to PsppireVarStore and use it.
[pspp-builds.git] / src / ui / gui / psppire-var-store.h
index 315432253414880707b9ef3388f44c0a2e84a0a4..e4c2ecd827c47fd9bc6747fddcb1d710357e157b 100644 (file)
 #ifndef __PSPPIRE_VAR_STORE_H__
 #define __PSPPIRE_VAR_STORE_H__
 
-#include <gtksheet/gsheetmodel.h>
 #include "psppire-dict.h"
 #include <gdk/gdk.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
+/* PSPPIRE variable store format type, to determine whether a
+   PSPPIRE variable store contains variable input formats or
+   variable output formats.  */
+GType psppire_var_store_format_type_get_type (void);
+
+typedef enum
+  {
+    PSPPIRE_VAR_STORE_INPUT_FORMATS,
+    PSPPIRE_VAR_STORE_OUTPUT_FORMATS
+  }
+PsppireVarStoreFormatType;
+
+#define PSPPIRE_TYPE_VAR_STORE_FORMAT_TYPE \
+        (psppire_var_store_format_type_get_type ())
+
+/* PSPPIRE variable store. */
 #define GTK_TYPE_VAR_STORE            (psppire_var_store_get_type ())
 
 #define PSPPIRE_VAR_STORE(obj)        (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
@@ -50,9 +63,9 @@ struct _PsppireVarStore
   GObject parent;
 
   /*< private >*/
-  PsppireDict *dict;
+  PsppireDict *dictionary;
   GdkColor disabled;
-  const PangoFontDescription *font_desc;
+  PsppireVarStoreFormatType format_type;
 };
 
 struct _PsppireVarStoreClass
@@ -69,10 +82,7 @@ struct _PsppireVarStoreClass
 
 GType         psppire_var_store_get_type         (void) G_GNUC_CONST;
 PsppireVarStore *psppire_var_store_new              (PsppireDict *dict);
-struct variable * psppire_var_store_get_var (PsppireVarStore *store, gint row);
-
-void psppire_var_store_set_dictionary (PsppireVarStore *var_store, PsppireDict *dict);
-
+struct variable * psppire_var_store_get_var (PsppireVarStore *store, glong row);
 
 /* Return the number of variables */
 gint psppire_var_store_get_var_cnt (PsppireVarStore      *var_store);
@@ -80,9 +90,21 @@ gint psppire_var_store_get_var_cnt (PsppireVarStore      *var_store);
 void psppire_var_store_set_font (PsppireVarStore *store, const PangoFontDescription *fd);
 
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
+
 
+enum {
+ PSPPIRE_VAR_STORE_COL_NAME,
+ PSPPIRE_VAR_STORE_COL_TYPE,
+ PSPPIRE_VAR_STORE_COL_WIDTH,
+ PSPPIRE_VAR_STORE_COL_DECIMALS,
+ PSPPIRE_VAR_STORE_COL_LABEL,
+ PSPPIRE_VAR_STORE_COL_VALUES,
+ PSPPIRE_VAR_STORE_COL_MISSING,
+ PSPPIRE_VAR_STORE_COL_COLUMNS,
+ PSPPIRE_VAR_STORE_COL_ALIGN,
+ PSPPIRE_VAR_STORE_COL_MEASURE,
+ PSPPIRE_VAR_STORE_n_COLS
+};
 
 #endif /* __PSPPIRE_VAR_STORE_H__ */