GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnucash-header.h
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 [email protected] *
18  * *
19 \********************************************************************/
20 
21 #ifndef GNUCASH_HEADER_H
22 #define GNUCASH_HEADER_H
23 
24 
25 #define GNC_TYPE_HEADER (gnc_header_get_type ())
26 #define GNC_HEADER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_HEADER, GncHeader))
27 #define GNC_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_HEADER, GncHeaderClass))
28 #define GNC_IS_HEADER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_HEADER))
29 
30 GType gnc_header_get_type (void);
31 
32 typedef struct
33 {
34  GnomeCanvasItem canvas_item;
35 
36  GnucashSheet *sheet;
37  SheetBlockStyle *style;
38 
39  char *cursor_name;
40 
41  int num_phys_rows;
42 
43  int in_resize;
44  int resize_col_width;
45  int resize_x;
46  int resize_col;
47 
48  gboolean needs_ungrab;
49 
50  int height;
51  int width;
52 
53  GdkGC *gc;
54  GdkCursor *normal_cursor;
55  GdkCursor *resize_cursor;
56 } GncHeader;
57 
58 
59 typedef struct
60 {
61  GnomeCanvasItemClass parent_class;
63 
64 
65 GtkWidget *gnc_header_new (GnucashSheet *sheet);
66 void gnc_header_reconfigure (GncHeader *header);
67 void gnc_header_request_redraw (GncHeader *header);
68 
69 void gnc_header_set_header_rows (GncHeader *header,
70  int num_phys_rows);
71 
72 #endif /* GNUCASH_HEADER_H */
73