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_Widget.H 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #pragma once
  2. #include <string>
  3. #include <cstring>
  4. #include <cassert>
  5. #include <cmath>
  6. #include "Fl_Osc_Interface.h"
  7. #include <FL/Fl_Group.H>
  8. class Fl_Osc_Widget
  9. {
  10. public:
  11. Fl_Osc_Widget(void); //Deprecated
  12. Fl_Osc_Widget(Fl_Widget *self);
  13. Fl_Osc_Widget(std::string loc, Fl_Osc_Interface *osc);
  14. virtual ~Fl_Osc_Widget(void);
  15. //Callback methods
  16. virtual void OSC_value(float);
  17. virtual void OSC_value(bool);
  18. virtual void OSC_value(int);
  19. virtual void OSC_value(char);
  20. virtual void OSC_value(unsigned,void*);
  21. virtual void OSC_value(const char *);
  22. //labeled forwarding methods
  23. virtual void OSC_value(float x, const char *);
  24. virtual void OSC_value(bool x, const char *);
  25. virtual void OSC_value(int x, const char *);
  26. virtual void OSC_value(char x, const char *);
  27. virtual void OSC_value(unsigned x, void *v, const char *);
  28. virtual void OSC_value(const char *x, const char *);
  29. //Raw messages
  30. virtual void OSC_raw(const char *);
  31. //Widget methods
  32. void oscWrite(std::string path, const char *args, ...);
  33. void oscWrite(std::string path);
  34. void oscRegister(const char *path);
  35. //Forces an update of parameters as they have become stale somehow
  36. virtual void update(void);
  37. //Smoothly change the base path
  38. virtual void rebase(std::string new_base);
  39. void oscMove(std::string new_ext);
  40. //Explict version for weirdly routed controls
  41. void oscMove(std::string old_loc, std::string new_loc);
  42. //Base path
  43. std::string loc;
  44. //Extension
  45. std::string ext;
  46. Fl_Osc_Interface *osc;
  47. protected:
  48. class Fl_Osc_Pane *fetch_osc_pane(Fl_Widget *w);
  49. };