projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge psppire-axis and psppire-axis-impl
[pspp]
/
src
/
ui
/
gui
/
sheet
/
psppire-axis.h
diff --git
a/src/ui/gui/sheet/psppire-axis.h
b/src/ui/gui/sheet/psppire-axis.h
index 3836ecf05175eda01a0e31374003c5f4a4d163eb..cfba37b23014328ef838a87a6ca2e302ab6fc7ab 100644
(file)
--- 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.
/* 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
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 <glib-object.h>
#include <glib.h>
#include <glib-object.h>
#include <glib.h>
+#include <libpspp/tower.h>
G_BEGIN_DECLS
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))
/* --- 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))
#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;
/* --- typedefs & structures --- */
typedef struct _PsppireAxis PsppireAxis;
typedef struct _PsppireAxisClass PsppireAxisClass;
+struct pool;
+
struct _PsppireAxis
{
struct _PsppireAxis
{
- GObject parent;
+ GObject parent;
+
+ struct tower pixel_tower;
+ struct tower unit_tower;
+
+ struct pool *pool;
glong min_extent;
gint default_size;
glong min_extent;
gint default_size;
@@
-52,52
+60,32
@@
struct _PsppireAxisClass
GObjectClass parent_class;
};
GObjectClass parent_class;
};
-
GType psppire_axis_get_type (void);
GType psppire_axis_get_type (void);
+PsppireAxis* psppire_axis_new (void);
\f
\f
+/* 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
);
+
\f
- 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);
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
G_END_DECLS