GnuCash 2.4.99
table-layout.h
00001 /********************************************************************\
00002  * table-layout.h -- 2D table layout                                *
00003  * Copyright (c) 2001 Free Software Foundation                      *
00004  * Author: Dave Peticolas <dave@krondo.com>                         *
00005  *                                                                  *
00006  * This program is free software; you can redistribute it and/or    *
00007  * modify it under the terms of the GNU General Public License as   *
00008  * published by the Free Software Foundation; either version 2 of   *
00009  * the License, or (at your option) any later version.              *
00010  *                                                                  *
00011  * This program is distributed in the hope that it will be useful,  *
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00014  * GNU General Public License for more details.                     *
00015  *                                                                  *
00016  * You should have received a copy of the GNU General Public License*
00017  * along with this program; if not, contact:                        *
00018  *                                                                  *
00019  * Free Software Foundation           Voice:  +1-617-542-5942       *
00020  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00021  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00022  *                                                                  *
00023 \********************************************************************/
00024 
00025 #ifndef TABLE_LAYOUT_H
00026 #define TABLE_LAYOUT_H
00027 
00028 #include "basiccell.h"
00029 #include "cellblock.h"
00030 
00031 
00033 #define CURSOR_HEADER "cursor-header"
00034 
00035 
00037 typedef struct table_layout_struct TableLayout;
00038 typedef struct cursor_buffer_struct CursorBuffer;
00039 
00040 
00042 TableLayout * gnc_table_layout_new (void);
00043 void gnc_table_layout_destroy (TableLayout *layout);
00044 
00045 void gnc_table_layout_add_cell (TableLayout *layout, BasicCell *cell);
00046 
00047 BasicCell * gnc_table_layout_get_cell (TableLayout *layout,
00048                                        const char *cell_name);
00049 const char * gnc_table_layout_get_cell_value (TableLayout *layout,
00050         const char *cell_name);
00051 gboolean gnc_table_layout_get_cell_changed (TableLayout *layout,
00052         const char *cell_name,
00053         gboolean include_conditional);
00054 
00055 GList * gnc_table_layout_get_cells (TableLayout *layout);
00056 
00057 void gnc_table_layout_add_cursor (TableLayout *layout,
00058                                   CellBlock *cursor);
00059 
00060 CellBlock * gnc_table_layout_get_cursor (TableLayout *layout,
00061         const char *cursor_name);
00062 
00063 GList * gnc_table_layout_get_cursors (TableLayout *layout);
00064 
00065 void gnc_table_layout_set_primary_cursor (TableLayout *layout,
00066         CellBlock *cursor);
00067 
00068 void gnc_table_layout_set_cell (TableLayout *layout,
00069                                 CellBlock *cursor,
00070                                 const char *cell_name,
00071                                 int row, int col);
00072 
00073 CursorBuffer * gnc_cursor_buffer_new (void);
00074 void gnc_cursor_buffer_destroy (CursorBuffer *buffer);
00075 
00076 void gnc_table_layout_save_cursor (TableLayout *layout,
00077                                    CellBlock *cursor,
00078                                    CursorBuffer *buffer);
00079 void gnc_table_layout_restore_cursor (TableLayout *layout,
00080                                       CellBlock *cursor,
00081                                       CursorBuffer *buffer);
00082 
00083 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines