84193ae4f8d23167b00f03f98df4f40f4e5d8f51
[pspp-builds.git] / lib / gtksheet / psppire-axis-impl.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2008  Free Software Foundation
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17
18 #ifndef PSPPIRE_AXIS_IMPL_H__
19 #define PSPPIRE_AXIS_IMPL_H__
20
21
22 #include <glib-object.h>
23 #include <glib.h>
24
25 #include "psppire-axis.h"
26 #include <libpspp/tower.h>
27
28 G_BEGIN_DECLS
29
30
31 /* --- type macros --- */
32 #define G_TYPE_PSPPIRE_AXIS_IMPL              (psppire_axis_impl_get_type ())
33 #define PSPPIRE_AXIS_IMPL(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_PSPPIRE_AXIS_IMPL, PsppireAxisImpl))
34 #define PSPPIRE_AXIS_IMPL_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_PSPPIRE_AXIS_IMPL, PsppireAxisImplClass))
35 #define PSPPIRE_IS_AXIS_IMPL(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_PSPPIRE_AXIS_IMPL))
36 #define PSPPIRE_IS_AXIS_IMPL_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_PSPPIRE_AXIS_IMPL))
37 #define PSPPIRE_AXIS_IMPL_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_PSPPIRE_AXIS_IMPL, PsppireAxisImplClass))
38
39
40
41 /* --- typedefs & structures --- */
42 typedef struct _PsppireAxisImpl    PsppireAxisImpl;
43 typedef struct _PsppireAxisImplClass PsppireAxisImplClass;
44
45 struct pool;
46
47 struct _PsppireAxisImpl
48 {
49   PsppireAxis  parent;
50
51   struct tower pixel_tower;
52   struct tower unit_tower;
53
54   struct pool *pool;
55 };
56
57 struct _PsppireAxisImplClass
58 {
59   PsppireAxisClass parent_class;
60 };
61
62 GType          psppire_axis_impl_get_type (void);
63
64 PsppireAxisImpl*   psppire_axis_impl_new (void);
65
66 \f
67 /* Interface between axis and model */
68
69
70
71 void psppire_axis_impl_insert (PsppireAxisImpl *a, gint posn, gint size);
72
73 void psppire_axis_impl_append (PsppireAxisImpl *a, gint size);
74
75
76 void psppire_axis_impl_append_n (PsppireAxisImpl *a, gint n_units, gint size);
77
78 void psppire_axis_impl_resize (PsppireAxisImpl *a, gint posn, gint size);
79
80 void psppire_axis_impl_clear (PsppireAxisImpl *);
81
82
83 void psppire_axis_impl_delete (PsppireAxisImpl *, gint first, gint n_cases);
84
85
86
87 G_END_DECLS
88
89 #endif /* PSPPIRE_AXIS_IMPL_H__ */