X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fsheet%2Fpsppire-axis.h;h=cfba37b23014328ef838a87a6ca2e302ab6fc7ab;hb=ebda03f4d53b24d1af3de9fd7dcbbf448401d5a9;hp=3836ecf05175eda01a0e31374003c5f4a4d163eb;hpb=3c52a21736b3777ced3e47148fa2fc8f9eff59c8;p=pspp-builds.git diff --git a/src/ui/gui/sheet/psppire-axis.h b/src/ui/gui/sheet/psppire-axis.h index 3836ecf0..cfba37b2 100644 --- a/src/ui/gui/sheet/psppire-axis.h +++ b/src/ui/gui/sheet/psppire-axis.h @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008 Free Software Foundation + Copyright (C) 2008, 2009 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,11 +21,11 @@ #include #include +#include G_BEGIN_DECLS - /* --- type macros --- */ #define G_TYPE_PSPPIRE_AXIS (psppire_axis_get_type ()) #define PSPPIRE_AXIS(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_PSPPIRE_AXIS, PsppireAxis)) @@ -35,13 +35,21 @@ G_BEGIN_DECLS #define PSPPIRE_AXIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_PSPPIRE_AXIS, PsppireAxisClass)) + /* --- typedefs & structures --- */ typedef struct _PsppireAxis PsppireAxis; typedef struct _PsppireAxisClass PsppireAxisClass; +struct pool; + struct _PsppireAxis { - GObject parent; + GObject parent; + + struct tower pixel_tower; + struct tower unit_tower; + + struct pool *pool; glong min_extent; gint default_size; @@ -52,52 +60,32 @@ struct _PsppireAxisClass GObjectClass parent_class; }; - GType psppire_axis_get_type (void); +PsppireAxis* psppire_axis_new (void); +/* Interface between axis and model */ -GType psppire_axis_iface_get_type (void); - -#define PSPPIRE_TYPE_AXIS_IFACE (psppire_axis_iface_get_type ()) - -typedef struct _PsppireAxisIface PsppireAxisIface; - -struct _PsppireAxisIface -{ - GTypeInterface g_iface; - +void psppire_axis_insert (PsppireAxis *a, gint posn, gint size); - /* Virtual Table */ +void psppire_axis_append (PsppireAxis *a, gint size); - gint (*unit_size) (const PsppireAxis *a, gint unit); - gint (*unit_count) (const PsppireAxis *a); +void psppire_axis_append_n (PsppireAxis *a, gint n_units, gint size); - glong (*start_pixel) (const PsppireAxis *a, gint unit); +void psppire_axis_resize (PsppireAxis *a, gint posn, glong size); - gint (*unit_at_pixel) (const PsppireAxis *a, glong pixel); +void psppire_axis_clear (PsppireAxis *); - glong (*total_size) (const PsppireAxis *a); +void psppire_axis_delete (PsppireAxis *, gint first, gint n_cases); + - void (*resize) (PsppireAxis *a, gint unit, glong pixels); -}; - - -/* Interface between sheet and axis */ - -gint psppire_axis_unit_size (const PsppireAxis *a, gint unit); - -gint psppire_axis_unit_count (const PsppireAxis *a); - +gint psppire_axis_unit_count (const PsppireAxis *); glong psppire_axis_start_pixel (const PsppireAxis *a, gint unit); - -gint psppire_axis_unit_at_pixel (const PsppireAxis *a, glong pixel); - - -void psppire_axis_resize (PsppireAxis *a, gint unit, glong size); +gint psppire_axis_unit_size (const PsppireAxis *a, gint unit); +gint psppire_axis_unit_at_pixel (const PsppireAxis *a, glong pixel); G_END_DECLS