1 /* Decls for statusview.c ... display image info and mouse posn
2  */
3 
4 /*
5 
6     Copyright (C) 1991-2003 The National Gallery
7 
8     This program is free software; you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation; either version 2 of the License, or
11     (at your option) any later version.
12 
13     This program is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License for more details.
17 
18     You should have received a copy of the GNU General Public License along
19     with this program; if not, write to the Free Software Foundation, Inc.,
20     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 
22  */
23 
24 /*
25 
26     These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
27 
28  */
29 
30 #define TYPE_STATUSVIEW (statusview_get_type())
31 #define STATUSVIEW( obj ) (GTK_CHECK_CAST( (obj), TYPE_STATUSVIEW, Statusview ))
32 #define STATUSVIEW_CLASS( klass ) \
33 	(GTK_CHECK_CLASS_CAST( (klass), TYPE_STATUSVIEW, StatusviewClass ))
34 #define IS_STATUSVIEW( obj ) (GTK_CHECK_TYPE( (obj), TYPE_STATUSVIEW ))
35 #define IS_STATUSVIEW_CLASS( klass ) \
36 	(GTK_CHECK_CLASS_TYPE( (klass), TYPE_STATUSVIEW ))
37 
38 /* A band element display in the status bar.
39  */
40 typedef struct _StatusviewBand {
41 	Statusview *sv;		/* Bar we're in */
42 	int bandno;		/* Band we extract */
43 	GtkWidget *val;		/* Label we write to */
44 } StatusviewBand;
45 
46 struct _Statusview {
47 	GtkFrame parent_class;
48 
49 	Imagemodel *imagemodel;
50 	guint changed_sid;
51 
52 	GtkWidget *top;		/* Top label */
53 	GtkWidget *pos;		/* Position */
54 	GtkWidget *hb;		/* Band element hbox */
55 	GtkWidget *mag;		/* Magnification display */
56 	GSList *bands;		/* List of StatusviewBand */
57 	int nb;			/* Last number of bands we saw */
58 	int fmt;		/* The last bandfmt we set ... for spacing */
59 };
60 
61 typedef struct _StatusviewClass {
62 	GtkFrameClass parent_class;
63 
64 	/* My methods.
65 	 */
66 } StatusviewClass;
67 
68 GtkType statusview_get_type( void );
69 Statusview *statusview_new( Imagemodel *imagemodel );
70 
71 void statusview_mouse( Statusview *sv, int x, int y );
72