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.

104 lines
2.9KB

  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. protected:
  42. const string GetHelpText(const string &loc);
  43. private:
  44. Fl_Button* m_Load;
  45. Fl_Knob* m_Volume;
  46. Fl_Slider* m_Pitch;
  47. Fl_Button* m_Loop;
  48. Fl_Button* m_ToStart;
  49. Fl_Button* m_Stop;
  50. Fl_Button* m_Play;
  51. Fl_Button* m_Reset;
  52. Fl_Button* m_Div;
  53. Fl_Repeat_Button* m_Nudge;
  54. Fl_Output* m_Pout;
  55. Fl_SevenSeg* m_Display[6];
  56. Fl_Slider* m_Pos;
  57. char m_TextBuf[256];
  58. float m_PitchValue;
  59. float m_TempPitch;
  60. //// Callbacks ////
  61. inline void cb_Load_i(Fl_Button* o, void* v);
  62. static void cb_Load(Fl_Button* o, void* v);
  63. inline void cb_Volume_i(Fl_Knob* o, void* v);
  64. static void cb_Volume(Fl_Knob* o, void* v);
  65. inline void cb_Pitch_i(Fl_Slider* o, void* v);
  66. static void cb_Pitch(Fl_Slider* o, void* v);
  67. inline void cb_Loop_i(Fl_Button* o, void* v);
  68. static void cb_Loop(Fl_Button* o, void* v);
  69. inline void cb_Div_i(Fl_Button* o, void* v);
  70. static void cb_Div(Fl_Button* o, void* v);
  71. inline void cb_ToStart_i(Fl_Button* o, void* v);
  72. static void cb_ToStart(Fl_Button* o, void* v);
  73. inline void cb_Stop_i(Fl_Button* o, void* v);
  74. static void cb_Stop(Fl_Button* o, void* v);
  75. inline void cb_Play_i(Fl_Button* o, void* v);
  76. static void cb_Play(Fl_Button* o, void* v);
  77. inline void cb_Reset_i(Fl_Button* o, void* v);
  78. static void cb_Reset(Fl_Button* o, void* v);
  79. inline void cb_Nudge_i(Fl_Button* o, void* v);
  80. static void cb_Nudge(Fl_Button* o, void* v);
  81. inline void cb_Pos_i(Fl_Slider* o, void* v);
  82. static void cb_Pos(Fl_Slider* o, void* v);
  83. };
  84. #endif