GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnucash-sheetP.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_SHEETP_H
22 #define GNUCASH_SHEETP_H
23 
24 
25 #include "gnucash-sheet.h"
26 #include "gnucash-item-edit.h"
27 #include <libgnomecanvas/libgnomecanvas.h>
28 
29 
33 {
34  GnomeCanvas canvas;
35 
36  GtkWidget *window;
37 
38  GtkWidget *popup;
39  gpointer popup_data;
40 
41  Table *table;
42 
43  GtkWidget *reg;
44 
45  gint num_virt_rows;
46  gint num_virt_cols;
47 
48  GnomeCanvasItem *header_item;
49  GnomeCanvasItem *cursor;
50  GnomeCanvasItem *grid;
51 
52  GHashTable *cursor_styles;
53 
54  /* some style information associated to a sheet */
55  GHashTable *dimensions_hash_table;
56 
57  GTable *blocks;
58 
59  GnomeCanvasItem *item_editor;
60  GtkWidget *entry;
61 
62  gboolean use_theme_colors;
63  gboolean use_horizontal_lines;
64  gboolean use_vertical_lines;
65  GtkWidget *header_color;
66  GtkWidget *primary_color;
67  GtkWidget *secondary_color;
68  GtkWidget *split_color;
69 
70  gboolean input_cancelled;
71 
72  gint top_block; /* maybe not fully visible */
73  gint bottom_block;
74  gint left_block;
75  gint right_block;
76 
77  gint num_visible_blocks;
78  gint num_visible_phys_rows;
79 
80  gint width; /* the width in pixels of the sheet */
81  gint height;
82 
83  gint window_height;
84  gint window_width;
85 
86  gint cell_borders;
87 
88  gint editing;
89 
90  guint button; /* mouse button being held down */
91  gboolean grabbed; /* has the grab */
92 
93  guint insert_signal;
94  guint delete_signal;
95  guint changed_signal;
96 
97  GtkAdjustment *hadj, *vadj;
98 
99  GFunc moved_cb;
100  gpointer moved_cb_data;
101 
102  /* IMContext */
103  GtkIMContext *im_context;
104  gint preedit_length; /* num of bytes */
105  gint preedit_char_length; /* num of chars in UTF-8 */
106  gint preedit_start_position; /* save preedit start position *
107  * combined with selection start */
108  gint preedit_cursor_position; /* save preedit cursor position */
109  gint preedit_selection_length;
110  PangoAttrList *preedit_attrs;
111  gboolean need_im_reset;
112  gboolean direct_update_cell;
113  guint commit_signal;
114  guint preedit_changed_signal;
115  guint retrieve_surrounding_signal;
116  guint delete_surrounding_signal;
117 
118  guint shift_state;
119  guint keyval_state;
120 
121 };
122 
123 
125 {
126  GnomeCanvasClass parent_class;
127 };
128 
129 
131 {
132  GtkTable table;
133 
134  GtkWidget *vscrollbar;
135  GtkWidget *hscrollbar;
136  GtkWidget *sheet;
137  GtkWidget *header_canvas;
138  gboolean hscrollbar_visible;
139 };
140 
141 
143 {
144  GtkTableClass parent_class;
145 
146  void (*activate_cursor) (GnucashRegister *reg);
147  void (*redraw_all) (GnucashRegister *reg);
148  void (*redraw_help) (GnucashRegister *reg);
149 };
150 
151 
154 GncItemEdit *gnucash_sheet_get_item_edit (GnucashSheet *sheet);
155 //Table *gnucash_sheet_get_table (GnucashSheet *sheet);
156 //gint gnucash_sheet_get_num_virt_rows (GnucashSheet *sheet);
157 //gint gnucash_sheet_get_num_virt_cols (GnucashSheet *sheet);
158 
159 #endif
160 
Definition: gtable.c:28