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.

Fl_Osc_Slider.H 1022B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include <FL/Fl_Slider.H>
  3. #include "Fl_Osc_Widget.H"
  4. #include <string>
  5. class Fl_Osc_Slider:public Fl_Slider, public Fl_Osc_Widget
  6. {
  7. public:
  8. Fl_Osc_Slider(int X, int Y, int W, int H, const char *label = NULL);
  9. // string name,
  10. // const char *metadata);
  11. virtual ~Fl_Osc_Slider(void);
  12. void OSC_value(int) override;
  13. void OSC_value(float) override;
  14. void OSC_value(char) override;
  15. void init(std::string, char type = 'f');
  16. //Refetch parameter information
  17. void update(void);
  18. void callback(Fl_Callback *cb, void *p = NULL);
  19. //MIDI Learn
  20. int handle(int ev, int X, int Y, int W, int H);
  21. int handle(int ev);
  22. virtual void cb(void);
  23. static void _cb(Fl_Widget *w, void *);
  24. float reset_value;
  25. protected:
  26. char osc_type;
  27. std::pair<Fl_Callback*, void*> cb_data;
  28. private:
  29. float old_value;
  30. int start_pos;
  31. float denominator;
  32. };