New rack rack-ears
[calf.git] / src / calf / ctl_knob.h
blob1cfcb61ae391f75f070ef458d6a0e0508f340b03
1 /* Calf DSP Library
2 * A knob (dial) widget.
4 * Copyright (C) 2008-2010 Krzysztof Foltman, Torben Hohn, Markus
5 * Schmidt and others
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (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 GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this program; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02111-1307, USA.
23 #ifndef CALF_CTL_KNOB_H
24 #define CALF_CTL_KNOB_H
26 #include <gtk/gtk.h>
27 #include <vector>
29 G_BEGIN_DECLS
31 #define CALF_TYPE_KNOB (calf_knob_get_type())
32 #define CALF_KNOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_KNOB, CalfKnob))
33 #define CALF_IS_KNOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_KNOB))
34 #define CALF_KNOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_KNOB, CalfKnobClass))
35 #define CALF_IS_KNOB_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_KNOB))
37 struct CalfKnob
39 GtkRange parent;
40 int type;
41 int size;
42 double start_x, start_y, last_y, start_value, default_value;
43 std::vector<double> ticks;
46 struct CalfKnobClass
48 GtkRangeClass parent_class;
49 GdkPixbuf *knob_image[5];
52 extern GtkWidget *calf_knob_new();
53 extern GtkWidget *calf_knob_new_with_adjustment(GtkAdjustment *_adjustment);
55 extern GType calf_knob_get_type();
57 G_END_DECLS
59 #endif