External plugins for 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.

101 lines
2.8KB

  1. // generated by Fast Light User Interface Designer (fluid) version 1.0300
  2. #ifndef VirKeyboard_h
  3. #define VirKeyboard_h
  4. #include <FL/Fl.H>
  5. #include <cstdlib>
  6. #include <FL/fl_draw.H>
  7. #include <FL/Fl_Box.H>
  8. #include "../globals.h"
  9. #include "../Misc/Util.h"
  10. #include "WidgetPDial.h"
  11. #include "Fl_Osc_Counter.H"
  12. #include "common.H"
  13. #ifdef NTK_GUI
  14. #include "FL/Fl_Shared_Image.H"
  15. #endif
  16. using namespace zyncarla;
  17. class VirKeys : public Fl_Box, public Fl_Osc_Widget {
  18. static const int N_OCT=6;
  19. static const int SIZE_WHITE=14;
  20. static const int SIZE_BLACK=8;
  21. public:
  22. VirKeys(int x,int y, int w, int h, const char *label=0);
  23. void OSC_value(int layout);
  24. void init(Fl_Osc_Interface *osc_, std::string loc_);
  25. void draw();
  26. int handle(int event);
  27. void presskey(int nk,int exclusive,int type);
  28. void releasekey(int nk,int type);
  29. void releaseallkeys(int type);
  30. private:
  31. int pressed[N_OCT*12+1];
  32. public:
  33. unsigned char midich;
  34. int keylayout;
  35. unsigned char midivel;
  36. char midioct,keyoct1,keyoct2;
  37. unsigned char rndvelocity;
  38. private:
  39. Fl_Osc_Interface *osc;
  40. std::string loc;
  41. };
  42. #include <FL/Fl_Double_Window.H>
  43. #include <FL/Fl_Counter.H>
  44. #include <FL/Fl_Value_Slider.H>
  45. #include <FL/Fl_Button.H>
  46. #include <FL/Fl_Choice.H>
  47. #include <FL/Fl_Roller.H>
  48. class VirKeyboard {
  49. public:
  50. Fl_Double_Window* make_window();
  51. Fl_Double_Window *virkeyboardwindow;
  52. private:
  53. void cb_virkeyboardwindow_i(Fl_Double_Window*, void*);
  54. static void cb_virkeyboardwindow(Fl_Double_Window*, void*);
  55. public:
  56. VirKeys *virkeys;
  57. private:
  58. void cb_qwer_i(Fl_Counter*, void*);
  59. static void cb_qwer(Fl_Counter*, void*);
  60. void cb_zxcv_i(Fl_Counter*, void*);
  61. static void cb_zxcv(Fl_Counter*, void*);
  62. void cb_Vel_i(Fl_Value_Slider*, void*);
  63. static void cb_Vel(Fl_Value_Slider*, void*);
  64. void cb_Oct_i(Fl_Counter*, void*);
  65. static void cb_Oct(Fl_Counter*, void*);
  66. void cb_Close_i(Fl_Button*, void*);
  67. static void cb_Close(Fl_Button*, void*);
  68. void cb_Cval_i(Fl_Value_Slider*, void*);
  69. static void cb_Cval(Fl_Value_Slider*, void*);
  70. void cb_Controller_i(Fl_Choice*, void*);
  71. static void cb_Controller(Fl_Choice*, void*);
  72. static Fl_Menu_Item menu_Controller[];
  73. public:
  74. Fl_Roller *pitchwheelroller;
  75. private:
  76. void cb_pitchwheelroller_i(Fl_Roller*, void*);
  77. static void cb_pitchwheelroller(Fl_Roller*, void*);
  78. void cb_R_i(Fl_Button*, void*);
  79. static void cb_R(Fl_Button*, void*);
  80. void cb_Vrnd_i(WidgetPDial*, void*);
  81. static void cb_Vrnd(WidgetPDial*, void*);
  82. public:
  83. Fl_Choice *partrcv;
  84. private:
  85. void cb_partrcv_i(Fl_Choice*, void*);
  86. static void cb_partrcv(Fl_Choice*, void*);
  87. public:
  88. VirKeyboard(Fl_Osc_Interface *osc_, std::string loc_);
  89. ~VirKeyboard();
  90. void show();
  91. void releaseallkeys();
  92. private:
  93. int midictl;
  94. Fl_Osc_Interface *osc;
  95. std::string loc;
  96. };
  97. #endif