GnuCash c935c2f+
Loading...
Searching...
No Matches
table-control.h
Go to the documentation of this file.
1/********************************************************************\
2 * table-control.h -- table control object *
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 gnu@gnu.org *
20 * *
21\********************************************************************/
22
23#ifndef TABLE_CONTROL_H
24#define TABLE_CONTROL_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include "register-common.h"
31
36typedef enum
37{
38 GNC_TABLE_TRAVERSE_POINTER,
39 GNC_TABLE_TRAVERSE_LEFT,
40 GNC_TABLE_TRAVERSE_RIGHT,
41 GNC_TABLE_TRAVERSE_UP,
42 GNC_TABLE_TRAVERSE_DOWN
43} gncTableTraversalDir;
44
45typedef void (*TableMoveFunc) (VirtualLocation *new_virt_loc,
46 gpointer user_data);
47
48typedef gboolean (*TableTraverseFunc) (VirtualLocation *new_virt_loc,
49 gncTableTraversalDir dir,
50 gpointer user_data);
51
52typedef struct table_control
53{
54 /* called when the cursor is moved */
55 TableMoveFunc move_cursor;
56
57 gboolean allow_move;
58
59 /* called to determine traversal when user requests a move */
60 TableTraverseFunc traverse;
61
62 gpointer user_data;
64
65
66TableControl * gnc_table_control_new (void);
67void gnc_table_control_destroy (TableControl *control);
68
69void gnc_table_control_allow_move (TableControl *control,
70 gboolean allow_move);
71
72#ifdef __cplusplus
73}
74#endif
75
77#endif
Common declarations for the register core.