LMMS
Loading...
Searching...
No Matches
ctl_knob.h
Go to the documentation of this file.
1/* Calf DSP Library
2 * A knob (dial) widget.
3 *
4 * Copyright (C) 2008-2010 Krzysztof Foltman, Torben Hohn, Markus
5 * Schmidt and others
6 *
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.
11 *
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.
16 *
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.
21 */
22
23#ifndef CALF_CTL_KNOB_H
24#define CALF_CTL_KNOB_H
25
26#include <gtk/gtk.h>
27#include <vector>
28#include <calf/gui.h>
29
30G_BEGIN_DECLS
31
32#define CALF_TYPE_KNOB (calf_knob_get_type())
33#define CALF_KNOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_KNOB, CalfKnob))
34#define CALF_IS_KNOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_KNOB))
35#define CALF_KNOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_KNOB, CalfKnobClass))
36#define CALF_IS_KNOB_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_KNOB))
37
39{
40 static const unsigned int debug = 0;
41 GtkRange parent;
42 int type;
43 int size;
45 std::vector<double> ticks;
46 GdkPixbuf *knob_image;
47};
48
50{
51 GtkRangeClass parent_class;
52};
53
54extern GtkWidget *calf_knob_new();
55extern GtkWidget *calf_knob_new_with_adjustment(GtkAdjustment *_adjustment);
56extern void calf_knob_set_size (CalfKnob*self, int size);
57extern void calf_knob_set_pixbuf (CalfKnob*self, GdkPixbuf *pixbuf);
58
59extern GType calf_knob_get_type();
60
61G_END_DECLS
62
63#endif
void calf_knob_set_pixbuf(CalfKnob *self, GdkPixbuf *pixbuf)
Definition ctl_knob.cpp:309
GtkWidget * calf_knob_new()
Definition ctl_knob.cpp:557
void calf_knob_set_size(CalfKnob *self, int size)
Definition ctl_knob.cpp:298
GType calf_knob_get_type()
Definition ctl_knob.cpp:581
GtkWidget * calf_knob_new_with_adjustment(GtkAdjustment *_adjustment)
Definition ctl_knob.cpp:570
Definition ctl_knob.h:50
GtkRangeClass parent_class
Definition ctl_knob.h:51
Definition ctl_knob.h:39
int type
Definition ctl_knob.h:42
double last_y
Definition ctl_knob.h:44
std::vector< double > ticks
Definition ctl_knob.h:45
double start_x
Definition ctl_knob.h:44
double start_value
Definition ctl_knob.h:44
static const unsigned int debug
Definition ctl_knob.h:40
double default_value
Definition ctl_knob.h:44
int size
Definition ctl_knob.h:43
double start_y
Definition ctl_knob.h:44
GdkPixbuf * knob_image
Definition ctl_knob.h:46
GtkRange parent
Definition ctl_knob.h:41
ulg size
Definition extract.c:2350