Fixed bug that crashed on saving after importing.
[epichord.git] / src / trackmodule.h
bloba8d3c9ff3c6d8ae624f891458411d13d242c56bb
1 /*
2 Epichord - a midi sequencer
3 Copyright (C) 2008 Evan Rinehart
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to
18 The Free Software Foundation, Inc.
19 51 Franklin Street, Fifth Floor
20 Boston, MA 02110-1301, USA
23 #ifndef trackmodule_h
24 #define trackmodule_h
27 #include <fltk/Input.h>
28 #include <fltk/Button.h>
29 #include <fltk/ValueInput.h>
30 #include <fltk/events.h>
32 class Gauge : public fltk::Widget {
34 public:
36 Gauge(int x, int y, int w, int h, const char* label=0);
38 int value;
39 int last_value;
40 int max;
41 int step;
42 int scale;
43 int r,g,b;
44 int R,G,B;
46 int sens;
48 int label_temp;
50 int label_flag;
51 int label_always;
52 int label_plusone;
53 int label_hex;
54 int gauge_off;
57 class VGauge : public Gauge {
59 public:
61 VGauge(int x, int y, int w, int h, const char* label=0);
63 int handle(int e);
64 void draw();
68 class HGauge : public Gauge {
70 public:
72 HGauge(int x, int y, int w, int h, const char* label=0);
74 int handle(int e);
75 void draw();
79 class Toggle : public fltk::Button {
80 public:
82 int key_flag;
84 char c[4];
85 int r;
86 int g;
87 int b;
88 int R;
89 int G;
90 int B;
92 int state;
94 void set(int s);
96 Toggle(int x, int y, int w, int h, const char* label=0);
98 int handle(int e);
99 void draw();
103 class TrackModule : public fltk::Group {
105 int settings_shown;
107 public:
109 int index;
110 VGauge volume;
111 HGauge pan;
112 Toggle solo;
113 Toggle mute;
114 fltk::Input name;
115 VGauge chan;
116 VGauge prog;
117 VGauge port;
118 VGauge bank;
119 Toggle rec;
121 void toggle();
123 TrackModule(int x, int y, int w, int h, int i, const char* label=0);
124 int handle(int event);
126 void set_channel(int i);
127 void unset_rec();
128 void set_rec();
129 void unset_solo();
131 void update();
135 #endif