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_Counter.H 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Fl_Osc_Counter.H - OSC Powered Counter
  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_Counter.H>
  12. #include "Fl_Osc_Widget.H"
  13. #include <string>
  14. class Fl_Osc_Counter: public Fl_Counter, public Fl_Osc_Widget
  15. {
  16. public:
  17. Fl_Osc_Counter(int x, int y, int w, int h, const char *label=0);
  18. void init(const char *path_, char type_ = 'i', int display_off = 0);
  19. void OSC_value(char);
  20. void OSC_value(int);
  21. using Fl_Osc_Widget::OSC_value;
  22. //Refetch parameters
  23. void update(void);
  24. void callback(Fl_Callback *cb, void *p = NULL);
  25. void cb(void);
  26. char cb_type;
  27. private:
  28. int offset;
  29. std::pair<Fl_Callback*, void*> cb_data;
  30. };