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.

91 lines
2.2KB

  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_Button.H>
  21. #include <FL/Fl_Group.H>
  22. #include <FL/Fl_Pack.H>
  23. #include <FL/Fl_Int_Input.H>
  24. #include <FL/Fl_Input.H>
  25. #include <FL/Fl_Slider.H>
  26. #include "ControllerPlugin.h"
  27. #include "../SpiralPluginGUI.h"
  28. #ifndef MixerGUI
  29. #define MixerGUI
  30. static int Numbers[MAX_CHANNELS];
  31. class ControllerPluginGUI : public SpiralPluginGUI
  32. {
  33. public:
  34. ControllerPluginGUI(int w, int h, ControllerPlugin *o,const HostInfo *Info);
  35. virtual void UpdateValues();
  36. virtual SpiralPlugin* GetPlugin() { return m_Plugin; }
  37. ControllerPlugin *m_Plugin;
  38. void StreamIn(istream &s);
  39. void StreamOut(ostream &s);
  40. private:
  41. void Clear();
  42. class CVGUI
  43. {
  44. public:
  45. CVGUI::CVGUI(int n, ControllerPluginGUI *p);
  46. Fl_Group *m_SliderGroup;
  47. Fl_Input *m_Title;
  48. Fl_Int_Input *m_Min;
  49. Fl_Int_Input *m_Max;
  50. Fl_Slider *m_Chan;
  51. };
  52. friend class CVGUI;
  53. Fl_Pack *m_MainPack;
  54. Fl_Button *m_Add;
  55. Fl_Button *m_Delete;
  56. vector<CVGUI*> m_GuiVec;
  57. void AddCV();
  58. void DeleteCV();
  59. int m_CVCount;
  60. //// Callbacks ////
  61. inline void cb_Chan_i(Fl_Slider* o, void* v);
  62. static void cb_Chan(Fl_Slider* o, void* v);
  63. inline void cb_Add_i(Fl_Button* o, void* v);
  64. static void cb_Add(Fl_Button* o, void* v);
  65. inline void cb_Delete_i(Fl_Button* o, void* v);
  66. static void cb_Delete(Fl_Button* o, void* v);
  67. friend istream &operator>>(istream &s, ControllerPluginGUI &o);
  68. };
  69. istream &operator>>(istream &s, ControllerPluginGUI &o);
  70. #endif