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.7KB

  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_Check_Button.H>
  19. #include <FL/Fl_Pixmap.H>
  20. #include <FL/Fl_Slider.H>
  21. #include <FL/Fl_Box.H>
  22. #include <FL/Fl_Button.H>
  23. #include <FL/Fl_Output.H>
  24. #include "../Widgets/Fl_Knob.H"
  25. #include "../SpiralPluginGUI.h"
  26. #include "OscillatorPlugin.h"
  27. #ifndef SCOPEGUI
  28. #define SCOPEGUI
  29. class OscillatorPluginGUI : public SpiralPluginGUI
  30. {
  31. public:
  32. OscillatorPluginGUI(int w, int h, OscillatorPlugin *o,ChannelHandler *ch,const HostInfo *Info);
  33. virtual void UpdateValues(SpiralPlugin *o);
  34. protected:
  35. const string GetHelpText(const string &loc);
  36. private:
  37. Fl_Check_Button *ShapeSquare;
  38. Fl_Pixmap pixmap_Square;
  39. Fl_Check_Button *ShapeNoise;
  40. Fl_Pixmap pixmap_Noise;
  41. Fl_Check_Button *ShapeSaw;
  42. Fl_Pixmap pixmap_Saw;
  43. Fl_Knob *Freq;
  44. Fl_Knob *ModAmount;
  45. Fl_Knob *FineTune;
  46. Fl_Slider *PulseWidth;
  47. Fl_Slider *SHLen;
  48. Fl_Button *m_pop;
  49. Fl_Output *m_out_freq;
  50. Fl_Output *m_out_mod;
  51. Fl_Output *m_out_pulseW;
  52. Fl_Output *m_out_SHlen;
  53. float m_FineFreq;
  54. int m_Octave;
  55. //// Callbacks ////
  56. inline void cb_Freq_i(Fl_Knob* o, void* v);
  57. static void cb_Freq(Fl_Knob*, void*);
  58. inline void cb_FineTune_i(Fl_Knob* o, void* v);
  59. static void cb_FineTune(Fl_Knob* o, void* v);
  60. inline void cb_ModAmount_i(Fl_Knob* o, void* v);
  61. static void cb_ModAmount(Fl_Knob* o, void* v);
  62. inline void cb_PulseWidth_i(Fl_Slider* o, void* v);
  63. static void cb_PulseWidth(Fl_Slider* o, void* v);
  64. inline void cb_SHLen_i(Fl_Slider* o, void* v);
  65. static void cb_SHLen(Fl_Slider* o, void* v);
  66. inline void cb_Square_i(Fl_Check_Button* o, void* v);
  67. static void cb_Square(Fl_Check_Button*, void*);
  68. inline void cb_Saw_i(Fl_Check_Button* o, void* v);
  69. static void cb_Saw(Fl_Check_Button*, void*);
  70. inline void cb_Noise_i(Fl_Check_Button* o, void* v);
  71. static void cb_Noise(Fl_Check_Button* o, void* v);
  72. inline void cb_pop_i(Fl_Button* o, void*);
  73. static void cb_pop(Fl_Button* o, void*);
  74. };
  75. #endif