1 /********************************************************************\ 2 * This program is free software; you can redistribute it and/or * 3 * modify it under the terms of the GNU General Public License as * 4 * published by the Free Software Foundation; either version 2 of * 5 * the License, or (at your option) any later version. * 6 * * 7 * This program is distributed in the hope that it will be useful, * 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 10 * GNU General Public License for more details. * 11 * * 12 * You should have received a copy of the GNU General Public License* 13 * along with this program; if not, contact: * 14 * * 15 * Free Software Foundation Voice: +1-617-542-5942 * 16 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 17 * Boston, MA 02110-1301, USA gnu@gnu.org * 18 * * 19 \********************************************************************/ 20 21 #ifndef GNUCASH_HEADER_H 22 #define GNUCASH_HEADER_H 23 24 #include <gtk/gtk.h> 25 26 /** @ingroup Register 27 * @addtogroup Gnome 28 * @{ 29 */ 30 /** @file gnucash-header.h 31 * @brief Public declarations for GnucashHeader class 32 */ 33 #define GNC_TYPE_HEADER (gnc_header_get_type ()) 34 #define GNC_HEADER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_HEADER, GncHeader)) 35 #define GNC_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_HEADER, GncHeaderClass)) 36 #define GNC_IS_HEADER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_HEADER)) 37 38 GType gnc_header_get_type (void); 39 40 typedef struct 41 { 42 GtkLayout parent; 43 44 GnucashSheet *sheet; 45 SheetBlockStyle *style; 46 47 char *cursor_name; 48 49 int num_phys_rows; 50 51 int in_resize; 52 int resize_col_width; 53 int resize_x; 54 int resize_col; 55 56 int height; 57 int width; 58 59 cairo_surface_t *surface; 60 GdkCursor *normal_cursor; 61 GdkCursor *resize_cursor; 62 } GncHeader; 63 64 65 typedef struct 66 { 67 GtkLayoutClass parent_class; 68 } GncHeaderClass; 69 70 71 GtkWidget *gnc_header_new (GnucashSheet *sheet); 72 void gnc_header_reconfigure (GncHeader *header); 73 void gnc_header_request_redraw (GncHeader *header); 74 75 void gnc_header_set_header_rows (GncHeader *header, 76 int num_phys_rows); 77 78 gint gnc_header_get_cell_offset (GncHeader *header, 79 gint col, 80 gint *cell_width); 81 82 /** @} */ 83 #endif /* GNUCASH_HEADER_H */ 84