zynaddsubfx

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

WidgetPDial.h (1261B)


      1 /*
      2   ZynAddSubFX - a software synthesizer
      3 
      4   WidgetPDial.h - Fl_Dial Custom Behavior
      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 // generated by Fast Light User Interface Designer (fluid) version 1.0107f
     13 
     14 #ifndef WIDGETPDIAL_h
     15 #define WIDGETPDIAL_h
     16 #include <FL/Fl_Dial.H>
     17 #include "TipWin.h"
     18 
     19 
     20 class WidgetPDial:public Fl_Dial
     21 {
     22     public:
     23         WidgetPDial(int x, int y, int w, int h, const char *label = 0);
     24         ~WidgetPDial();
     25         int handle(int event);
     26         void draw();
     27         void pdialcolor(int r, int g, int b);
     28         void tooltip(const char *c);
     29 	void set_transform(float (*transformer)(float));
     30         void set_rounding(unsigned int digits = 0);
     31         float reset_value;
     32     protected:
     33         bool integer_step;
     34         bool use_rounding;
     35     private:
     36         void getPos();
     37         void resetPos();
     38         double oldvalue;
     39         int old_y;
     40         bool   pos;
     41         bool   textset;
     42         class TipWin * tipwin;
     43         float (*transform)(float);
     44         int mod_state;
     45 };
     46 #endif