GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
table-layout.h
1 /********************************************************************\
2  * table-layout.h -- 2D table layout *
3  * Copyright (c) 2001 Free Software Foundation *
4  * Author: Dave Peticolas <[email protected]> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA [email protected] *
22  * *
23 \********************************************************************/
24 
25 #ifndef TABLE_LAYOUT_H
26 #define TABLE_LAYOUT_H
27 
28 #include "basiccell.h"
29 #include "cellblock.h"
30 
31 
33 #define CURSOR_HEADER "cursor-header"
34 
35 
37 typedef struct table_layout_struct TableLayout;
38 typedef struct cursor_buffer_struct CursorBuffer;
39 
40 
42 TableLayout * gnc_table_layout_new (void);
43 void gnc_table_layout_destroy (TableLayout *layout);
44 
45 void gnc_table_layout_add_cell (TableLayout *layout, BasicCell *cell);
46 
47 BasicCell * gnc_table_layout_get_cell (TableLayout *layout,
48  const char *cell_name);
49 const char * gnc_table_layout_get_cell_value (TableLayout *layout,
50  const char *cell_name);
51 gboolean gnc_table_layout_get_cell_changed (TableLayout *layout,
52  const char *cell_name,
53  gboolean include_conditional);
54 
55 GList * gnc_table_layout_get_cells (TableLayout *layout);
56 
57 void gnc_table_layout_add_cursor (TableLayout *layout,
58  CellBlock *cursor);
59 
60 CellBlock * gnc_table_layout_get_cursor (TableLayout *layout,
61  const char *cursor_name);
62 
63 GList * gnc_table_layout_get_cursors (TableLayout *layout);
64 
65 void gnc_table_layout_set_primary_cursor (TableLayout *layout,
66  CellBlock *cursor);
67 
68 void gnc_table_layout_set_cell (TableLayout *layout,
69  CellBlock *cursor,
70  const char *cell_name,
71  int row, int col);
72 
73 CursorBuffer * gnc_cursor_buffer_new (void);
74 void gnc_cursor_buffer_destroy (CursorBuffer *buffer);
75 
76 void gnc_table_layout_save_cursor (TableLayout *layout,
77  CellBlock *cursor,
78  CursorBuffer *buffer);
79 void gnc_table_layout_restore_cursor (TableLayout *layout,
80  CellBlock *cursor,
81  CursorBuffer *buffer);
82 
83 #endif
Declarations for the CellBlock object.