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.

98 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_Button.H>
  22. #include <FL/Fl_Pixmap.H>
  23. #include <FL/Fl_Box.H>
  24. #include <FL/Fl_Scroll.H>
  25. #include <FL/Fl_Pack.H>
  26. #include "../Widgets/Fl_Knob.H"
  27. #include "../Widgets/Fl_LED_Button.H"
  28. #include "JackPlugin.h"
  29. #include "../SpiralPluginGUI.h"
  30. #ifndef JACK_GUI_H
  31. #define JACK_GUI_H
  32. using namespace std;
  33. class JackPluginGUI : public SpiralPluginGUI
  34. {
  35. public:
  36. JackPluginGUI(int w, int h, JackPlugin *o,ChannelHandler *ch,const HostInfo *Info);
  37. virtual void UpdateValues(SpiralPlugin *o);
  38. virtual void Update();
  39. protected:
  40. const std::string GetHelpText(const std::string &loc);
  41. private:
  42. JackClient *m_JackClient;
  43. JackPlugin *m_JackPlugin;
  44. Fl_Color m_GUIColour;
  45. Fl_LED_Button *m_Indicator;
  46. Fl_Button *m_Remove;
  47. Fl_Button *m_Add;
  48. Fl_Button *m_Attach;
  49. Fl_Button *m_Detach;
  50. Fl_Scroll *m_Scroll;
  51. Fl_Pack *m_InputPack;
  52. Fl_Pack *m_OutputPack;
  53. std::vector<char*> m_InputName;
  54. std::vector<Fl_Box*> m_InputLabel;
  55. std::vector<Fl_Button*> m_InputButton;
  56. std::vector<char*> m_OutputName;
  57. std::vector<Fl_Box*> m_OutputLabel;
  58. std::vector<Fl_Button*> m_OutputButton;
  59. void RemoveInput() ;
  60. void RemoveOutput() ;
  61. void AddInput() ;
  62. void AddOutput() ;
  63. //// inline Callbacks ////
  64. inline void cb_Add_i(Fl_Button* o);
  65. inline void cb_Remove_i(Fl_Button* o);
  66. inline void cb_Attach_i(Fl_Button* o);
  67. inline void cb_Detach_i(Fl_Button* o);
  68. inline void cb_OutputConnect_i(Fl_Button* o);
  69. inline void cb_InputConnect_i(Fl_Button* o);
  70. //// Static Callbacks ////
  71. static void cb_Add(Fl_Button* o, JackPluginGUI* v) {v->cb_Add_i(o);}
  72. static void cb_Remove(Fl_Button* o, JackPluginGUI* v) {v->cb_Remove_i(o);}
  73. static void cb_Attach(Fl_Button* o, JackPluginGUI* v) {v->cb_Attach_i(o);}
  74. static void cb_Detach(Fl_Button* o, JackPluginGUI* v) {v->cb_Detach_i(o);}
  75. static void cb_OutputConnect(Fl_Button* o, JackPluginGUI* v) {v->cb_OutputConnect_i(o);}
  76. static void cb_InputConnect(Fl_Button* o, JackPluginGUI* v) {v->cb_InputConnect_i(o);}
  77. };
  78. #endif