lib/gtksheet/psppire-marshal.h
lib_gtksheet_libgtksheet_a_SOURCES = \
- lib/gtksheet/gsheetmodel.c \
- lib/gtksheet/gsheetmodel.h \
+ lib/gtksheet/psppire-sheetmodel.c \
+ lib/gtksheet/psppire-gsheetmodel.h \
lib/gtksheet/gtkextra-sheet.h \
lib/gtksheet/gtksheet.c \
lib/gtksheet/gtksheet.h \
+++ /dev/null
-/* GSheetModel --- an abstract model for the GSheet widget.
- * Copyright (C) 2006 Free Software Foundation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <config.h>
-
-#include <glib.h>
-#include "gsheetmodel.h"
-#include <gtksheet/psppire-marshal.h>
-
-enum {
- RANGE_CHANGED,
- ROWS_INSERTED,
- ROWS_DELETED,
- COLUMNS_INSERTED,
- COLUMNS_DELETED,
- LAST_SIGNAL
-};
-
-static guint sheet_model_signals[LAST_SIGNAL] = { 0 };
-
-
-static void g_sheet_model_base_init (gpointer g_class);
-
-
-GType
-g_sheet_model_get_type (void)
-{
- static GType sheet_model_type = 0;
-
- if (! sheet_model_type)
- {
- static const GTypeInfo sheet_model_info =
- {
- sizeof (GSheetModelIface), /* class_size */
- g_sheet_model_base_init, /* base_init */
- NULL, /* base_finalize */
- NULL,
- NULL, /* class_finalize */
- NULL, /* class_data */
- 0,
- 0, /* n_preallocs */
- NULL
- };
-
- sheet_model_type =
- g_type_register_static (G_TYPE_INTERFACE, "GSheetModel",
- &sheet_model_info, 0);
-
- g_type_interface_add_prerequisite (sheet_model_type, G_TYPE_OBJECT);
- }
-
- return sheet_model_type;
-}
-
-static void
-g_sheet_model_base_init (gpointer g_class)
-{
- static gboolean initialized = FALSE;
-
- if (! initialized)
- {
- sheet_model_signals[RANGE_CHANGED] =
- g_signal_new ("range_changed",
- G_TYPE_SHEET_MODEL,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GSheetModelIface, range_changed),
- NULL, NULL,
- psppire_marshal_VOID__INT_INT_INT_INT,
- G_TYPE_NONE, 4,
- G_TYPE_INT,
- G_TYPE_INT,
- G_TYPE_INT,
- G_TYPE_INT);
-
-
-
- sheet_model_signals[ROWS_INSERTED] =
- g_signal_new ("rows_inserted",
- G_TYPE_SHEET_MODEL,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GSheetModelIface, rows_inserted),
- NULL, NULL,
- psppire_marshal_VOID__INT_INT,
- G_TYPE_NONE, 2,
- G_TYPE_INT,
- G_TYPE_INT);
-
-
- sheet_model_signals[ROWS_DELETED] =
- g_signal_new ("rows_deleted",
- G_TYPE_SHEET_MODEL,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GSheetModelIface, rows_deleted),
- NULL, NULL,
- psppire_marshal_VOID__INT_INT,
- G_TYPE_NONE, 2,
- G_TYPE_INT,
- G_TYPE_INT);
-
- sheet_model_signals[COLUMNS_INSERTED] =
- g_signal_new ("columns_inserted",
- G_TYPE_SHEET_MODEL,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GSheetModelIface, columns_inserted),
- NULL, NULL,
- psppire_marshal_VOID__INT_INT,
- G_TYPE_NONE, 2,
- G_TYPE_INT,
- G_TYPE_INT);
-
-
- sheet_model_signals[COLUMNS_DELETED] =
- g_signal_new ("columns_deleted",
- G_TYPE_SHEET_MODEL,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GSheetModelIface, columns_deleted),
- NULL, NULL,
- psppire_marshal_VOID__INT_INT,
- G_TYPE_NONE, 2,
- G_TYPE_INT,
- G_TYPE_INT);
-
-
- initialized = TRUE;
- }
-}
-
-
-/**
- * g_sheet_model_free_strings
- * @sheet_model: A #GSheetModel
- *
- * Returns: True if strings obtained with get_string should be freed by the
- * sheet when no longer required.
- **/
-gboolean
-g_sheet_model_free_strings (const GSheetModel *sheet_model)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), FALSE);
-
- return G_SHEET_MODEL_GET_IFACE (sheet_model)->free_strings;
-}
-
-
-/**
- * g_sheet_model_get_string:
- * @sheet_model: A #GSheetModel
- * @row: The row of the cell to be retrieved.
- * @column: The column of the cell to be retrieved.
- *
- * Retrieves the datum at location ROW, COLUMN in the form of a string.
- * Returns: The string representation of the datum, or NULL on error.
- **/
-gchar *
-g_sheet_model_get_string (const GSheetModel *sheet_model,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), 0);
-
- g_assert (G_SHEET_MODEL_GET_IFACE (sheet_model)->get_string);
-
- return (G_SHEET_MODEL_GET_IFACE (sheet_model)->get_string) (sheet_model, row, column);
-}
-
-/**
- * g_sheet_model_set_string
- * @sheet_model: A #GSheetModel
- * @text: The text describing the datum to be set.
- * @row: The row of the cell to be cleared.
- * @column: The column of the cell to be cleared.
- *
- * Sets the datum at a location from a string.
- * Returns: TRUE if the datum was changed, FALSE otherwise.
- **/
-gboolean
-g_sheet_model_set_string (GSheetModel *sheet_model,
- const gchar *text,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), FALSE);
-
- g_assert (G_SHEET_MODEL_GET_IFACE (sheet_model)->set_string);
-
- return G_SHEET_MODEL_GET_IFACE (sheet_model)->set_string (sheet_model,
- text, row, column);
-}
-
-
-
-/**
- * g_sheet_model_datum_clear:
- * @sheet_model: A #GSheetModel
- * @row: The row of the cell to be cleared.
- * @column: The column of the cell to be cleared.
- *
- * Called when the datum at a location is to be cleared.
- * Returns: TRUE if the datum was cleared, FALSE otherwise.
- **/
-gboolean
-g_sheet_model_datum_clear (GSheetModel *sheet_model,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), FALSE);
-
- g_assert (G_SHEET_MODEL_GET_IFACE (sheet_model)->clear_datum);
-
- return G_SHEET_MODEL_GET_IFACE (sheet_model)->clear_datum (sheet_model,
- row, column);
-}
-
-
-/**
- * g_sheet_model_range_changed:
- * @sheet_model: A #GSheetModel
- * @range: The #GSheetRange range of cells which have changed.
- *
- * Emits the "range_changed" signal on @sheet_model.
- **/
-void
-g_sheet_model_range_changed (GSheetModel *sheet_model,
- glong row0, glong col0,
- glong rowi, glong coli)
-{
- g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
-
- g_signal_emit (sheet_model, sheet_model_signals[RANGE_CHANGED], 0,
- row0, col0, rowi, coli);
-}
-
-
-
-
-/**
- * g_sheet_model_rows_inserted:
- * @sheet_model: A #GSheetModel
- * @row: The row before which the new rows should be inserted.
- * @n_rows: The number of rows to insert.
- *
- * Emits the "rows_inserted" signal on @sheet_model.
- **/
-void
-g_sheet_model_rows_inserted (GSheetModel *sheet_model,
- glong row, glong n_rows)
-{
- g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
-
- g_signal_emit (sheet_model, sheet_model_signals[ROWS_INSERTED], 0,
- row, n_rows);
-}
-
-
-/**
- * g_sheet_model_columns_inserted:
- * @sheet_model: A #GSheetModel
- * @column: The column before which the new columns should be inserted.
- * @n_columns: The number of columns to insert.
- *
- * Emits the "columns_inserted" signal on @sheet_model.
- **/
-void
-g_sheet_model_columns_inserted (GSheetModel *sheet_model,
- glong column, glong n_columns)
-{
- g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
-
- g_signal_emit (sheet_model, sheet_model_signals[COLUMNS_INSERTED], 0,
- column, n_columns);
-}
-
-
-
-
-/**
- * g_sheet_model_rows_deleted:
- * @sheet_model: A #GSheetModel
- * @row: The first row to be deleted.
- * @n_rows: The number of rows to delete.
- *
- * Emits the "rows_deleted" signal on @sheet_model.
- **/
-void
-g_sheet_model_rows_deleted (GSheetModel *sheet_model,
- glong row, glong n_rows)
-{
- g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
-
- g_signal_emit (sheet_model, sheet_model_signals[ROWS_DELETED], 0,
- row, n_rows);
-}
-
-
-
-/**
- * g_sheet_model_columns_deleted:
- * @sheet_model: A #GSheetModel
- * @column: The first column to be deleted.
- * @n_columns: The number of columns to delete.
- *
- * Emits the "columns_deleted" signal on @sheet_model.
- **/
-void
-g_sheet_model_columns_deleted (GSheetModel *sheet_model,
- glong column, glong n_columns)
-{
- g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
-
- g_signal_emit (sheet_model, sheet_model_signals[COLUMNS_DELETED], 0,
- column, n_columns);
-}
-
-
-
-
-
-/**
- * g_sheet_model_is_editable:
- * @sheet_model: A #GSheetModel
- * @row: The row
- * @column: The column
- *
- * Returns: TRUE if the cell is editable, FALSE otherwise
- **/
-gboolean
-g_sheet_model_is_editable (const GSheetModel *model,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), TRUE);
-
- if ( ! G_SHEET_MODEL_GET_IFACE (model)->is_editable )
- return TRUE;
-
- return G_SHEET_MODEL_GET_IFACE (model)->is_editable (model,
- row, column);
-}
-
-
-/**
- * g_sheet_model_get_foreground:
- * @sheet_model: A #GSheetModel
- * @row: The row
- * @column: The column
- *
- * Returns the foreground colour of the cell at @row, @column
- * The color is unallocated. It will be allocated by the viewing object.
- **/
-GdkColor *
-g_sheet_model_get_foreground (const GSheetModel *model,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
-
- if ( ! G_SHEET_MODEL_GET_IFACE (model)->get_foreground )
- return NULL;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_foreground (model,
- row, column);
-}
-
-/**
- * g_sheet_model_get_background:
- * @sheet_model: A #GSheetModel
- * @row: The row
- * @column: The column
- *
- * Returns the background colour of the cell at @row, @column
- * The color is unallocated. It will be allocated by the viewing object.
- **/
-GdkColor *
-g_sheet_model_get_background (const GSheetModel *model,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
-
- if ( ! G_SHEET_MODEL_GET_IFACE (model)->get_background )
- return NULL;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_background (model,
- row, column);
-}
-
-/**
- * g_sheet_model_get_justification:
- * @sheet_model: A #GSheetModel
- * @row: The row
- * @column: The column
- *
- * Returns the justification of the cell at @row, @column
- * Returns: the justification, or NULL on error.
- **/
-const GtkJustification *
-g_sheet_model_get_justification (const GSheetModel *model,
- glong row, glong column)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
-
- if ( ! G_SHEET_MODEL_GET_IFACE (model)->get_justification)
- return NULL;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_justification (model,
- row, column);
-}
-
-
-/**
- * g_sheet_model_get_column_count:
- * @model: A #GSheetModel
- *
- * Returns the total number of columns represented by the model
- **/
-glong
-g_sheet_model_get_column_count (const GSheetModel *model)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), -1);
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_column_count (model);
-}
-
-/**
- * g_sheet_model_get_row_count:
- * @model: A #GSheetModel
- *
- * Returns the total number of rows represented by the model
- **/
-gint
-g_sheet_model_get_row_count(const GSheetModel *model)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), -1);
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_row_count (model);
-}
-
-\f
-
-/* Column related functions */
-gboolean
-g_sheet_model_get_column_sensitivity (const GSheetModel *model, gint col)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), FALSE);
-
- if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_column_sensitivity)
- return TRUE;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_column_sensitivity (model, col);
-}
-
-
-gchar *
-g_sheet_model_get_column_subtitle (const GSheetModel *model,
- gint col)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
- g_return_val_if_fail (col >= 0, NULL);
-
- if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_column_subtitle)
- return NULL;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_column_subtitle (model, col);
-}
-
-
-GtkSheetButton *
-g_sheet_model_get_column_button (const GSheetModel *model,
- gint col)
-{
- GtkSheetButton *button = gtk_sheet_button_new ();
-
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
-
- if ( G_SHEET_MODEL_GET_IFACE (model)->get_column_title)
- button->label = G_SHEET_MODEL_GET_IFACE (model)->get_column_title (model, col);
-
- return button;
-}
-
-GtkJustification
-g_sheet_model_get_column_justification (const GSheetModel *model,
- gint col)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), GTK_JUSTIFY_LEFT);
-
- if ( G_SHEET_MODEL_GET_IFACE (model)->get_column_justification)
- return G_SHEET_MODEL_GET_IFACE (model)->get_column_justification (model, col);
-
- return GTK_JUSTIFY_LEFT;
-}
-
-\f
-
-gboolean
-g_sheet_model_get_row_sensitivity (const GSheetModel *model, gint row)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), FALSE);
-
- if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_row_sensitivity)
- return TRUE;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_row_sensitivity (model, row);
-}
-
-
-
-gchar *
-g_sheet_model_get_row_subtitle (const GSheetModel *model,
- gint row)
-{
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
-
- if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_row_subtitle)
- return NULL;
-
- return G_SHEET_MODEL_GET_IFACE (model)->get_row_subtitle (model, row);
-}
-
-
-GtkSheetButton *
-g_sheet_model_get_row_button (const GSheetModel *model,
- gint row)
-{
- GtkSheetButton *button = gtk_sheet_button_new ();
-
- g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
-
- if ( G_SHEET_MODEL_GET_IFACE (model)->get_row_title)
- button->label = G_SHEET_MODEL_GET_IFACE (model)->get_row_title (model, row);
-
- return button;
-}
-
+++ /dev/null
-/* GSheetModel --- an abstract model for the GtkSheet widget.
- * Copyright (C) 2006 Free Software Foundation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __G_SHEET_MODEL_H__
-#define __G_SHEET_MODEL_H__
-
-
-/* This file provides an abstract interface or the data displayed by the
- GtkSheet widget */
-
-#include <glib-object.h>
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-#include "gtkextra-sheet.h"
-
-G_BEGIN_DECLS
-
-#define G_TYPE_SHEET_MODEL (g_sheet_model_get_type ())
-#define G_SHEET_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SHEET_MODEL, GSheetModel))
-#define G_IS_SHEET_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SHEET_MODEL))
-#define G_SHEET_MODEL_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SHEET_MODEL, GSheetModelIface))
-
-typedef enum
-{
- GTK_SHEET_LEFT_BORDER = 1 << 0,
- GTK_SHEET_RIGHT_BORDER = 1 << 1,
- GTK_SHEET_TOP_BORDER = 1 << 2,
- GTK_SHEET_BOTTOM_BORDER = 1 << 3
-} GtkSheetBorderType ;
-
-
-typedef struct _GSheetModel GSheetModel; /* Dummy typedef */
-typedef struct _GSheetModelIface GSheetModelIface;
-typedef struct _GtkSheetRange GtkSheetRange;
-typedef struct _GtkSheetCellBorder GtkSheetCellBorder;
-
-struct _GtkSheetRange
-{
- gint row0, col0; /* upper-left cell */
- gint rowi, coli; /* lower-right cell */
-};
-
-struct _GtkSheetCellBorder
-{
- GtkSheetBorderType mask;
- guint width;
- GdkLineStyle line_style;
- GdkCapStyle cap_style;
- GdkJoinStyle join_style;
- GdkColor color;
-};
-
-
-
-struct _GSheetModelIface
-{
- GTypeInterface g_iface;
-
- gboolean free_strings;
-
- /* Signals */
- void (* range_changed) (GSheetModel *sheet_model,
- glong row0, glong col0,
- glong rowi, glong coli);
-
- void (* rows_inserted) (GSheetModel *sheet_model,
- glong row, glong n_rows);
-
- void (* rows_deleted) (GSheetModel *sheet_model,
- glong row, glong n_rows);
-
- void (* columns_inserted) (GSheetModel *sheet_model,
- glong column, glong n_columns);
-
- void (* columns_deleted) (GSheetModel *sheet_model,
- glong column, glong n_columns);
-
-
-
-
-
-
- /* Virtual Table */
-
- gchar * (* get_string) (const GSheetModel *sheet_model,
- glong row, glong column);
-
- gboolean (* set_string) (GSheetModel *sheet_model,
- const gchar *s, glong row, glong column);
-
- gboolean (* clear_datum) (GSheetModel *sheet_model,
- glong row, glong column);
-
- gboolean (* is_editable) (const GSheetModel *sheet_model, glong row, glong column);
-
- GdkColor * (* get_foreground) (const GSheetModel *sheet_model,
- glong row, glong column);
-
- GdkColor * (* get_background) (const GSheetModel *sheet_model,
- glong row, glong column);
-
- const GtkJustification * (* get_justification) (const GSheetModel *sheet_model,
- glong row, glong column);
-
- /* column related metadata */
-
- gchar * (*get_column_title) (const GSheetModel *, gint col);
- gchar * (*get_column_subtitle) (const GSheetModel *, gint col);
- gboolean (*get_column_sensitivity) (const GSheetModel *, gint col);
- GtkJustification (*get_column_justification) (const GSheetModel *mode, gint col);
- const GtkSheetButton * (* get_button) (const GSheetModel *model, gint col);
-
- glong (*get_column_count) (const GSheetModel *model);
-
-
- /* row related metadata */
- gchar * (*get_row_title) (const GSheetModel *, gint row);
- gchar * (*get_row_subtitle) (const GSheetModel *, gint row);
- glong (*get_row_count) (const GSheetModel *model);
- gboolean (*get_row_sensitivity) (const GSheetModel *, gint row);
-};
-
-
-
-GType g_sheet_model_get_type (void) G_GNUC_CONST;
-
-
-gchar * g_sheet_model_get_string (const GSheetModel *sheet_model,
- glong row, glong column);
-
-gboolean g_sheet_model_set_string (GSheetModel *sheet_model,
- const gchar *s,
- glong row, glong column);
-
-gboolean g_sheet_model_datum_clear (GSheetModel *sheet_model,
- glong row, glong column);
-
-
-void g_sheet_model_range_changed (GSheetModel *sheet_model,
- glong row0, glong col0,
- glong rowi, glong coli);
-
-void g_sheet_model_rows_deleted (GSheetModel *sheet_model,
- glong row, glong n_rows);
-
-void g_sheet_model_rows_inserted (GSheetModel *sheet_model,
- glong row, glong n_rows);
-
-void g_sheet_model_columns_inserted (GSheetModel *sheet_model,
- glong column, glong n_columns);
-
-void g_sheet_model_columns_deleted (GSheetModel *sheet_model,
- glong column, glong n_columns);
-
-
-gboolean g_sheet_model_is_editable (const GSheetModel *model,
- glong row, glong column);
-
-gboolean g_sheet_model_is_visible
- (const GSheetModel *model, glong row, glong column);
-
-
-GdkColor *g_sheet_model_get_foreground
- (const GSheetModel *model, glong row, glong column);
-
-GdkColor *g_sheet_model_get_background
- (const GSheetModel *model, glong row, glong column);
-
-const GtkJustification *g_sheet_model_get_justification
- (const GSheetModel *model, glong row, glong column);
-
-const GtkSheetCellBorder * g_sheet_model_get_cell_border
- (const GSheetModel *model, glong row, glong column);
-
-gboolean g_sheet_model_free_strings (const GSheetModel *sheet_model);
-
-glong g_sheet_model_get_column_count (const GSheetModel *sheet_model);
-
-gint g_sheet_model_get_row_count (const GSheetModel *sheet_model);
-
-\f
-
-gboolean g_sheet_model_get_column_sensitivity (const GSheetModel *model,
- gint col);
-
-gchar * g_sheet_model_get_column_subtitle (const GSheetModel *model,
- gint col);
-
-GtkSheetButton * g_sheet_model_get_column_button (const GSheetModel *, gint);
-
-GtkJustification g_sheet_model_get_column_justification (const GSheetModel *,
- gint);
-
-\f
-
-gboolean g_sheet_model_get_row_sensitivity (const GSheetModel *model,
- gint row);
-
-
-gchar * g_sheet_model_get_row_subtitle (const GSheetModel *model,
- gint row);
-
-
-GtkSheetButton * g_sheet_model_get_row_button (const GSheetModel *, gint);
-
-
-
-
-G_END_DECLS
-
-#endif /* __G_SHEET_MODEL_H__ */
#include <pango/pango.h>
#include "gtksheet.h"
#include <gtksheet/psppire-marshal.h>
-#include "gsheetmodel.h"
+#include "psppire-sheetmodel.h"
#include <libpspp/misc.h>
#include <math.h>
static inline void
dispose_string (const GtkSheet *sheet, gchar *text)
{
- GSheetModel *model = gtk_sheet_get_model (sheet);
+ PsppireSheetModel *model = gtk_sheet_get_model (sheet);
if ( ! model )
return;
- if (g_sheet_model_free_strings (model))
+ if (psppire_sheet_model_free_strings (model))
g_free (text);
}
/* Callback which occurs whenever columns are inserted / deleted in the model */
static void
-columns_inserted_deleted_callback (GSheetModel *model, gint first_column,
+columns_inserted_deleted_callback (PsppireSheetModel *model, gint first_column,
gint n_columns,
gpointer data)
{
GtkSheet *sheet = GTK_SHEET (data);
GtkSheetRange range;
- gint model_columns = g_sheet_model_get_column_count (model);
+ gint model_columns = psppire_sheet_model_get_column_count (model);
/* Need to update all the columns starting from the first column and onwards.
/* Callback which occurs whenever rows are inserted / deleted in the model */
static void
-rows_inserted_deleted_callback (GSheetModel *model, gint first_row,
+rows_inserted_deleted_callback (PsppireSheetModel *model, gint first_row,
gint n_rows, gpointer data)
{
GtkSheet *sheet = GTK_SHEET (data);
GtkSheetRange range;
- gint model_rows = g_sheet_model_get_row_count (model);
+ gint model_rows = psppire_sheet_model_get_row_count (model);
/* Need to update all the rows starting from the first row and onwards.
* Previous rows are unchanged, so don't need to be updated.
If col0 or coli are negative, then all columns will be updated.
*/
static void
-range_update_callback (GSheetModel *m, gint row0, gint col0,
+range_update_callback (PsppireSheetModel *m, gint row0, gint col0,
gint rowi, gint coli, gpointer data)
{
GtkSheet *sheet = GTK_SHEET (data);
* Returns: the new sheet widget
*/
GtkWidget *
-gtk_sheet_new (GSheetModel *model)
+gtk_sheet_new (PsppireSheetModel *model)
{
GtkWidget *widget = g_object_new (GTK_TYPE_SHEET,
"model", model,
*
*/
void
-gtk_sheet_set_model (GtkSheet *sheet, GSheetModel *model)
+gtk_sheet_set_model (GtkSheet *sheet, PsppireSheetModel *model)
{
g_return_if_fail (GTK_IS_SHEET (sheet));
GtkJustification justification,
const gchar *text)
{
- GSheetModel *model ;
+ PsppireSheetModel *model ;
gchar *old_text ;
g_return_if_fail (sheet != NULL);
model = gtk_sheet_get_model (sheet);
- old_text = g_sheet_model_get_string (model, row, col);
+ old_text = psppire_sheet_model_get_string (model, row, col);
if (0 != safe_strcmp (old_text, text))
{
g_signal_handler_block (sheet->model, sheet->update_handler_id);
- g_sheet_model_set_string (model, text, row, col);
+ psppire_sheet_model_set_string (model, text, row, col);
g_signal_handler_unblock (sheet->model, sheet->update_handler_id);
}
- if ( g_sheet_model_free_strings (model))
+ if ( psppire_sheet_model_free_strings (model))
g_free (old_text);
}
static void
gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column)
{
- GSheetModel *model = gtk_sheet_get_model (sheet);
+ PsppireSheetModel *model = gtk_sheet_get_model (sheet);
gchar *old_text = gtk_sheet_cell_get_text (sheet, row, column);
if (old_text && strlen (old_text) > 0 )
{
- g_sheet_model_datum_clear (model, row, column);
+ psppire_sheet_model_datum_clear (model, row, column);
}
dispose_string (sheet, old_text);
gchar *
gtk_sheet_cell_get_text (const GtkSheet *sheet, gint row, gint col)
{
- GSheetModel *model;
+ PsppireSheetModel *model;
g_return_val_if_fail (sheet != NULL, NULL);
g_return_val_if_fail (GTK_IS_SHEET (sheet), NULL);
if ( !model )
return NULL;
- return g_sheet_model_get_string (model, row, col);
+ return psppire_sheet_model_get_string (model, row, col);
}
gtk_sheet_size_allocate_entry (sheet);
gtk_widget_set_sensitive (GTK_WIDGET (sheet_entry),
- g_sheet_model_is_editable (sheet->model,
+ psppire_sheet_model_is_editable (sheet->model,
row, col));
gtk_widget_map (sheet->entry_widget);
}
sheet_signals[BUTTON_EVENT_COLUMN], 0,
column, event);
- if (g_sheet_model_get_column_sensitivity (sheet->model, column))
+ if (psppire_sheet_model_get_column_sensitivity (sheet->model, column))
{
if ( event->type == GDK_2BUTTON_PRESS && event->button == 1)
g_signal_emit (sheet,
sheet_signals[BUTTON_EVENT_ROW], 0,
row, event);
- if (g_sheet_model_get_row_sensitivity (sheet->model, row))
+ if (psppire_sheet_model_get_row_sensitivity (sheet->model, row))
{
if ( event->type == GDK_2BUTTON_PRESS && event->button == 1)
g_signal_emit (sheet,
column = column_from_xpixel (sheet, x);
- if (g_sheet_model_get_column_sensitivity (sheet->model, column))
+ if (psppire_sheet_model_get_column_sensitivity (sheet->model, column))
{
veto = gtk_sheet_click_cell (sheet, -1, column);
gtk_grab_add (GTK_WIDGET (sheet));
y += sheet->vadjustment->value;
row = row_from_ypixel (sheet, y);
- if (g_sheet_model_get_row_sensitivity (sheet->model, row))
+ if (psppire_sheet_model_get_row_sensitivity (sheet->model, row))
{
veto = gtk_sheet_click_cell (sheet, row, -1);
gtk_grab_add (GTK_WIDGET (sheet));
{
if (sheet->row_title_under && row >= 0)
{
- gchar *text = g_sheet_model_get_row_subtitle (sheet->model, row);
+ gchar *text = psppire_sheet_model_get_row_subtitle (sheet->model, row);
show_subtitle (sheet, row, -1, text);
g_free (text);
if (sheet->column_title_under && column >= 0)
{
- gchar *text = g_sheet_model_get_column_subtitle (sheet->model,
+ gchar *text = psppire_sheet_model_get_column_subtitle (sheet->model,
column);
show_subtitle (sheet, -1, column, text);
gboolean is_sensitive = FALSE;
GtkSheetButton *
- button = g_sheet_model_get_column_button (sheet->model, col);
+ button = psppire_sheet_model_get_column_button (sheet->model, col);
allocation.y = 0;
allocation.x = psppire_axis_start_pixel (sheet->haxis, col)
+ CELL_SPACING;
allocation.height = sheet->column_title_area.height;
allocation.width = psppire_axis_unit_size (sheet->haxis, col);
- is_sensitive = g_sheet_model_get_column_sensitivity (sheet->model, col);
+ is_sensitive = psppire_sheet_model_get_column_sensitivity (sheet->model, col);
draw_button (sheet, sheet->column_title_window,
button, is_sensitive, allocation);
gboolean is_sensitive = FALSE;
GtkSheetButton *button =
- g_sheet_model_get_row_button (sheet->model, row);
+ psppire_sheet_model_get_row_button (sheet->model, row);
allocation.x = 0;
allocation.y = psppire_axis_start_pixel (sheet->vaxis, row)
+ CELL_SPACING;
allocation.width = sheet->row_title_area.width;
allocation.height = psppire_axis_unit_size (sheet->vaxis, row);
- is_sensitive = g_sheet_model_get_row_sensitivity (sheet->model, row);
+ is_sensitive = psppire_sheet_model_get_row_sensitivity (sheet->model, row);
draw_button (sheet, sheet->row_title_window,
button, is_sensitive, allocation);
attr->border.mask = 0;
attr->border.color = GTK_WIDGET (sheet)->style->black;
- attr->is_editable = g_sheet_model_is_editable (sheet->model, row, col);
+ attr->is_editable = psppire_sheet_model_is_editable (sheet->model, row, col);
colormap = gtk_widget_get_colormap (GTK_WIDGET (sheet));
- fg = g_sheet_model_get_foreground (sheet->model, row, col);
+ fg = psppire_sheet_model_get_foreground (sheet->model, row, col);
if ( fg )
{
gdk_colormap_alloc_color (colormap, fg, TRUE, TRUE);
attr->foreground = *fg;
}
- bg = g_sheet_model_get_background (sheet->model, row, col);
+ bg = psppire_sheet_model_get_background (sheet->model, row, col);
if ( bg )
{
gdk_colormap_alloc_color (colormap, bg, TRUE, TRUE);
}
attr->justification =
- g_sheet_model_get_column_justification (sheet->model, col);
+ psppire_sheet_model_get_column_justification (sheet->model, col);
- j = g_sheet_model_get_justification (sheet->model, row, col);
+ j = psppire_sheet_model_get_justification (sheet->model, row, col);
if (j)
attr->justification = *j;
}
-GSheetModel *
+PsppireSheetModel *
gtk_sheet_get_model (const GtkSheet *sheet)
{
g_return_val_if_fail (GTK_IS_SHEET (sheet), NULL);
#include <gtk/gtk.h>
#include "gtkextra-sheet.h"
-#include "gsheetmodel.h"
+#include "psppire-sheetmodel.h"
#include "psppire-axis.h"
G_BEGIN_DECLS
guint16 flags;
- GSheetModel *model;
+ PsppireSheetModel *model;
GtkSelectionMode selection_mode;
/* create a new sheet */
-GtkWidget * gtk_sheet_new (GSheetModel *model);
+GtkWidget * gtk_sheet_new (PsppireSheetModel *model);
/* create a new sheet with custom entry */
GtkWidget *
GtkSheetCellAttr *attributes);
void gtk_sheet_set_model (GtkSheet *sheet,
- GSheetModel *model);
+ PsppireSheetModel *model);
-GSheetModel * gtk_sheet_get_model (const GtkSheet *sheet);
+PsppireSheetModel * gtk_sheet_get_model (const GtkSheet *sheet);
G_END_DECLS
#include <data/data-out.h>
#include <data/variable.h>
-#include <gtksheet/gsheetmodel.h>
+#include <gtksheet/psppire-sheetmodel.h>
#include <gtksheet/psppire-marshal.h>
#include <pango/pango-context.h>
static void psppire_data_store_init (PsppireDataStore *data_store);
static void psppire_data_store_class_init (PsppireDataStoreClass *class);
-static void psppire_data_store_sheet_model_init (GSheetModelIface *iface);
+static void psppire_data_store_sheet_model_init (PsppireSheetModelIface *iface);
static void psppire_data_store_finalize (GObject *object);
static void psppire_data_store_dispose (GObject *object);
-static gboolean psppire_data_store_clear_datum (GSheetModel *model,
+static gboolean psppire_data_store_clear_datum (PsppireSheetModel *model,
glong row, glong column);
&data_store_info, 0);
g_type_add_interface_static (data_store_type,
- G_TYPE_SHEET_MODEL,
+ PSPPIRE_TYPE_SHEET_MODEL,
&sheet_model_info);
}
static glong
-psppire_data_store_get_var_count (const GSheetModel *model)
+psppire_data_store_get_var_count (const PsppireSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
}
static casenumber
-psppire_data_store_get_case_count_wrapper (const GSheetModel *model)
+psppire_data_store_get_case_count_wrapper (const PsppireSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_data_store_get_case_count (store);
}
static inline gchar *
-psppire_data_store_get_string_wrapper (const GSheetModel *model, glong row,
+psppire_data_store_get_string_wrapper (const PsppireSheetModel *model, glong row,
glong column)
{
return psppire_data_store_get_string (PSPPIRE_DATA_STORE (model), row, column);
static inline gboolean
-psppire_data_store_set_string_wrapper (GSheetModel *model,
+psppire_data_store_set_string_wrapper (PsppireSheetModel *model,
const gchar *text,
glong row, glong column)
{
-static gchar * get_column_subtitle (const GSheetModel *model, gint col);
-static gchar * get_column_button_label (const GSheetModel *model, gint col);
-static gboolean get_column_sensitivity (const GSheetModel *model, gint col);
-static GtkJustification get_column_justification (const GSheetModel *model, gint col);
+static gchar * get_column_subtitle (const PsppireSheetModel *model, gint col);
+static gchar * get_column_button_label (const PsppireSheetModel *model, gint col);
+static gboolean get_column_sensitivity (const PsppireSheetModel *model, gint col);
+static GtkJustification get_column_justification (const PsppireSheetModel *model, gint col);
-static gchar * get_row_button_label (const GSheetModel *model, gint row);
-static gboolean get_row_sensitivity (const GSheetModel *model, gint row);
+static gchar * get_row_button_label (const PsppireSheetModel *model, gint row);
+static gboolean get_row_sensitivity (const PsppireSheetModel *model, gint row);
static void
-psppire_data_store_sheet_model_init (GSheetModelIface *iface)
+psppire_data_store_sheet_model_init (PsppireSheetModelIface *iface)
{
iface->free_strings = TRUE;
iface->get_string = psppire_data_store_get_string_wrapper;
PsppireDataStore *store = PSPPIRE_DATA_STORE (data);
- g_sheet_model_columns_deleted (G_SHEET_MODEL (store), dict_index, 1);
+ psppire_sheet_model_columns_deleted (PSPPIRE_SHEET_MODEL (store), dict_index, 1);
#if AXIS_TRANSITION
- g_sheet_column_columns_changed (G_SHEET_COLUMN (store),
+ psppire_sheet_column_columns_changed (PSPPIRE_SHEET_COLUMN (store),
dict_index, -1);
#endif
}
PsppireDataStore *store = PSPPIRE_DATA_STORE (data);
#if AXIS_TRANSITION
- g_sheet_column_columns_changed (G_SHEET_COLUMN (store),
+ psppire_sheet_column_columns_changed (PSPPIRE_SHEET_COLUMN (store),
var_num, 1);
- g_sheet_model_range_changed (G_SHEET_MODEL (store),
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (store),
-1, var_num,
-1, var_num);
#endif
#if AXIS_TRANSITION
- g_sheet_column_columns_changed (G_SHEET_COLUMN (store),
+ psppire_sheet_column_columns_changed (PSPPIRE_SHEET_COLUMN (store),
var_num, 1);
#endif
- g_sheet_model_columns_inserted (G_SHEET_MODEL (store), var_num, 1);
+ psppire_sheet_model_columns_inserted (PSPPIRE_SHEET_MODEL (store), var_num, 1);
}
ds->datasheet = datasheet_create (reader);
- g_sheet_model_range_changed (G_SHEET_MODEL (ds),
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (ds),
-1, -1, -1, -1);
if ( ds->dict )
/* The entire model has changed */
- g_sheet_model_range_changed (G_SHEET_MODEL (data_store), -1, -1, -1, -1);
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (data_store), -1, -1, -1, -1);
#if AXIS_TRANSITION
- g_sheet_column_columns_changed (G_SHEET_COLUMN (data_store), 0, -1);
+ psppire_sheet_column_columns_changed (PSPPIRE_SHEET_COLUMN (data_store), 0, -1);
#endif
if ( data_store->dict )
static gboolean
-psppire_data_store_clear_datum (GSheetModel *model,
+psppire_data_store_clear_datum (PsppireSheetModel *model,
glong row, glong col)
{
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
psppire_data_store_set_value (store, row, index, &v,
var_get_width (pv));
- g_sheet_model_range_changed (model, row, col, row, col);
+ psppire_sheet_model_range_changed (model, row, col, row, col);
return TRUE;
}
var_get_case_index (pv), ss_cstr (text),
var_get_write_format (pv));
- g_sheet_model_range_changed (G_SHEET_MODEL (store), row, col, row, col);
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (store), row, col, row, col);
return TRUE;
}
store->show_labels = show_labels;
- g_sheet_model_range_changed (G_SHEET_MODEL (store),
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (store),
-1, -1, -1, -1);
}
/* Row related funcs */
static gchar *
-get_row_button_label (const GSheetModel *model, gint unit)
+get_row_button_label (const PsppireSheetModel *model, gint unit)
{
gchar *s = g_strdup_printf (_("%d"), unit + FIRST_CASE_NUMBER);
static gboolean
-get_row_sensitivity (const GSheetModel *model, gint unit)
+get_row_sensitivity (const PsppireSheetModel *model, gint unit)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (model);
/* Column related stuff */
static gchar *
-get_column_subtitle (const GSheetModel *model, gint col)
+get_column_subtitle (const PsppireSheetModel *model, gint col)
{
gchar *text;
const struct variable *v ;
}
static gchar *
-get_column_button_label (const GSheetModel *model, gint col)
+get_column_button_label (const PsppireSheetModel *model, gint col)
{
gchar *text;
struct variable *pv ;
}
static gboolean
-get_column_sensitivity (const GSheetModel *model, gint col)
+get_column_sensitivity (const PsppireSheetModel *model, gint col)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (model);
static GtkJustification
-get_column_justification (const GSheetModel *model, gint col)
+get_column_justification (const PsppireSheetModel *model, gint col)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (model);
const struct variable *pv ;
datasheet_delete_rows (ds->datasheet, first, n_cases);
g_signal_emit (ds, signals [CASES_DELETED], 0, first, n_cases);
- g_sheet_model_rows_deleted (G_SHEET_MODEL (ds), first, n_cases);
+ psppire_sheet_model_rows_deleted (PSPPIRE_SHEET_MODEL (ds), first, n_cases);
return TRUE;
}
if ( result )
{
g_signal_emit (ds, signals [CASE_INSERTED], 0, posn);
- g_sheet_model_rows_inserted (G_SHEET_MODEL (ds), posn, 1);
+ psppire_sheet_model_rows_inserted (PSPPIRE_SHEET_MODEL (ds), posn, 1);
}
else
g_warning ("Cannot insert case at position %ld\n", posn);
#include <gobject/gvaluecollector.h>
-#include <gtksheet/gsheetmodel.h>
+#include <gtksheet/psppire-sheetmodel.h>
#include "psppire-var-store.h"
#include "helper.h"
static void psppire_var_store_init (PsppireVarStore *var_store);
static void psppire_var_store_class_init (PsppireVarStoreClass *class);
-static void psppire_var_store_sheet_model_init (GSheetModelIface *iface);
+static void psppire_var_store_sheet_model_init (PsppireSheetModelIface *iface);
static void psppire_var_store_finalize (GObject *object);
gchar * missing_values_to_string (const struct variable *pv, GError **err);
-static gchar *psppire_var_store_get_string (const GSheetModel *sheet_model, glong row, glong column);
+static gchar *psppire_var_store_get_string (const PsppireSheetModel *sheet_model, glong row, glong column);
-static gboolean psppire_var_store_clear (GSheetModel *model, glong row, glong col);
+static gboolean psppire_var_store_clear (PsppireSheetModel *model, glong row, glong col);
-static gboolean psppire_var_store_set_string (GSheetModel *model,
+static gboolean psppire_var_store_set_string (PsppireSheetModel *model,
const gchar *text, glong row, glong column);
-static glong psppire_var_store_get_row_count (const GSheetModel * model);
-static glong psppire_var_store_get_column_count (const GSheetModel * model);
+static glong psppire_var_store_get_row_count (const PsppireSheetModel * model);
+static glong psppire_var_store_get_column_count (const PsppireSheetModel * model);
static gchar *text_for_column (const struct variable *pv, gint c, GError **err);
var_store_type = g_type_register_static (G_TYPE_OBJECT, "PsppireVarStore", &var_store_info, 0);
g_type_add_interface_static (var_store_type,
- G_TYPE_SHEET_MODEL,
+ PSPPIRE_TYPE_SHEET_MODEL,
&sheet_model_info);
}
}
static gboolean
-psppire_var_store_is_editable (const GSheetModel *model, glong row, glong column)
+psppire_var_store_is_editable (const PsppireSheetModel *model, glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
return psppire_var_store_item_editable (store, row, column);
static GdkColor *
-psppire_var_store_get_foreground (const GSheetModel *model, glong row, glong column)
+psppire_var_store_get_foreground (const PsppireSheetModel *model, glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
}
-static gchar *get_column_title (const GSheetModel *model, gint col);
-static gchar *get_row_title (const GSheetModel *model, gint row);
-static gboolean get_row_sensitivity (const GSheetModel *model, gint row);
+static gchar *get_column_title (const PsppireSheetModel *model, gint col);
+static gchar *get_row_title (const PsppireSheetModel *model, gint row);
+static gboolean get_row_sensitivity (const PsppireSheetModel *model, gint row);
static void
-psppire_var_store_sheet_model_init (GSheetModelIface *iface)
+psppire_var_store_sheet_model_init (PsppireSheetModelIface *iface)
{
iface->get_row_count = psppire_var_store_get_row_count;
iface->get_column_count = psppire_var_store_get_column_count;
static void
var_change_callback (GtkWidget *w, gint n, gpointer data)
{
- GSheetModel *model = G_SHEET_MODEL (data);
+ PsppireSheetModel *model = PSPPIRE_SHEET_MODEL (data);
- g_sheet_model_range_changed (model,
+ psppire_sheet_model_range_changed (model,
n, 0, n, PSPPIRE_VAR_STORE_n_COLS);
}
static void
var_delete_callback (GtkWidget *w, gint dict_idx, gint case_idx, gint val_cnt, gpointer data)
{
- GSheetModel *model = G_SHEET_MODEL (data);
+ PsppireSheetModel *model = PSPPIRE_SHEET_MODEL (data);
- g_sheet_model_rows_deleted (model, dict_idx, 1);
+ psppire_sheet_model_rows_deleted (model, dict_idx, 1);
}
static void
var_insert_callback (GtkWidget *w, glong row, gpointer data)
{
- GSheetModel *model = G_SHEET_MODEL (data);
+ PsppireSheetModel *model = PSPPIRE_SHEET_MODEL (data);
- g_sheet_model_rows_inserted (model, row, 1);
+ psppire_sheet_model_rows_inserted (model, row, 1);
}
static void
{
PsppireVarStore *vs = data;
- g_sheet_model_range_changed (G_SHEET_MODEL (vs), -1, -1, -1, -1);
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (vs), -1, -1, -1, -1);
}
/**
var_store);
/* The entire model has changed */
- g_sheet_model_range_changed (G_SHEET_MODEL (var_store), -1, -1, -1, -1);
+ psppire_sheet_model_range_changed (PSPPIRE_SHEET_MODEL (var_store), -1, -1, -1, -1);
}
static void
}
static gchar *
-psppire_var_store_get_string (const GSheetModel *model, glong row, glong column)
+psppire_var_store_get_string (const PsppireSheetModel *model, glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
Returns true if anything was updated, false otherwise.
*/
static gboolean
-psppire_var_store_clear (GSheetModel *model, glong row, glong col)
+psppire_var_store_clear (PsppireSheetModel *model, glong row, glong col)
{
struct variable *pv ;
Returns true if anything was updated, false otherwise.
*/
static gboolean
-psppire_var_store_set_string (GSheetModel *model,
+psppire_var_store_set_string (PsppireSheetModel *model,
const gchar *text, glong row, glong col)
{
struct variable *pv ;
static glong
-psppire_var_store_get_row_count (const GSheetModel * model)
+psppire_var_store_get_row_count (const PsppireSheetModel * model)
{
gint rows = 0;
PsppireVarStore *vs = PSPPIRE_VAR_STORE (model);
}
static glong
-psppire_var_store_get_column_count (const GSheetModel * model)
+psppire_var_store_get_column_count (const PsppireSheetModel * model)
{
return PSPPIRE_VAR_STORE_n_COLS ;
}
static gboolean
-get_row_sensitivity (const GSheetModel *model, gint row)
+get_row_sensitivity (const PsppireSheetModel *model, gint row)
{
PsppireVarStore *vs = PSPPIRE_VAR_STORE (model);
static gchar *
-get_row_title (const GSheetModel *model, gint unit)
+get_row_title (const PsppireSheetModel *model, gint unit)
{
return g_strdup_printf (_("%d"), unit + 1);
}
static gchar *
-get_column_title (const GSheetModel *model, gint col)
+get_column_title (const PsppireSheetModel *model, gint col)
{
if ( col >= 10)
return NULL;