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.

146 lines
3.3KB

  1. // ----------------------------------------------------------------------
  2. //
  3. // Copyright (C) 2010-2014 Fons Adriaensen <fons@linuxaudio.org>
  4. // Modified by falkTX on Jan-Apr 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 "button.h"
  24. #include "rotary.h"
  25. namespace AT1 {
  26. class Pbutt0 : public PushButton
  27. {
  28. public:
  29. Pbutt0 (X_window *parent,
  30. X_callback *cbobj,
  31. ButtonImg *image,
  32. int xp,
  33. int yp,
  34. int cbind = 0) :
  35. PushButton (parent, cbobj, image, xp, yp, cbind)
  36. {
  37. }
  38. private:
  39. virtual int handle_press (void);
  40. virtual int handle_relse (void);
  41. };
  42. class Pbutt1 : public PushButton
  43. {
  44. public:
  45. Pbutt1 (X_window *parent,
  46. X_callback *cbobj,
  47. ButtonImg *image,
  48. int xp,
  49. int yp,
  50. int cbind = 0) :
  51. PushButton (parent, cbobj, image, xp, yp, cbind)
  52. {
  53. }
  54. private:
  55. virtual int handle_press (void);
  56. virtual int handle_relse (void);
  57. };
  58. class Rlinctl : public RotaryCtl
  59. {
  60. public:
  61. Rlinctl (X_window *parent,
  62. X_callback *cbobj,
  63. int cbind,
  64. RotaryGeom *rgeom,
  65. int xp,
  66. int yp,
  67. int cm,
  68. int dd,
  69. double vmin,
  70. double vmax,
  71. double vini);
  72. virtual void set_value (double v);
  73. virtual void get_string (char *p, int n);
  74. private:
  75. virtual int handle_button (void);
  76. virtual int handle_motion (int dx, int dy);
  77. virtual int handle_mwheel (int dw);
  78. int set_count (int u);
  79. int _cm;
  80. int _dd;
  81. double _vmin;
  82. double _vmax;
  83. const char *_form;
  84. };
  85. class Rlogctl : public RotaryCtl
  86. {
  87. public:
  88. Rlogctl (X_window *parent,
  89. X_callback *cbobj,
  90. int cbind,
  91. RotaryGeom *rgeom,
  92. int xp,
  93. int yp,
  94. int cm,
  95. int dd,
  96. double vmin,
  97. double vmax,
  98. double vini);
  99. virtual void set_value (double v);
  100. virtual void get_string (char *p, int n);
  101. private:
  102. virtual int handle_button (void);
  103. virtual int handle_motion (int dx, int dy);
  104. virtual int handle_mwheel (int dw);
  105. int set_count (int u);
  106. int _cm;
  107. int _dd;
  108. double _vmin;
  109. double _vmax;
  110. const char *_form;
  111. };
  112. }
  113. #endif