LMMS
Loading...
Searching...
No Matches
ctl_pattern.h
Go to the documentation of this file.
1/* Calf DSP Library
2 * A few useful widgets - a line graph, a knob, a tube - Panama!
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 _USE_MATH_DEFINES
24#define _USE_MATH_DEFINES
25#endif
26#ifndef __CALF_CTL_PATTERN
27#define __CALF_CTL_PATTERN
28
29#include <gtk/gtk.h>
30#include <calf/gui.h>
31
32G_BEGIN_DECLS
33
34#define CALF_TYPE_PATTERN (calf_pattern_get_type())
35#define CALF_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALF_TYPE_PATTERN, CalfPattern))
36#define CALF_IS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALF_TYPE_PATTERN))
37#define CALF_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALF_TYPE_PATTERN, CalfPatternClass))
38#define CALF_IS_PATTERN_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALF_TYPE_PATTERN))
39#define CALF_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALF_TYPE_PATTERN, CalfPatternClass))
40
46{
47 GtkEventBox parent;
49 const static int border = 2;
50 const static int minner = 1;
51 const static int mbars = 4;
52 float pad_x, pad_y;
53 float size_x, size_y;
56 int beats, bars;
59 double values[8][8], startval;
60 cairo_surface_t *background_surface;
62 GdkCursor *hand_cursor;
63};
64
66{
67 GtkEventBoxClass parent_class;
68};
69
70extern GtkWidget *calf_pattern_new();
71
72extern GType calf_pattern_get_type();
73extern void calf_pattern_draw_handle (GtkWidget *wi, cairo_t *cr, int bar, int beat, int x, int y, double value, float alpha, bool outline = false);
74
75extern void calf_pattern_expose_request (GtkWidget *widget, bool force = false);
76
77G_END_DECLS
78
79#endif
void calf_pattern_draw_handle(GtkWidget *wi, cairo_t *cr, int bar, int beat, int x, int y, double value, float alpha, bool outline=false)
Definition ctl_pattern.cpp:124
void calf_pattern_expose_request(GtkWidget *widget, bool force=false)
GtkWidget * calf_pattern_new()
Definition ctl_pattern.cpp:479
GType calf_pattern_get_type()
Definition ctl_pattern.cpp:485
int y
Definition inflate.c:1588
unsigned x[BMAX+1]
Definition inflate.c:1586
static PuglViewHint int value
Definition pugl.h:1708
Definition ctl_pattern.h:66
GtkEventBoxClass parent_class
Definition ctl_pattern.h:67
Definition ctl_pattern.h:46
float mouse_y
Definition ctl_pattern.h:54
static const int border
Definition ctl_pattern.h:49
float border_h
Definition ctl_pattern.h:55
int bars
Definition ctl_pattern.h:56
float width
Definition ctl_pattern.h:55
GdkCursor * hand_cursor
Cached hand (drag) cursor.
Definition ctl_pattern.h:62
double startval
Definition ctl_pattern.h:59
float pad_x
Definition ctl_pattern.h:52
float beat_height
Definition ctl_pattern.h:55
double values[8][8]
Definition ctl_pattern.h:59
static const int minner
Definition ctl_pattern.h:50
float size_x
Definition ctl_pattern.h:53
float beat_width
Definition ctl_pattern.h:55
cairo_surface_t * background_surface
Definition ctl_pattern.h:60
calf_pattern_handle handle_hovered
Definition ctl_pattern.h:58
float border_v
Definition ctl_pattern.h:55
static const int mbars
Definition ctl_pattern.h:51
float size_y
Definition ctl_pattern.h:53
float bar_width
Definition ctl_pattern.h:55
calf_pattern_handle handle_grabbed
Definition ctl_pattern.h:57
GtkEventBox parent
Definition ctl_pattern.h:47
float pad_y
Definition ctl_pattern.h:52
float mouse_x
Definition ctl_pattern.h:54
float x
Definition ctl_pattern.h:55
bool force_redraw
Definition ctl_pattern.h:48
bool dblclick
Definition ctl_pattern.h:48
float y
Definition ctl_pattern.h:55
int beats
Definition ctl_pattern.h:56
float height
Definition ctl_pattern.h:55
Definition ctl_pattern.h:41
int bar
Definition ctl_pattern.h:42
int beat
Definition ctl_pattern.h:43