LMMS
Loading...
Searching...
No Matches
ctl_buttons.h
Go to the documentation of this file.
1/* Calf DSP Library
2 * A few useful button widgets
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_BUTTONS
27#define __CALF_CTL_BUTTONS
28
29#include <cairo/cairo.h>
30#include <gtk/gtk.h>
31#include <gtk/gtkbutton.h>
32#include <calf/drawingutils.h>
33#include <calf/gui.h>
34#include <gdk/gdk.h>
35#include <gdk/gdkkeysyms.h>
36
37G_BEGIN_DECLS
38
39
41
42
43#define CALF_TYPE_BUTTON (calf_button_get_type())
44#define CALF_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_BUTTON, CalfButton))
45#define CALF_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_BUTTON))
46#define CALF_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_BUTTON, CalfButtonClass))
47#define CALF_IS_BUTTON_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_BUTTON))
48
50{
51 GtkButton parent;
52};
53
55{
56 GtkButtonClass parent_class;
57};
58
59extern GtkWidget *calf_button_new(const gchar *label);
60extern GType calf_button_get_type();
61
62
64
65
66#define CALF_TYPE_TOGGLE_BUTTON (calf_toggle_button_get_type())
67#define CALF_TOGGLE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_TOGGLE_BUTTON, CalfToggleButton))
68#define CALF_IS_TOGGLE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_TOGGLE_BUTTON))
69#define CALF_TOGGLE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_TOGGLE_BUTTON, CalfToggleButtonClass))
70#define CALF_IS_TOGGLE_BUTTON_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_TOGGLE_BUTTON))
71
73{
74 GtkToggleButton parent;
75};
76
78{
79 GtkToggleButtonClass parent_class;
80};
81
82extern GtkWidget *calf_toggle_button_new(const gchar *label);
83extern GType calf_toggle_button_get_type();
84
85
87
88
89#define CALF_TYPE_RADIO_BUTTON (calf_radio_button_get_type())
90#define CALF_RADIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_RADIO_BUTTON, CalfRadioButton))
91#define CALF_IS_RADIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_RADIO_BUTTON))
92#define CALF_RADIO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_RADIO_BUTTON, CalfRadioButtonClass))
93#define CALF_IS_RADIO_BUTTON_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_RADIO_BUTTON))
94
96{
97 GtkRadioButton parent;
98};
99
101{
102 GtkRadioButtonClass parent_class;
103};
104
105extern GtkWidget *calf_radio_button_new(const gchar *label);
106extern GType calf_radio_button_get_type();
107
108
110
111
112#define CALF_TYPE_TOGGLE (calf_toggle_get_type())
113#define CALF_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_TOGGLE, CalfToggle))
114#define CALF_IS_TOGGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_TOGGLE))
115#define CALF_TOGGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_TOGGLE, CalfToggleClass))
116#define CALF_IS_TOGGLE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_TOGGLE))
117
119{
120 GtkRange parent;
121 int size;
122 int width;
124 GdkPixbuf *toggle_image;
125};
126
128{
129 GtkRangeClass parent_class;
130};
131
132extern GtkWidget *calf_toggle_new();
133extern GtkWidget *calf_toggle_new_with_adjustment(GtkAdjustment *_adjustment);
134extern void calf_toggle_set_size(CalfToggle *self, int size);
135extern void calf_toggle_set_pixbuf(CalfToggle *self, GdkPixbuf *pixbuf);
136extern GType calf_toggle_get_type();
137
138
140
141
142#define CALF_TYPE_TAP_BUTTON (calf_tap_button_get_type())
143#define CALF_TAP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_TAP_BUTTON, CalfTapButton))
144#define CALF_IS_TAP_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_TAP_BUTTON))
145#define CALF_TAP_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_TAP_BUTTON, CalfTapButtonClass))
146#define CALF_IS_TAP_BUTTON_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_TAP_BUTTON))
147
149{
150 GtkButton parent;
151 GdkPixbuf *image[3];
152 int state;
153};
154
156{
157 GtkButtonClass parent_class;
158};
159
160extern GtkWidget *calf_tap_button_new();
161extern GType calf_tap_button_get_type();
162extern void calf_tap_button_set_pixbufs (CalfTapButton *self, GdkPixbuf *image1, GdkPixbuf *image2, GdkPixbuf *image3);
163
164G_END_DECLS
165
166#endif
void calf_toggle_set_pixbuf(CalfToggle *self, GdkPixbuf *pixbuf)
Definition ctl_buttons.cpp:121
GtkWidget * calf_tap_button_new()
Definition ctl_buttons.cpp:515
GtkWidget * calf_toggle_button_new(const gchar *label)
Definition ctl_buttons.cpp:351
GtkWidget * calf_radio_button_new(const gchar *label)
Definition ctl_buttons.cpp:433
GType calf_toggle_get_type()
Definition ctl_buttons.cpp:160
void calf_toggle_set_size(CalfToggle *self, int size)
Definition ctl_buttons.cpp:111
GtkWidget * calf_toggle_new()
Definition ctl_buttons.cpp:129
GType calf_button_get_type()
Definition ctl_buttons.cpp:312
GType calf_tap_button_get_type()
Definition ctl_buttons.cpp:582
void calf_tap_button_set_pixbufs(CalfTapButton *self, GdkPixbuf *image1, GdkPixbuf *image2, GdkPixbuf *image3)
Definition ctl_buttons.cpp:549
GType calf_toggle_button_get_type()
Definition ctl_buttons.cpp:395
GType calf_radio_button_get_type()
Definition ctl_buttons.cpp:477
GtkWidget * calf_button_new(const gchar *label)
Definition ctl_buttons.cpp:200
GtkWidget * calf_toggle_new_with_adjustment(GtkAdjustment *_adjustment)
Definition ctl_buttons.cpp:149
Definition ctl_buttons.h:55
GtkButtonClass parent_class
Definition ctl_buttons.h:56
Definition ctl_buttons.h:50
GtkButton parent
Definition ctl_buttons.h:51
Definition ctl_buttons.h:101
GtkRadioButtonClass parent_class
Definition ctl_buttons.h:102
Definition ctl_buttons.h:96
GtkRadioButton parent
Definition ctl_buttons.h:97
Definition ctl_buttons.h:156
GtkButtonClass parent_class
Definition ctl_buttons.h:157
Definition ctl_buttons.h:149
GtkButton parent
Definition ctl_buttons.h:150
int state
Definition ctl_buttons.h:152
GdkPixbuf * image[3]
Definition ctl_buttons.h:151
Definition ctl_buttons.h:78
GtkToggleButtonClass parent_class
Definition ctl_buttons.h:79
Definition ctl_buttons.h:73
GtkToggleButton parent
Definition ctl_buttons.h:74
Definition ctl_buttons.h:128
GtkRangeClass parent_class
Definition ctl_buttons.h:129
Definition ctl_buttons.h:119
GtkRange parent
Definition ctl_buttons.h:120
int height
Definition ctl_buttons.h:123
int width
Definition ctl_buttons.h:122
GdkPixbuf * toggle_image
Definition ctl_buttons.h:124
int size
Definition ctl_buttons.h:121
ulg size
Definition extract.c:2350