GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
register-common.h
Go to the documentation of this file.
1 /********************************************************************\
2  * register-common.h -- Common declarations for the register *
3  * Copyright (c) 2000 Dave Peticolas *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program 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 *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21  * *
22 \********************************************************************/
57 #ifndef REGISTER_COMMON_H
58 #define REGISTER_COMMON_H
59 
60 #include <glib.h>
61 
62 #include "basiccell.h"
63 
64 #define BASIC_CELL_TYPE_NAME "basic-cell"
65 #define COMBO_CELL_TYPE_NAME "combo-cell"
66 #define DATE_CELL_TYPE_NAME "date-cell"
67 #define NUM_CELL_TYPE_NAME "num-cell"
68 #define PRICE_CELL_TYPE_NAME "price-cell"
69 #define RECN_CELL_TYPE_NAME "recn-cell"
70 #define QUICKFILL_CELL_TYPE_NAME "quickfill-cell"
71 #define FORMULA_CELL_TYPE_NAME "formula-cell"
72 #define CHECKBOX_CELL_TYPE_NAME "checkbox-cell"
73 
74 void gnc_register_init (void);
75 void gnc_register_shutdown (void);
76 
77 void gnc_register_add_cell_type (const char *cell_type_name,
78  CellCreateFunc cell_creator);
79 BasicCell * gnc_register_make_cell (const char *cell_type_name);
80 
81 
82 /* The VirtualCellLocation structure contains the virtual
83  * location of a virtual cell.
84  */
87 {
88  int virt_row;
89  int virt_col;
90 };
91 
92 
93 gboolean virt_cell_loc_equal (VirtualCellLocation vcl1,
94  VirtualCellLocation vcl2);
95 
96 
97 /* The VirtualLocation structure contains the virtual
98  * location of a physical cell.
99  *
100  * There is one instance of Locator for each physical cell.
101  * The virt_row and virt_col members identify the corresponding
102  * cellblock/virtual cell that this physical cell is a member of.
103  * The two phys_offsets provide the location of the physical cell
104  * as an offset from the cell block origin. That is, the offsets
105  * should never be less than zero, or greater than the size of
106  * the cell block.
107  */
108 typedef struct _VirtualLocation VirtualLocation;
110 {
111  VirtualCellLocation vcell_loc;
112  int phys_row_offset;
113  int phys_col_offset;
114 };
115 
116 
117 gboolean virt_loc_equal (VirtualLocation vl1, VirtualLocation vl2);
118 
119 #endif
120