Added new files resulting from directory restructuring.
[pspp-builds.git] / lib / gtksheet / gsheet-row-iface.h
1 /* GSheetRow --- an abstract model of the row geometry of a 
2  * GSheet widget.
3  * Copyright (C) 2006 Free Software Foundation
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20 #ifndef __G_SHEET_ROW_IFACE_H__
21 #define __G_SHEET_ROW_IFACE_H__
22
23 #include <glib-object.h>
24 #include <gdk/gdk.h>
25 #include <gtk/gtk.h>
26
27 #include "gtkextra-sheet.h"
28
29
30 G_BEGIN_DECLS
31
32 #define G_TYPE_SHEET_ROW            (g_sheet_row_get_type ())
33 #define G_SHEET_ROW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SHEET_ROW, GSheetRow))
34 #define G_IS_SHEET_ROW(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SHEET_ROW))
35 #define G_SHEET_ROW_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SHEET_ROW, GSheetRowIface))
36
37
38
39
40 typedef struct _GSheetRow        GSheetRow; 
41 typedef struct _GSheetRowIface   GSheetRowIface;
42
43 struct _GSheetRowIface
44 {
45   GTypeInterface g_iface;
46
47
48   /* Signals */
49   void         (* rows_changed)     (GSheetRow *geo,
50                                       gint row, gint n_rows);
51
52   /* Virtual Table */
53   gint (* get_height) (const GSheetRow *grow, gint row, const GtkSheet *);
54   void (* set_height) (GSheetRow *grow, gint row, gint height, 
55                        const GtkSheet *);
56
57   gboolean (* get_visibility) (const GSheetRow *grow, gint row, 
58                                const GtkSheet *);
59
60   gboolean (* get_sensitivity) (const GSheetRow *grow, gint row, 
61                                 const GtkSheet *);
62
63   const GtkSheetButton * (* get_button) (const GSheetRow *grow, gint row, 
64                                          const GtkSheet *);
65
66   gint  (* get_row_count) (const GSheetRow *geo, const GtkSheet *);
67
68
69   GtkStateType  (*get_button_state)(const GSheetRow *geo, gint row, 
70                                     const GtkSheet *);
71
72   const gchar * (*get_button_label)(const GSheetRow *geo, gint row, 
73                                     const GtkSheet *);
74
75   gboolean      (*get_button_visibility)(const GSheetRow *geo, 
76                                         gint row, const GtkSheet *);
77
78   const GtkSheetChild * (*get_button_child)(const GSheetRow *geo, 
79                                            gint row, const GtkSheet *);
80
81   guint (*top_ypixel)(const GSheetRow *geo, gint row, const GtkSheet *);
82   gint (*pixel_to_row)(const GSheetRow *geo, guint pixel, const GtkSheet *);
83 };
84
85
86 GType g_sheet_row_get_type   (void) G_GNUC_CONST;
87
88
89 gint  g_sheet_row_get_height (const GSheetRow *grow,
90                                         gint row, const GtkSheet *sheet);
91
92
93 void  g_sheet_row_set_height (GSheetRow *grow,
94                                         gint row, gint size, const GtkSheet *sheet);
95
96
97 gboolean  g_sheet_row_get_visibility(const GSheetRow *grow,
98                                             gint row, const GtkSheet *sheet);
99
100 gboolean  g_sheet_row_get_sensitivity(const GSheetRow *grow,
101                                              gint row, const GtkSheet *sheet);
102
103
104 const GtkSheetButton *g_sheet_row_get_button(const GSheetRow *grow,
105                                              gint row, const GtkSheet *sheet);
106
107
108 gint  g_sheet_row_get_row_count(const GSheetRow *geo, const GtkSheet *sheet);
109
110 /* Return the top pixel of row ROW */
111 gint  g_sheet_row_start_pixel(const GSheetRow *geo, gint row, 
112                               const GtkSheet *sheet);
113
114 /* Return the row contained by pixel PIXEL */
115 gint  g_sheet_row_pixel_to_row(const GSheetRow *geo, gint pixel, 
116                                const GtkSheet *sheet);
117
118
119 void g_sheet_row_rows_deleted(GSheetRow *geo, 
120                                       gint first, gint n_rows);
121
122
123 G_END_DECLS
124
125 #endif /* __G_SHEET_ROW_IFACE_H__ */