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 FLOATBOX_H_INCLUDED
23 #define FLOATBOX_H_INCLUDED
24 
25 #define FLOATBOX(obj) GTK_CHECK_CAST (obj, floatbox_get_type(), Floatbox)
26 #define FLOATBOX_CLASS(class) GTK_CHECK_CLASS_CAST(class,floatbox_get_type(),FloatboxClass)
27 #define IS_FLOATBOX(obj) GTK_CHECK_TYPE (obj,floatbox_get_type())
28 
29 typedef struct _Floatbox Floatbox;
30 typedef struct _FloatboxClass FloatboxClass;
31 
32 struct _Floatbox {
33      GtkEntry parent;
34      float val;
35      GtkAdjustment *adj;
36 };
37 
38 struct _FloatboxClass {
39 	GtkEntryClass parent;
40 	void (*numchange)(Floatbox *, float);
41 	};
42 
43 GtkType floatbox_get_type(void);
44 GtkWidget *floatbox_new(float value);
45 GtkWidget *floatbox_create_scale(Floatbox *box, float minval, float maxval);
46 void floatbox_set(Floatbox *box, float value);
47 gboolean floatbox_check(Floatbox *box);
48 gboolean floatbox_check_limit(Floatbox *box, float lowest, float highest,
49 			      gchar *valuename);
50 
51 
52 #endif
53 
54 
55 
56