re-adding .pngs as binary
[dia.git] / app / diaunitspinner.h
blob5ad253538ff4809ab49be0447bcb419d2907bf65
1 /* Dia -- an diagram creation/manipulation program
2 * Copyright (C) 1998, 1999 Alexander Larsson
4 * diaunitspinner.[ch] -- a spin button widget for length measurements.
5 * Copyright (C) 1999 James Henstridge
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #ifndef DIAUNITSPINNER_H
23 #define DIAUNITSPINNER_H
25 #include <gtk/gtk.h>
27 #define DIA_UNIT_SPINNER(obj) GTK_CHECK_CAST(obj, dia_unit_spinner_get_type(), DiaUnitSpinner)
28 #define DIA_UNIT_SPINNER_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, dia_unit_spinner_get_type(), DiaUnitSpinnerClass)
29 #define DIA_IS_UNIT_SPINNER(obj) GTK_CHECK_TYPE(obj, dia_unit_spinner_get_type())
31 typedef struct _DiaUnitSpinner DiaUnitSpinner;
32 typedef struct _DiaUnitSpinnerClass DiaUnitSpinnerClass;
34 typedef enum {
35 DIA_UNIT_FEET,
36 DIA_UNIT_METER,
37 DIA_UNIT_DECIMETER,
38 DIA_UNIT_MILLIMETER,
39 DIA_UNIT_POINT,
40 DIA_UNIT_CENTIMETER,
41 DIA_UNIT_INCH,
42 } DiaUnit;
44 struct _DiaUnitSpinner {
45 GtkSpinButton parent;
47 DiaUnit unit_num;
50 struct _DiaUnitSpinnerClass {
51 GtkSpinButtonClass parent_class;
55 GtkType dia_unit_spinner_get_type (void);
56 GtkWidget *dia_unit_spinner_new (GtkAdjustment *adjustment,
57 guint digits,
58 DiaUnit adj_unit);
59 void dia_unit_spinner_set_value (DiaUnitSpinner *self, gfloat val);
60 gfloat dia_unit_spinner_get_value (DiaUnitSpinner *self);
62 #endif