You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.5KB

  1. /* SpiralPlugin
  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. #include <FL/Fl.H>
  19. #include <FL/Fl_Window.H>
  20. #include <FL/Fl_Group.H>
  21. #include <FL/Fl_Scroll.H>
  22. #include <FL/Fl_Slider.H>
  23. #include <FL/Fl_Counter.H>
  24. #include <FL/Fl_Output.H>
  25. #include "SequencerPlugin.h"
  26. #include "../SpiralPluginGUI.h"
  27. #include "../Widgets/Fl_Knob.H"
  28. #include "../Widgets/Fl_EventMap.h"
  29. #ifndef MixerGUI
  30. #define MixerGUI
  31. class SequencerPluginGUI : public SpiralPluginGUI
  32. {
  33. public:
  34. SequencerPluginGUI(int w, int h, SequencerPlugin *o, ChannelHandler *ch,const HostInfo *Info);
  35. virtual void UpdateValues(SpiralPlugin *o);
  36. private:
  37. Fl_Scroll* m_Scroll;
  38. Fl_Button* m_NewPattern;
  39. Fl_Button* m_NoteCut;
  40. Fl_Knob* m_Zoom;
  41. Fl_Knob* m_Length;
  42. Fl_Knob* m_Speed;
  43. Fl_Button* m_Clear;
  44. class PatternWin : public Fl_Double_Window
  45. {
  46. public:
  47. PatternWin(int w,int h,const char* n);
  48. private:
  49. Fl_Scroll* m_Scroll;
  50. Fl_EventMap* m_Melody;
  51. };
  52. map<int,PatternWin*> m_PatternWinMap;
  53. Fl_EventMap* m_ArrangementMap;
  54. //// Callbacks ////
  55. inline void cb_Zoom_i(Fl_Knob* o, void* v);
  56. static void cb_Zoom(Fl_Knob* o, void* v);
  57. inline void cb_NoteCut_i(Fl_Button* o, void* v);
  58. static void cb_NoteCut(Fl_Button* o, void* v);
  59. inline void cb_Pattern_i(Fl_Counter* o, void* v);
  60. static void cb_Pattern(Fl_Counter* o, void* v);
  61. inline void cb_Length_i(Fl_Knob* o, void* v);
  62. static void cb_Length(Fl_Knob* o, void* v);
  63. inline void cb_Speed_i(Fl_Knob* o, void* v);
  64. static void cb_Speed(Fl_Knob* o, void* v);
  65. inline void cb_Clear_i(Fl_Button* o, void* v);
  66. static void cb_Clear(Fl_Button* o, void* v);
  67. inline void cb_NewPattern_i(Fl_Button* o, void* v);
  68. static void cb_NewPattern(Fl_Button* o, void* v);
  69. inline void cb_ArrangeRM_i(Fl_Button* o, void* v);
  70. static void cb_ArrangeRM(Fl_Button* o, void* v);
  71. };
  72. #endif