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.

guiclass.h 2.5KB

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