GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cellblock.h
Go to the documentation of this file.
1 /********************************************************************\
2  * cellblock.h -- group of cells that act as cursor within a table *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License*
15  * along with this program; if not, contact: *
16  * *
17  * Free Software Foundation Voice: +1-617-542-5942 *
18  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19  * Boston, MA 02110-1301, USA [email protected] *
20  * *
21 \********************************************************************/
42 #ifndef XACC_CELL_BLOCK_H
43 #define XACC_CELL_BLOCK_H
44 
45 #include "basiccell.h"
46 
47 #include "gtable.h"
48 
49 typedef struct
50 {
51  short num_rows;
52  short num_cols;
53 
54  short start_col;
55  short stop_col;
56 
57  char *cursor_name;
58 
59  GPtrArray *cells; /* Holds the CellBlockCell table */
60 } CellBlock;
61 
62 
63 CellBlock * gnc_cellblock_new (int rows, int cols, const char *cursor_name);
64 
65 void gnc_cellblock_destroy (CellBlock *cellblock);
66 
67 void gnc_cellblock_set_cell (CellBlock *cellblock,
68  int row, int col,
69  BasicCell *cell);
70 
71 BasicCell * gnc_cellblock_get_cell (CellBlock *cellblock,
72  int row, int col);
73 
90  const char *cell_name,
91  int *row, int *col);
92 
93 /* Return number of changed cells. */
94 int gnc_cellblock_changed (CellBlock *cursor,
95  gboolean include_conditional);
96 
97 void gnc_cellblock_clear_changes (CellBlock *cursor);
98 
99 #endif
100 
BasicCell * gnc_cellblock_get_cell_by_name(CellBlock *cellblock, const char *cell_name, int *row, int *col)
Definition: cellblock.c:124