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.

75 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 "XFadePluginGUI.h"
  19. #include <FL/fl_draw.h>
  20. #include <FL/fl_draw.H>
  21. static const int GUI_COLOUR = 179;
  22. static const int GUIBG_COLOUR = 144;
  23. static const int GUIBG2_COLOUR = 145;
  24. ////////////////////////////////////////////
  25. XFadePluginGUI::XFadePluginGUI(int w, int h,XFadePlugin *o,ChannelHandler *ch,const HostInfo *Info) :
  26. SpiralPluginGUI(w,h,o,ch)
  27. {
  28. m_Mix = new Fl_Slider(5, 20, 200, 20, "");
  29. m_Mix->type(FL_HORIZONTAL);
  30. m_Mix->selection_color(GUI_COLOUR);
  31. m_Mix->labelsize(10);
  32. m_Mix->maximum(1);
  33. m_Mix->step(0.0001);
  34. m_Mix->value(0.5);
  35. m_Mix->callback((Fl_Callback*)cb_Mix);
  36. end();
  37. }
  38. void XFadePluginGUI::UpdateValues(SpiralPlugin *o)
  39. {
  40. XFadePlugin *Plugin = (XFadePlugin*)o;
  41. m_Mix->value(Plugin->GetMix());
  42. }
  43. inline void XFadePluginGUI::cb_Mix_i(Fl_Slider* o, void* v)
  44. {
  45. m_GUICH->Set("Mix",(float)o->value());
  46. }
  47. void XFadePluginGUI::cb_Mix(Fl_Slider* o, void* v)
  48. { ((XFadePluginGUI*)(o->parent()))->cb_Mix_i(o,v); }
  49. const string XFadePluginGUI::GetHelpText(const string &loc)
  50. {
  51. if (loc=="EN")
  52. {
  53. return "For mixing stereo inputs like a superstar DJ would.";
  54. }
  55. else if (loc=="FR")
  56. {
  57. return "FR: For mixing stereo inputs like a superstar DJ would.";
  58. }
  59. else if (loc=="DE")
  60. {
  61. return "DE: For mixing stereo inputs like a superstar DJ would.";
  62. }
  63. // default to english?
  64. return "DE: For mixing stereo inputs like a superstar DJ would.";
  65. }