1 /*  SpiralSynth
2  *  Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18 
19 #include <FL/Fl.H>
20 #include <FL/Fl_Window.H>
21 #include <FL/Fl_Group.H>
22 #include <FL/Fl_Check_Button.H>
23 #include "Widgets/Fl_Knob.H"
24 
25 #include "GUIBase.h"
26 #include "../SpiralSound/Sequencer.h"
27 
28 #ifndef SEQGUI
29 #define SEQGUI
30 
31 class SequencerGUI : public GUIBase
32 {
33 public:
34 	SequencerGUI(Sequencer *o);
35 
36 	virtual void CreateGUI(int xoff, int yoff, char *name);
37 
38 	Sequencer *m_seq;
39 
40 private:
41 
42 	Fl_Group 		*GUISeqGroup;
43 	Fl_Button 		*Event[16][12];
44 	int 			 EventTable[16][12];
45 	bool 			 EventList[191];
46 
47 	Fl_Knob 		*Speed;
48 	Fl_Knob 		*Octave;
49 	Fl_Knob 		*Length;
50 	Fl_Knob 		*ArpNotes;
51 	Fl_Button 		*Arp;
52 	Fl_Button 		*Play;
53 	Fl_Button 		*Stop;
54 	Fl_Button 		*ArpType;
55 
56 	//// Callbacks ////
57 
58 	inline void cb_Event_i(Fl_Button* o, void *v);
59 	static void cb_Event  (Fl_Button* o, void *v);
60 	inline void cb_Play_i(Fl_Button* o, void* v);
61 	static void cb_Play(Fl_Button* o, void* v);
62 	inline void cb_Speed_i(Fl_Knob* o, void* v);
63 	static void cb_Speed(Fl_Knob* o, void* v);
64 	inline void cb_Octave_i(Fl_Knob* o, void* v);
65 	static void cb_Octave(Fl_Knob* o, void* v);
66 	inline void cb_Length_i(Fl_Knob* o, void* v);
67 	static void cb_Length(Fl_Knob* o, void* v);
68 	inline void cb_Arp_i(Fl_Button* o, void* v);
69 	static void cb_Arp(Fl_Button* o, void* v);
70 	inline void cb_ArpType_i(Fl_Button* o, void* v);
71 	static void cb_ArpType(Fl_Button* o, void* v);
72 	inline void cb_ArpNotes_i(Fl_Knob* o, void* v);
73 	static void cb_ArpNotes(Fl_Knob* o, void* v);
74 };
75 
76 #endif
77