|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * table-control.h -- table control object * 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 #ifndef TABLE_CONTROL_H 00024 #define TABLE_CONTROL_H 00025 00026 #include "register-common.h" 00027 00028 typedef enum 00029 { 00030 GNC_TABLE_TRAVERSE_POINTER, 00031 GNC_TABLE_TRAVERSE_LEFT, 00032 GNC_TABLE_TRAVERSE_RIGHT, 00033 GNC_TABLE_TRAVERSE_UP, 00034 GNC_TABLE_TRAVERSE_DOWN 00035 } gncTableTraversalDir; 00036 00037 typedef void (*TableMoveFunc) (VirtualLocation *new_virt_loc, 00038 gpointer user_data); 00039 00040 typedef gboolean (*TableTraverseFunc) (VirtualLocation *new_virt_loc, 00041 gncTableTraversalDir dir, 00042 gpointer user_data); 00043 00044 typedef struct table_control 00045 { 00046 /* called when the cursor is moved */ 00047 TableMoveFunc move_cursor; 00048 00049 gboolean allow_move; 00050 00051 /* called to determine traversal when user requests a move */ 00052 TableTraverseFunc traverse; 00053 00054 gpointer user_data; 00055 } TableControl; 00056 00057 00058 TableControl * gnc_table_control_new (void); 00059 void gnc_table_control_destroy (TableControl *control); 00060 00061 void gnc_table_control_allow_move (TableControl *control, 00062 gboolean allow_move); 00063 00064 #endif
1.7.4