Audio plugin host https://kx.studio/carla
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.

41 lines
1.1KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Fl_Osc_Choice.H - OSC Powered Dropdown Choice
  4. Copyright (C) 2016 Mark McCurry
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. */
  10. #pragma once
  11. #include <FL/Fl_Choice.H>
  12. #include "Fl_Osc_Widget.H"
  13. #include <string>
  14. class Fl_Osc_Choice:public Fl_Choice, public Fl_Osc_Widget
  15. {
  16. public:
  17. Fl_Osc_Choice(int X, int Y, int W, int H, const char *label = NULL);
  18. virtual ~Fl_Osc_Choice(void);
  19. //Base is for braindead choices that don't actually start at zero
  20. void init(std::string path, int base =0);
  21. //void OSC_value(float);
  22. void OSC_value(int);
  23. void OSC_value(char);
  24. //Refetch parameter information
  25. void update(void);
  26. void callback(Fl_Callback *cb, void *p = NULL);
  27. virtual void cb(void);
  28. private:
  29. int min;
  30. protected:
  31. std::pair<Fl_Callback*, void*> cb_data;
  32. };