1 /*
2  * Copyright (C) 2002 2003 2005, Magnus Hjorth
3  *
4  * This file is part of mhWaveEdit.
5  *
6  * mhWaveEdit is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * mhWaveEdit is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mhWaveEdit; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 
22 #ifndef INTBOX_H_INCLUDED
23 #define INTBOX_H_INCLUDED
24 
25 #define INTBOX(obj) GTK_CHECK_CAST (obj, intbox_get_type(), Intbox)
26 #define INTBOX_CLASS(class) GTK_CHECK_CLASS_CAST(class,intbox_get_type(),IntboxClass)
27 #define IS_INTBOX(obj) GTK_CHECK_TYPE (obj,intbox_get_type())
28 
29 typedef struct _Intbox Intbox;
30 typedef struct _IntboxClass IntboxClass;
31 
32 struct _Intbox {
33      GtkEntry parent;
34      long int val;
35      GtkAdjustment *adj;
36 };
37 
38 struct _IntboxClass {
39 	GtkEntryClass parent;
40 	void (*numchange)(Intbox *, long int);
41 	};
42 
43 GtkType intbox_get_type(void);
44 GtkWidget *intbox_new(long value);
45 void intbox_set(Intbox *box, long value);
46 
47 /* TRUE = Contains invalid value */
48 gboolean intbox_check(Intbox *box);
49 gboolean intbox_check_limit(Intbox *box, long int lowest, long int highest,
50 			    gchar *valuename);
51 GtkWidget *intbox_create_scale(Intbox *box, long minval, long maxval);
52 
53 
54 #endif
55 
56 
57 
58