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.

tmeter.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. Copyright (C) 2009-2010 Fons Adriaensen <fons@linuxaudio.org>
  3. Modified by falkTX on Jan 2015 for inclusion in Carla
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef __TMETER_H
  17. #define __TMETER_H
  18. #include <clxclient.h>
  19. namespace AT1 {
  20. class Tmeter : public X_window
  21. {
  22. public:
  23. Tmeter (X_window *parent, int xpos, int ypos);
  24. ~Tmeter (void);
  25. Tmeter (const Tmeter&);
  26. Tmeter& operator=(const Tmeter&);
  27. void update (float v0, float v1);
  28. static XImage *_scale;
  29. static XImage *_imag0;
  30. static XImage *_imag1;
  31. private:
  32. enum { XS = 173, YS = 17, XM = 0, YM = 0, Y1 = 7, Y2 = 10 };
  33. void handle_event (XEvent *E);
  34. void expose (XExposeEvent *E);
  35. int _k0;
  36. int _k1;
  37. };
  38. }
  39. #endif