1 /* GSheetColumn --- an abstract model of the column 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 __GSHEET_COLUMN_IFACE_H
21 #define __GSHEET_COLUMN_IFACE_H
23 #include <glib-object.h>
27 #include "gtkextra-sheet.h"
32 #define G_TYPE_SHEET_COLUMN (g_sheet_column_get_type ())
33 #define G_SHEET_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_SHEET_COLUMN, GSheetColumn))
34 #define G_IS_SHEET_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_SHEET_COLUMN))
35 #define G_SHEET_COLUMN_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_SHEET_COLUMN, GSheetColumnIface))
38 typedef struct _GSheetColumn GSheetColumn;
39 typedef struct _GSheetColumnIface GSheetColumnIface;
40 struct _GSheetColumnIface
42 GTypeInterface g_iface;
46 void (* columns_changed) (GSheetColumn *geo,
47 gint col, gint n_columns);
50 gint (* get_width) (const GSheetColumn *gcolumn, gint col, const GtkSheet *);
51 void (* set_width) (GSheetColumn *gcolumn, gint col, gint width, const GtkSheet *);
53 gboolean (* get_visibility) (const GSheetColumn *gcolumn, gint col, const GtkSheet *);
54 gboolean (* get_sensitivity) (const GSheetColumn *gcolumn, gint col, const GtkSheet *);
55 const GtkSheetButton * (* get_button) (const GSheetColumn *gcolumn, gint col, const GtkSheet *);
56 GtkJustification (* get_justification) (const GSheetColumn *gcolumn, gint col, const GtkSheet *);
58 gint (*get_left_text_column) (const GSheetColumn *gcolumn,
59 gint col, const GtkSheet *);
61 gint (*get_right_text_column) (const GSheetColumn *gcolumn,
62 gint col, const GtkSheet *);
64 void (* set_left_text_column) (const GSheetColumn *gcolumn,
65 gint col, gint i, const GtkSheet *);
67 void (* set_right_text_column) (const GSheetColumn *gcolumn,
68 gint col, gint i, const GtkSheet *);
70 gint (* get_column_count) (const GSheetColumn *geo, const GtkSheet *);
73 GtkStateType (*get_button_state)(const GSheetColumn *geo, gint col, const GtkSheet *);
74 const gchar * (*get_button_label)(const GSheetColumn *geo, gint col, const GtkSheet *);
75 gboolean (*get_button_visibility)(const GSheetColumn *geo,
76 gint col, const GtkSheet *);
77 const GtkSheetChild * (*get_button_child)(const GSheetColumn *geo,
78 gint col, const GtkSheet *);
79 GtkJustification * (*get_button_justification)(const GSheetColumn *geo,
80 gint col, const GtkSheet *);
84 inline GType g_sheet_column_get_type (void) G_GNUC_CONST;
87 inline gint g_sheet_column_get_width (const GSheetColumn *gcolumn,
88 gint col, const GtkSheet *sheet);
91 inline void g_sheet_column_set_width (GSheetColumn *gcolumn,
92 gint col, gint size, const GtkSheet *sheet);
95 inline gboolean g_sheet_column_get_visibility(const GSheetColumn *gcolumn,
96 gint col, const GtkSheet *sheet);
98 inline gboolean g_sheet_column_get_sensitivity(const GSheetColumn *gcolumn,
99 gint col, const GtkSheet *sheet);
102 inline const GtkSheetButton *g_sheet_column_get_button(const GSheetColumn *gcolumn,
103 gint col, const GtkSheet *sheet);
105 inline GtkJustification g_sheet_column_get_justification(const GSheetColumn *gcolumn, gint col, const GtkSheet *sheet);
108 inline gint g_sheet_column_get_left_text_column (const GSheetColumn *gcolumn,
109 gint col, const GtkSheet *sheet);
111 inline gint g_sheet_column_get_right_text_column (const GSheetColumn *gcolumn,
112 gint col, const GtkSheet *sheet);
114 inline void g_sheet_column_set_left_text_column (const GSheetColumn *gcolumn,
115 gint col, gint i, const GtkSheet *sheet);
118 inline void g_sheet_column_set_right_text_column (const GSheetColumn *gcolumn,
119 gint col, gint i, const GtkSheet *sheet);
122 inline gint g_sheet_column_get_column_count(const GSheetColumn *geo, const GtkSheet *sheet);
124 inline gint g_sheet_column_start_pixel(const GSheetColumn *geo, gint col, const GtkSheet *sheet);
126 inline void g_sheet_column_columns_deleted(GSheetColumn *geo,
127 gint first, gint n_columns);
132 #endif /* __G_SHEET_COLUMN_IFACE_H__ */