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.

85 lines
3.1KB

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