~siretart/gnucash/ubuntu-fullsource

« back to all changes in this revision

Viewing changes to src/register/register-gnome/gnucash-grid.h

  • Committer: Reinhard Tartler
  • Date: 2008-08-03 07:25:46 UTC
  • Revision ID: siretart@tauware.de-20080803072546-y6p8xda8zpfi62ys
import gnucash_2.2.4.orig.tar.gz

The original tarball had the md5sum: 27e660297dc5b8ce574515779d05a5a5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_GRID_H
 
22
#define GNUCASH_GRID_H
 
23
 
 
24
#include <gnome.h>
 
25
 
 
26
#include "table-allgui.h"
 
27
#include "gnucash-sheet.h"
 
28
 
 
29
 
 
30
#define GNUCASH_TYPE_GRID     (gnucash_grid_get_type ())
 
31
#define GNUCASH_GRID(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), GNUCASH_TYPE_GRID, GnucashGrid))
 
32
#define GNUCASH_GRID_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_GRID, GnucashGridClass))
 
33
#define GNUCASH_IS_GRID(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNUCASH_TYPE_GRID))
 
34
 
 
35
 
 
36
typedef struct {
 
37
        GnomeCanvasItem canvas_item;
 
38
 
 
39
        GnucashSheet *sheet;
 
40
 
 
41
        /* The first and last displayed block */
 
42
        int        top_block;
 
43
        int        bottom_block;
 
44
 
 
45
        /* Offset from spreadsheet origin in units */
 
46
        long       top_offset;
 
47
        long       left_offset;
 
48
 
 
49
        GdkGC      *grid_gc;    /* Draw grid gc */
 
50
        GdkGC      *fill_gc;    /* Default background fill gc */
 
51
        GdkGC      *gc;         /* Color used for the cell */
 
52
 
 
53
        GdkColor   background;
 
54
        GdkColor   grid_color;
 
55
        GdkColor   default_color;
 
56
} GnucashGrid;
 
57
 
 
58
 
 
59
typedef struct {
 
60
        GnomeCanvasItemClass parent_class;
 
61
} GnucashGridClass;
 
62
 
 
63
 
 
64
GType      gnucash_grid_get_type (void);
 
65
GtkWidget *gnucash_grid_new      (GnucashSheet *sheet);
 
66
 
 
67
gboolean   gnucash_grid_find_loc_by_pixel (GnucashGrid *grid, gint x, gint y,
 
68
                                           VirtualLocation *vcell_loc);
 
69
 
 
70
void       gnucash_draw_hatching (GdkDrawable *drawable, GdkGC *gc,
 
71
                                  int x, int y, int width, int height);
 
72
 
 
73
#endif /* GNUCASH_GRID_H */
 
74
 
 
75
 
 
76
/*
 
77
  Local Variables:
 
78
  c-basic-offset: 8
 
79
  End:
 
80
*/