1 // ----------------------------------------------------------------------------
2 //
3 //  Copyright (C) 2008-2017 Fons Adriaensen <fons@linuxaudio.org>
4 //
5 //  This program is free software; you can redistribute it and/or modify
6 //  it under the terms of the GNU General Public License as published by
7 //  the Free Software Foundation; either version 3 of the License, or
8 //  (at your option) any later version.
9 //
10 //  This program is distributed in the hope that it will be useful,
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //  GNU General Public License for more details.
14 //
15 //  You should have received a copy of the GNU General Public License
16 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 //
18 // ----------------------------------------------------------------------------
19 
20 
21 #ifndef __GUICLASS_H
22 #define __GUICLASS_H
23 
24 
25 #include "rotary.h"
26 
27 
28 class Rlinctl : public RotaryCtl
29 {
30 public:
31 
32     Rlinctl (X_window   *parent,
33              X_callback *cbobj,
34 	     int         cbind,
35              RotaryGeom *geom,
36              int        xp,
37              int        yp,
38 	     int        cm,
39 	     int        dd,
40              double     vmin,
41 	     double     vmax,
42 	     double     vini);
43 
44     virtual void set_value (double v);
45     virtual void get_string (char *p, int n);
46 
47 private:
48 
49     virtual int handle_button (void);
50     virtual int handle_motion (int dx, int dy);
51     virtual int handle_mwheel (int dw);
52     int set_count (int u);
53 
54     int         _cm;
55     int         _dd;
56     double      _vmin;
57     double      _vmax;
58     const char *_form;
59 };
60 
61 
62 class Rlogctl : public RotaryCtl
63 {
64 public:
65 
66     Rlogctl (X_window   *parent,
67              X_callback *cbobj,
68 	     int         cbind,
69              RotaryGeom *geom,
70  	     int        xp,
71              int        yp,
72 	     int        cm,
73 	     int        dd,
74              double     vmin,
75 	     double     vmax,
76 	     double     vini);
77 
78     virtual void set_value (double v);
79     virtual void get_string (char *p, int n);
80 
81 private:
82 
83     virtual int handle_button (void);
84     virtual int handle_motion (int dx, int dy);
85     virtual int handle_mwheel (int dw);
86     int set_count (int u);
87 
88     int         _cm;
89     int         _dd;
90     double      _vmin;
91     double      _vmax;
92     const char *_form;
93 };
94 
95 
96 
97 #endif
98