GnuCash  5.6-150-g038405b370+
gnucash-cursor.h
Go to the documentation of this file.
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or *
3  * modify it under the terms of the GNU General Public License as *
4  * published by the Free Software Foundation; either version 2 of *
5  * the License, or (at your option) any later version. *
6  * *
7  * This program is distributed in the hope that it will be useful, *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10  * GNU General Public License for more details. *
11  * *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact: *
14  * *
15  * Free Software Foundation Voice: +1-617-542-5942 *
16  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17  * Boston, MA 02110-1301, USA gnu@gnu.org *
18  * *
19 \********************************************************************/
20 
21 #ifndef GNUCASH_CURSOR_H
22 #define GNUCASH_CURSOR_H
23 
24 #include <glib.h>
25 #include "gnucash-sheet.h"
26 
34 #define GNUCASH_TYPE_CURSOR (gnucash_cursor_get_type ())
35 #define GNUCASH_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNUCASH_TYPE_CURSOR, GnucashCursor))
36 #define GNUCASH_CURSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_CURSOR, GnucashCursorClass))
37 #define GNUCASH_IS_CURSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNUCASH_TYPE_CURSOR))
38 
39 GType gnucash_cursor_get_type (void);
40 
41 
42 enum
43 {
44  GNUCASH_CURSOR_CELL,
45  GNUCASH_CURSOR_BLOCK,
46  GNUCASH_CURSOR_NUM
47 };
48 
49 
50 typedef struct
51 {
52  gint row;
53  gint col;
54 
55  /* precomputed pixel coords for the item cursor*/
56  gint x, y, w, h;
58 
59 
60 typedef struct
61 {
62  GObject obj;
63 
64  GnucashCursorCell cell;
65  GnucashSheet *sheet;
66 
67  gint row;
68  gint col;
69  /* precomputed pixel coords for the block cursor*/
70  gint x, y, w, h;
71 
72  SheetBlockStyle *style;
74 
75 typedef struct
76 {
77  GObjectClass parent_class;
79 
80 
81 GnucashCursor *gnucash_cursor_new (GnucashSheet *sheet);
82 
83 void gnucash_cursor_get_virt (GnucashCursor *cursor,
84  VirtualLocation *virt_loc);
85 
86 void gnucash_cursor_set (GnucashCursor *cursor, VirtualLocation virt_loc);
87 
88 void gnucash_cursor_set_style (GnucashCursor *cursor, SheetBlockStyle *style);
89 
90 void gnucash_cursor_configure (GnucashCursor *cursor);
91 
93 #endif /* GNUCASH_CURSOR_H */
Public declarations of GnucashRegister class.