|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * register-common.h -- Common declarations for the register * 00003 * Copyright (c) 2000 Dave Peticolas * 00004 * * 00005 * This program is free software; you can redistribute it and/or * 00006 * modify it under the terms of the GNU General Public License as * 00007 * published by the Free Software Foundation; either version 2 of * 00008 * the License, or (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License* 00016 * along with this program; if not, contact: * 00017 * * 00018 * Free Software Foundation Voice: +1-617-542-5942 * 00019 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00020 * Boston, MA 02110-1301, USA gnu@gnu.org * 00021 * * 00022 \********************************************************************/ 00057 #ifndef REGISTER_COMMON_H 00058 #define REGISTER_COMMON_H 00059 00060 #include <glib.h> 00061 00062 #include "basiccell.h" 00063 00064 #define BASIC_CELL_TYPE_NAME "basic-cell" 00065 #define COMBO_CELL_TYPE_NAME "combo-cell" 00066 #define DATE_CELL_TYPE_NAME "date-cell" 00067 #define NUM_CELL_TYPE_NAME "num-cell" 00068 #define PRICE_CELL_TYPE_NAME "price-cell" 00069 #define RECN_CELL_TYPE_NAME "recn-cell" 00070 #define QUICKFILL_CELL_TYPE_NAME "quickfill-cell" 00071 #define FORMULA_CELL_TYPE_NAME "formula-cell" 00072 #define CHECKBOX_CELL_TYPE_NAME "checkbox-cell" 00073 00074 void gnc_register_init (void); 00075 void gnc_register_shutdown (void); 00076 00077 void gnc_register_add_cell_type (const char *cell_type_name, 00078 CellCreateFunc cell_creator); 00079 BasicCell * gnc_register_make_cell (const char *cell_type_name); 00080 00081 00082 /* The VirtualCellLocation structure contains the virtual 00083 * location of a virtual cell. 00084 */ 00085 typedef struct _VirtualCellLocation VirtualCellLocation; 00086 struct _VirtualCellLocation 00087 { 00088 int virt_row; 00089 int virt_col; 00090 }; 00091 00092 00093 gboolean virt_cell_loc_equal (VirtualCellLocation vcl1, 00094 VirtualCellLocation vcl2); 00095 00096 00097 /* The VirtualLocation structure contains the virtual 00098 * location of a physical cell. 00099 * 00100 * There is one instance of Locator for each physical cell. 00101 * The virt_row and virt_col members identify the corresponding 00102 * cellblock/virtual cell that this physical cell is a member of. 00103 * The two phys_offsets provide the location of the physical cell 00104 * as an offset from the cell block origin. That is, the offsets 00105 * should never be less than zero, or greater than the size of 00106 * the cell block. 00107 */ 00108 typedef struct _VirtualLocation VirtualLocation; 00109 struct _VirtualLocation 00110 { 00111 VirtualCellLocation vcell_loc; 00112 int phys_row_offset; 00113 int phys_col_offset; 00114 }; 00115 00116 00117 gboolean virt_loc_equal (VirtualLocation vl1, VirtualLocation vl2); 00118 00119 #endif 00120
1.7.4