LMMS
Loading...
Searching...
No Matches
ctl_fader.h
Go to the documentation of this file.
1/* Calf DSP Library
2 * A fader widget
3 *
4 * Copyright (C) 2008-2015 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 _USE_MATH_DEFINES
24#define _USE_MATH_DEFINES
25#endif
26#ifndef __CALF_CTL_FADER
27#define __CALF_CTL_FADER
28
29#include <cairo/cairo.h>
30#include <gtk/gtk.h>
31#include <gtk/gtkrange.h>
32#include <gtk/gtkscale.h>
33//#include <calf/giface.h>
34#include <calf/drawingutils.h>
35#include <calf/gui.h>
36
37G_BEGIN_DECLS
38
40
41#define CALF_TYPE_FADER (calf_fader_get_type())
42#define CALF_FADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_FADER, CalfFader))
43#define CALF_IS_FADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_FADER))
44#define CALF_FADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_FADER, CalfFaderClass))
45#define CALF_IS_FADER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_FADER))
46
48{
49 int x, y, w, h, iw, ih;
53 int s2w, s2h, s2x1, s2y1, s2x2, s2y2;;
54 int sw, sh, sx1, sy1, sx2, sy2, sw2, sh2;
55};
56
58{
59 GtkScale parent;
61 GdkPixbuf *image;
63 bool hover;
64};
65
67{
68 GtkScaleClass parent_class;
69};
70
71extern GtkWidget *calf_fader_new(const int horiz, const int size, const double min, const double max, const double step);
72extern GType calf_fader_get_type();
73extern void calf_fader_set_pixbuf(CalfFader *self, GdkPixbuf *image);
74extern void calf_fader_set_layout(GtkWidget *widget);
75
76G_END_DECLS
77
78#endif
GType calf_fader_get_type()
Definition ctl_fader.cpp:299
void calf_fader_set_layout(GtkWidget *widget)
Definition ctl_fader.cpp:31
void calf_fader_set_pixbuf(CalfFader *self, GdkPixbuf *image)
Definition ctl_fader.cpp:270
GtkWidget * calf_fader_new(const int horiz, const int size, const double min, const double max, const double step)
Definition ctl_fader.cpp:98
#define min(x, y)
Definition os.h:74
#define max(x, y)
Definition os.h:78
Definition ctl_fader.h:67
GtkScaleClass parent_class
Definition ctl_fader.h:68
Definition ctl_fader.h:58
GdkPixbuf * image
Definition ctl_fader.h:61
GtkScale parent
Definition ctl_fader.h:59
int horizontal
Definition ctl_fader.h:60
int size
Definition ctl_fader.h:60
bool hover
Definition ctl_fader.h:63
CalfFaderLayout layout
Definition ctl_fader.h:62
Definition ctl_fader.h:48
int t2x2
Definition ctl_fader.h:51
int s2x2
Definition ctl_fader.h:53
int iw
Definition ctl_fader.h:49
int s2y1
Definition ctl_fader.h:53
int t1w
Definition ctl_fader.h:50
int t1x2
Definition ctl_fader.h:50
int sw
Definition ctl_fader.h:54
int h
Definition ctl_fader.h:49
int sw2
Definition ctl_fader.h:54
int t2x1
Definition ctl_fader.h:51
int t1y2
Definition ctl_fader.h:50
int w
Definition ctl_fader.h:49
int t1x1
Definition ctl_fader.h:50
int s2x1
Definition ctl_fader.h:53
int sh2
Definition ctl_fader.h:54
int t1y1
Definition ctl_fader.h:50
int sx1
Definition ctl_fader.h:54
int s1y1
Definition ctl_fader.h:52
int sx2
Definition ctl_fader.h:54
int s1x1
Definition ctl_fader.h:52
int sy1
Definition ctl_fader.h:54
int y
Definition ctl_fader.h:49
int s1y2
Definition ctl_fader.h:52
int s1x2
Definition ctl_fader.h:52
int s2w
Definition ctl_fader.h:53
int s2y2
Definition ctl_fader.h:53
int s1h
Definition ctl_fader.h:52
int sy2
Definition ctl_fader.h:54
int t2h
Definition ctl_fader.h:51
int x
Definition ctl_fader.h:49
int s2h
Definition ctl_fader.h:53
int t2y2
Definition ctl_fader.h:51
int t2w
Definition ctl_fader.h:51
int t2y1
Definition ctl_fader.h:51
int s1w
Definition ctl_fader.h:52
int ih
Definition ctl_fader.h:49
int sh
Definition ctl_fader.h:54
int t1h
Definition ctl_fader.h:50
ulg size
Definition extract.c:2350