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.

93 lines
3.0KB

  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 <FL/Fl_Box.H>
  26. #include "MatrixPlugin.h"
  27. #include "../SpiralPluginGUI.h"
  28. #include "../Widgets/Fl_Knob.H"
  29. #include "../Widgets/Fl_LED_Button.H"
  30. #ifndef MatrixGUI
  31. #define MatrixGUI
  32. class MatrixPluginGUI : public SpiralPluginGUI
  33. {
  34. public:
  35. MatrixPluginGUI(int w, int h, MatrixPlugin *o,ChannelHandler *ch,const HostInfo *Info);
  36. virtual void draw();
  37. virtual void UpdateValues(SpiralPlugin *o);
  38. private:
  39. void UpdateMatrix();
  40. int Numbers[MATX*MATY];
  41. Pattern m_GUIMatrix[NUM_PATTERNS];
  42. Fl_Button* m_NoteCut;
  43. Fl_Counter* m_Pattern;
  44. Fl_Counter* m_Length;
  45. Fl_Knob* m_Speed;
  46. Fl_Button* m_Matrix[MATX][MATY];
  47. Fl_Counter* m_Octave;
  48. Fl_Counter* m_SpeedVal;
  49. Fl_LED_Button* m_Flash[MATX];
  50. Fl_Button* m_CopyBtn;
  51. Fl_Button* m_PasteBtn;
  52. Fl_Button* m_ClearBtn;
  53. Fl_Box* m_TransLbl;
  54. Fl_Button* m_TransUpBtn;
  55. Fl_Button* m_TransDnBtn;
  56. //// Callbacks ////
  57. inline void cb_Matrix_i(Fl_Button* o, void* v);
  58. static void cb_Matrix(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_Counter* o, void* v);
  62. static void cb_Length(Fl_Counter* 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_NoteCut_i(Fl_Button* o, void* v);
  66. static void cb_NoteCut(Fl_Button* o, void* v);
  67. inline void cb_Octave_i(Fl_Counter* o, void* v);
  68. static void cb_Octave(Fl_Counter* o, void* v);
  69. inline void cb_SpeedVal_i (Fl_Counter* o, void* v);
  70. static void cb_SpeedVal (Fl_Counter* o, void* v);
  71. inline void cb_CopyBtn_i (Fl_Button* o, void* v);
  72. static void cb_CopyBtn (Fl_Button* o, void* v);
  73. inline void cb_PasteBtn_i (Fl_Button* o, void* v);
  74. static void cb_PasteBtn (Fl_Button* o, void* v);
  75. inline void cb_ClearBtn_i (Fl_Button* o, void* v);
  76. static void cb_ClearBtn (Fl_Button* o, void* v);
  77. inline void cb_TransUpBtn_i (Fl_Button* o, void* v);
  78. static void cb_TransUpBtn (Fl_Button* o, void* v);
  79. inline void cb_TransDnBtn_i (Fl_Button* o, void* v);
  80. static void cb_TransDnBtn (Fl_Button* o, void* v);
  81. };
  82. #endif