#include <language/syntax-string-source.h>
#include "psppire-data-store.h"
-#include <ui/gui/sheet/psppire-axis-impl.h>
-#include "helper.h"
+#include <libpspp/i18n.h>
+#include <ui/gui/sheet/psppire-axis.h>
+#include "executor.h"
#include <gtk-contrib/gtkxpaned.h>
#include <gettext.h>
for (i = 0; i < 2; ++i)
{
- psppire_axis_impl_clear (de->vaxis[i]);
- psppire_axis_impl_append_n (de->vaxis[i], n_cases, DEFAULT_ROW_HEIGHT);
+ psppire_axis_clear (de->vaxis[i]);
+ psppire_axis_append_n (de->vaxis[i], n_cases, DEFAULT_ROW_HEIGHT);
}
}
PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data);
for (i = 0; i < 2; ++i)
- psppire_axis_impl_insert (de->vaxis[i], before, DEFAULT_ROW_HEIGHT);
+ psppire_axis_insert (de->vaxis[i], before, DEFAULT_ROW_HEIGHT);
}
PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data);
for (i = 0; i < 2; ++i)
- psppire_axis_impl_delete (de->vaxis[0], first, n_cases);
+ psppire_axis_delete (de->vaxis[0], first, n_cases);
}
PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data);
gint m_width = width_of_m (GTK_WIDGET (de));
- PsppireAxisImpl *vaxis;
+ PsppireAxis *vaxis;
g_object_get (de->var_sheet, "vertical-axis", &vaxis, NULL);
- psppire_axis_impl_clear (vaxis);
- psppire_axis_impl_append_n (vaxis, 1 + psppire_dict_get_var_cnt (dict), DEFAULT_ROW_HEIGHT);
+ psppire_axis_clear (vaxis);
+ psppire_axis_append_n (vaxis, 1 + psppire_dict_get_var_cnt (dict), DEFAULT_ROW_HEIGHT);
g_signal_connect_swapped (de->haxis, "resize-unit",
G_CALLBACK (rewidth_variable), de);
- psppire_axis_impl_clear (de->haxis);
+ psppire_axis_clear (de->haxis);
for (v = 0 ; v < psppire_dict_get_var_cnt (dict); ++v)
{
const struct variable *var = psppire_dict_get_variable (dict, v);
- psppire_axis_impl_append (de->haxis, m_width * var_get_display_width (var));
+ psppire_axis_append (de->haxis, m_width * var_get_display_width (var));
}
}
gint m_width = width_of_m (GTK_WIDGET (de));
- PsppireAxisImpl *var_vaxis;
+ PsppireAxis *var_vaxis;
const struct variable *var = psppire_dict_get_variable (dict, x);
g_object_get (de->var_sheet, "vertical-axis", &var_vaxis, NULL);
- psppire_axis_impl_insert (var_vaxis, x, DEFAULT_ROW_HEIGHT);
+ psppire_axis_insert (var_vaxis, x, DEFAULT_ROW_HEIGHT);
- psppire_axis_impl_insert (de->haxis, x, m_width * var_get_display_width (var));
+ psppire_axis_insert (de->haxis, x, m_width * var_get_display_width (var));
}
{
PsppireDataEditor *de = PSPPIRE_DATA_EDITOR (data);
- PsppireAxisImpl *var_vaxis;
+ PsppireAxis *var_vaxis;
g_object_get (de->var_sheet, "vertical-axis", &var_vaxis, NULL);
- psppire_axis_impl_delete (var_vaxis, posn, 1);
+ psppire_axis_delete (var_vaxis, posn, 1);
- psppire_axis_impl_delete (de->haxis, posn, 1);
+ psppire_axis_delete (de->haxis, posn, 1);
}
if ( var_width < 1 )
var_width = 1;
- psppire_axis_impl_resize (de->haxis, posn, m_width * var_width);
+ psppire_axis_resize (de->haxis, posn, m_width * var_width);
}
gchar *text = g_strdup_printf ("%d: %s", row + FIRST_CASE_NUMBER,
var_get_name (var));
- gchar *s = pspp_locale_to_utf8 (text, -1, 0);
+ gchar *s = recode_string (UTF8,
+ psppire_dict_encoding (data_store->dict),
+ text, -1);
g_free (text);
static void
init_sheet (PsppireDataEditor *de, int i,
GtkAdjustment *hadj, GtkAdjustment *vadj,
- PsppireAxisImpl *vaxis,
- PsppireAxisImpl *haxis
+ PsppireAxis *vaxis,
+ PsppireAxis *haxis
)
{
de->sheet_bin[i] = gtk_scrolled_window_new (hadj, vadj);
GtkAdjustment *vadj1, *hadj1;
GtkWidget *sheet ;
- de->vaxis[0] = psppire_axis_impl_new ();
- de->vaxis[1] = psppire_axis_impl_new ();
+ de->vaxis[0] = psppire_axis_new ();
+ de->vaxis[1] = psppire_axis_new ();
/* There's only one horizontal axis, since the
column widths are parameters of the variables */
- de->haxis = psppire_axis_impl_new ();
+ de->haxis = psppire_axis_new ();
de->split = TRUE;
de->paned = gtk_xpaned_new ();
switch (gtk_notebook_get_current_page (GTK_NOTEBOOK (de)))
{
case PSPPIRE_DATA_EDITOR_DATA_VIEW:
- if ( de->data_sheet[0]->state == PSPPIRE_SHEET_COLUMN_SELECTED )
+ if ( PSPPIRE_SHEET (de->data_sheet[0])->select_status
+ == PSPPIRE_SHEET_COLUMN_SELECTED )
posn = PSPPIRE_SHEET (de->data_sheet[0])->range.col0;
else
posn = PSPPIRE_SHEET (de->data_sheet[0])->active_cell.col;
break;
case PSPPIRE_DATA_EDITOR_VARIABLE_VIEW:
- if ( de->var_sheet->state == PSPPIRE_SHEET_ROW_SELECTED )
+ if ( PSPPIRE_SHEET (de->var_sheet)->select_status
+ == PSPPIRE_SHEET_ROW_SELECTED )
posn = PSPPIRE_SHEET (de->var_sheet)->range.row0;
else
posn = PSPPIRE_SHEET (de->var_sheet)->active_cell.row;