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 // Stereo module 20 21 #include <FL/Fl.H> 22 #include <FL/Fl_Window.H> 23 #include <FL/Fl_Group.H> 24 #include <FL/Fl_Button.H> 25 26 #include "GUIBase.h" 27 28 #ifndef SCOPEGUI 29 #define SCOPEGUI 30 31 class ScopeWidget : public Fl_Widget 32 { 33 public: 34 ScopeWidget(int x,int y,int w,int h,const char *l=0); 35 36 void draw(); SetNumChannels(int s)37 void SetNumChannels(int s) {m_Channels=s;} 38 39 const short *m_Data; 40 int m_Channels; 41 private: 42 43 }; 44 45 46 47 class ScopeGUI : public GUIBase 48 { 49 public: 50 ScopeGUI(); 51 52 virtual void CreateGUI(int xoff=0, int yoff=0, char *name=""); 53 void Display(const short *data); SetNumChannels(int s)54 void SetNumChannels(int s) {m_Scope->SetNumChannels(s);} 55 56 private: 57 58 bool m_Bypass; 59 60 Fl_Group *GUIScopeGroup; 61 Fl_Button *Bypass; 62 ScopeWidget *m_Scope; 63 64 inline void cb_Bypass_i(Fl_Button* o, void* v); 65 static void cb_Bypass(Fl_Button* o, void* v); 66 67 }; 68 69 #endif 70