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.

100 lines
2.8KB

  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_Counter.H>
  22. #include <FL/Fl_Slider.H>
  23. #include <FL/Fl_Output.H>
  24. #include <FL/Fl_Repeat_Button.H>
  25. #include "StreamPlugin.h"
  26. #include "../SpiralPluginGUI.h"
  27. #include "../Widgets/Fl_Knob.H"
  28. #include "../Widgets/Fl_SevenSeg.H"
  29. #ifndef MixerGUI
  30. #define MixerGUI
  31. class StreamPluginGUI;
  32. class StreamPluginGUI : public SpiralPluginGUI
  33. {
  34. public:
  35. StreamPluginGUI(int w, int h, StreamPlugin *o,ChannelHandler *ch,const HostInfo *Info);
  36. virtual ~StreamPluginGUI();
  37. virtual void Update();
  38. virtual void UpdateValues(SpiralPlugin *o);
  39. //void SetTime();
  40. void SetMaxTime(float t) { m_Pos->maximum(t); }
  41. private:
  42. Fl_Button* m_Load;
  43. Fl_Knob* m_Volume;
  44. Fl_Slider* m_Pitch;
  45. Fl_Button* m_Loop;
  46. Fl_Button* m_ToStart;
  47. Fl_Button* m_Stop;
  48. Fl_Button* m_Play;
  49. Fl_Button* m_Reset;
  50. Fl_Button* m_Div;
  51. Fl_Repeat_Button* m_Nudge;
  52. Fl_Output* m_Pout;
  53. Fl_SevenSeg* m_Display[6];
  54. Fl_Slider* m_Pos;
  55. char m_TextBuf[256];
  56. float m_PitchValue;
  57. //// Callbacks ////
  58. inline void cb_Load_i(Fl_Button* o, void* v);
  59. static void cb_Load(Fl_Button* o, void* v);
  60. inline void cb_Volume_i(Fl_Knob* o, void* v);
  61. static void cb_Volume(Fl_Knob* o, void* v);
  62. inline void cb_Pitch_i(Fl_Slider* o, void* v);
  63. static void cb_Pitch(Fl_Slider* o, void* v);
  64. inline void cb_Loop_i(Fl_Button* o, void* v);
  65. static void cb_Loop(Fl_Button* o, void* v);
  66. inline void cb_Div_i(Fl_Button* o, void* v);
  67. static void cb_Div(Fl_Button* o, void* v);
  68. inline void cb_ToStart_i(Fl_Button* o, void* v);
  69. static void cb_ToStart(Fl_Button* o, void* v);
  70. inline void cb_Stop_i(Fl_Button* o, void* v);
  71. static void cb_Stop(Fl_Button* o, void* v);
  72. inline void cb_Play_i(Fl_Button* o, void* v);
  73. static void cb_Play(Fl_Button* o, void* v);
  74. inline void cb_Reset_i(Fl_Button* o, void* v);
  75. static void cb_Reset(Fl_Button* o, void* v);
  76. inline void cb_Nudge_i(Fl_Button* o, void* v);
  77. static void cb_Nudge(Fl_Button* o, void* v);
  78. inline void cb_Pos_i(Fl_Slider* o, void* v);
  79. static void cb_Pos(Fl_Slider* o, void* v);
  80. };
  81. #endif