|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * cellblock.h -- group of cells that act as cursor within a table * 00003 * * 00004 * This program is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU General Public License as * 00006 * published by the Free Software Foundation; either version 2 of * 00007 * the License, or (at your option) any later version. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License* 00015 * along with this program; if not, contact: * 00016 * * 00017 * Free Software Foundation Voice: +1-617-542-5942 * 00018 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00019 * Boston, MA 02110-1301, USA gnu@gnu.org * 00020 * * 00021 \********************************************************************/ 00042 #ifndef XACC_CELL_BLOCK_H 00043 #define XACC_CELL_BLOCK_H 00044 00045 #include "basiccell.h" 00046 00047 #include "gtable.h" 00048 00049 typedef struct 00050 { 00051 short num_rows; 00052 short num_cols; 00053 00054 short start_col; 00055 short stop_col; 00056 00057 char *cursor_name; 00058 00059 GPtrArray *cells; /* Holds the CellBlockCell table */ 00060 } CellBlock; 00061 00062 00063 CellBlock * gnc_cellblock_new (int rows, int cols, const char *cursor_name); 00064 00065 void gnc_cellblock_destroy (CellBlock *cellblock); 00066 00067 void gnc_cellblock_set_cell (CellBlock *cellblock, 00068 int row, int col, 00069 BasicCell *cell); 00070 00071 BasicCell * gnc_cellblock_get_cell (CellBlock *cellblock, 00072 int row, int col); 00073 00089 BasicCell * gnc_cellblock_get_cell_by_name(CellBlock *cellblock, 00090 const char *cell_name, 00091 int *row, int *col); 00092 00093 /* Return number of changed cells. */ 00094 int gnc_cellblock_changed (CellBlock *cursor, 00095 gboolean include_conditional); 00096 00097 void gnc_cellblock_clear_changes (CellBlock *cursor); 00098 00099 #endif 00100
1.7.4