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.

58 lines
2.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. #ifndef SPIRALPLUGINGUI
  19. #define SPIRALPLUGINGUI
  20. #include <FL/Fl.H>
  21. #include <FL/Fl_Double_Window.H>
  22. #include <FL/Fl_Button.H>
  23. #include <FL/Fl_Text_Display.H>
  24. #include <iostream>
  25. #include <math.h>
  26. #include "SpiralPlugin.h" // for the channel handler
  27. #include "../../GUI/Widgets/SpiralGUI.H"
  28. class SpiralPluginGUI : public SpiralGUIType {
  29. public:
  30. SpiralPluginGUI (int w, int h, SpiralPlugin* o, ChannelHandler *ch);
  31. ~SpiralPluginGUI ();
  32. void Resize (int neww, int newh);
  33. virtual void Update ();
  34. // called while audio thread is suspended, so direct access to the spiralplugin is acceptable
  35. virtual void UpdateValues (SpiralPlugin *o) = 0;
  36. protected:
  37. ChannelHandler *m_GUICH;
  38. virtual const std::string GetHelpText (const std::string &loc);
  39. private:
  40. Fl_Button *m_Hide, *m_Help;
  41. static Fl_Double_Window* m_HelpWin;
  42. static Fl_Text_Display* m_HelpWin_text;
  43. static SpiralPluginGUI* Help_owner;
  44. std::string m_Title;
  45. //// Callbacks ////
  46. inline void cb_Hide_i (Fl_Button *o, void *v);
  47. static void cb_Hide (Fl_Button *o, void *v);
  48. inline void cb_Help_i (Fl_Button *o, void *v);
  49. static void cb_Help (Fl_Button *o, void *v);
  50. inline void cb_Help_close_i (Fl_Double_Window *w, void *v);
  51. static void cb_Help_close (Fl_Double_Window *w, void *v);
  52. };
  53. #endif