Update NTK.
[nondaw.git] / mixer / src / Meter_Module.H
blobe85b28368e4146baef9baf03df774a105d8a8b91
2 /*******************************************************************************/
3 /* Copyright (C) 2009 Jonathan Moore Liles                                     */
4 /*                                                                             */
5 /* This program is free software; you can redistribute it and/or modify it     */
6 /* under the terms of the GNU General Public License as published by the       */
7 /* Free Software Foundation; either version 2 of the License, or (at your      */
8 /* option) any later version.                                                  */
9 /*                                                                             */
10 /* This program is distributed in the hope that it will be useful, but WITHOUT */
11 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       */
12 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for   */
13 /* more details.                                                               */
14 /*                                                                             */
15 /* You should have received a copy of the GNU General Public License along     */
16 /* with This program; see the file COPYING.  If not,write to the Free Software */
17 /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
18 /*******************************************************************************/
20 #pragma once
22 #include "Module.H"
24 class Fl_Scalepack;
26 class Meter_Module : public Module
28     Fl_Scalepack *dpm_pack;
30     volatile float *control_value;
32     static void update_cb ( void *v );
33     void update_cb ( void );
35 public:
37     Meter_Module ( );
38     virtual ~Meter_Module ( );
40     const char *name ( void ) const { return "Meter"; }
42     int can_support_inputs ( int n ) { return n > 0 ? n : -1; }
43     bool configure_inputs ( int n );
45     LOG_CREATE_FUNC( Meter_Module );
47 protected:
49     virtual int handle ( int m );
50     virtual void process ( nframes_t nframes );
51     virtual void draw ( void ) { draw_box(); }