zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

Fl_Osc_Counter.H (1032B)


      1 /*
      2   ZynAddSubFX - a software synthesizer
      3 
      4   Fl_Osc_Counter.H - OSC Powered Counter
      5   Copyright (C) 2016 Mark McCurry
      6 
      7   This program is free software; you can redistribute it and/or
      8   modify it under the terms of the GNU General Public License
      9   as published by the Free Software Foundation; either version 2
     10   of the License, or (at your option) any later version.
     11 */
     12 #pragma once
     13 #include <FL/Fl_Counter.H>
     14 #include "Fl_Osc_Widget.H"
     15 #include <string>
     16 
     17 class Fl_Osc_Counter: public Fl_Counter, public Fl_Osc_Widget
     18 {
     19     public:
     20         Fl_Osc_Counter(int x, int y, int w, int h, const char *label=0);
     21         void init(const char *path_, char type_ = 'i', int display_off = 0);
     22         void OSC_value(char);
     23         void OSC_value(int);
     24         using Fl_Osc_Widget::OSC_value;
     25         
     26         //Refetch parameters
     27         void update(void);
     28         void callback(Fl_Callback *cb, void *p = NULL);
     29 
     30         void cb(void);
     31         char cb_type;
     32     private:
     33         int offset;
     34         std::pair<Fl_Callback*, void*> cb_data;
     35 };