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 \********************************************************************/ 00022 00023 /* 00024 * FILE: 00025 * cellblock.h 00026 * 00027 * FUNCTION: 00028 * The CellBlock struct is a rectangular grid of cells that 00029 * define an arrangement of cells. It is typically used to 00030 * define a virtual cursor within a larger table of cells. 00031 * 00032 * HISTORY: 00033 * Copyright (c) 1988 Linas Vepstas 00034 * Copyright (c) 2000-2001 Dave Peticolas <dave@krondo.com> 00035 */ 00036 00037 #ifndef XACC_CELL_BLOCK_H 00038 #define XACC_CELL_BLOCK_H 00039 00040 #include "basiccell.h" 00041 00042 #include "gtable.h" 00043 00044 typedef struct 00045 { 00046 short num_rows; 00047 short num_cols; 00048 00049 short start_col; 00050 short stop_col; 00051 00052 char *cursor_name; 00053 00054 GPtrArray *cells; /* Holds the CellBlockCell table */ 00055 } CellBlock; 00056 00057 00058 CellBlock * gnc_cellblock_new (int rows, int cols, const char *cursor_name); 00059 00060 void gnc_cellblock_destroy (CellBlock *cellblock); 00061 00062 void gnc_cellblock_set_cell (CellBlock *cellblock, 00063 int row, int col, 00064 BasicCell *cell); 00065 00066 BasicCell * gnc_cellblock_get_cell (CellBlock *cellblock, 00067 int row, int col); 00068 00069 /* Return number of changed cells. */ 00070 int gnc_cellblock_changed (CellBlock *cursor, 00071 gboolean include_conditional); 00072 00073 void gnc_cellblock_clear_changes (CellBlock *cursor); 00074 00075 #endif
1.5.2