1 /* GSheetRow --- an abstract model of the row geometry of a
3 * Copyright (C) 2006 Free Software Foundation
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.
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.
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
20 #ifndef __G_SHEET_ROW_IFACE_H__
21 #define __G_SHEET_ROW_IFACE_H__
23 #include <glib-object.h>
27 #include "gtkextra-sheet.h"
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))
40 typedef struct _GSheetRow GSheetRow;
41 typedef struct _GSheetRowIface GSheetRowIface;
43 struct _GSheetRowIface
45 GTypeInterface g_iface;
49 void (* rows_changed) (GSheetRow *geo,
50 glong row, glong n_rows);
53 gint (* get_height) (const GSheetRow *grow, glong row, gpointer);
54 void (* set_height) (GSheetRow *grow, glong row, gint height,
57 gboolean (* get_visibility) (const GSheetRow *grow, glong row,
60 gboolean (* get_sensitivity) (const GSheetRow *grow, glong row,
63 const GtkSheetButton * (* get_button) (const GSheetRow *grow, glong row,
66 glong (* get_row_count) (const GSheetRow *geo, gpointer);
69 GtkStateType (*get_button_state) (const GSheetRow *geo, glong row,
72 gchar * (*get_button_label) (const GSheetRow *geo, glong row,
75 gchar * (*get_subtitle) (const GSheetRow *geo, glong row);
77 gboolean (*get_button_visibility) (const GSheetRow *geo,
80 const GtkSheetChild * (*get_button_child) (const GSheetRow *geo,
83 guint (*top_ypixel) (const GSheetRow *geo, glong row, gpointer);
84 glong (*pixel_to_row) (const GSheetRow *geo, guint pixel, gpointer);
88 GType g_sheet_row_get_type (void) G_GNUC_CONST;
91 gint g_sheet_row_get_height (const GSheetRow *grow,
95 void g_sheet_row_set_height (GSheetRow *grow,
96 glong row, gint size, gpointer);
99 gboolean g_sheet_row_get_visibility (const GSheetRow *grow,
100 glong row, gpointer);
102 gboolean g_sheet_row_get_sensitivity (const GSheetRow *grow,
103 glong row, gpointer);
106 GtkSheetButton *g_sheet_row_get_button (const GSheetRow *grow,
107 glong row, gpointer);
110 glong g_sheet_row_get_row_count (const GSheetRow *geo, gpointer);
112 /* Return the top pixel of row ROW */
113 gint g_sheet_row_start_pixel (const GSheetRow *geo, glong row,
116 /* Return the row contained by pixel PIXEL */
117 glong g_sheet_row_pixel_to_row (const GSheetRow *geo, gint pixel,
121 void g_sheet_row_rows_deleted (GSheetRow *geo,
122 glong first, glong n_rows);
125 gchar *g_sheet_row_get_subtitle (const GSheetRow *row_geo, glong row);
130 #endif /* __G_SHEET_ROW_IFACE_H__ */