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.

150 lines
3.5KB

  1. # data file for the Fltk User Interface Designer (fluid)
  2. version 1.0302
  3. header_name {.h}
  4. code_name {.cc}
  5. decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local
  6. }
  7. decl {//License: GNU GPL version 2 or later} {private local
  8. }
  9. decl {\#include <cstdlib>} {public local
  10. }
  11. decl {\#include <cstdio>} {public local
  12. }
  13. decl {\#include <cstring>} {public local
  14. }
  15. decl {\#include <FL/Fl_Button.H>} {public local
  16. }
  17. decl {\#include <FL/Fl_File_Chooser.H>} {public local
  18. }
  19. decl {\#include "Fl_Osc_Interface.h"} {public local
  20. }
  21. decl {\#include "Fl_Osc_Check.H"} {public local
  22. }
  23. decl {\#include "../Misc/Util.h"} {public local
  24. }
  25. decl {\#include "BankView.h"} {public local
  26. }
  27. class BankUI {open
  28. } {
  29. Function {make_window()} {open
  30. } {
  31. Fl_Window bankuiwindow {
  32. label Bank open
  33. xywh {492 406 785 575} type Double
  34. class Fl_Osc_Window
  35. } {
  36. Fl_Box {} {
  37. xywh {0 0 0 0}
  38. code0 {bankuiwindow->osc = osc;}
  39. code1 {bankuiwindow->base = "/";}
  40. }
  41. Fl_Button {} {
  42. label Close
  43. callback {bankuiwindow->hide();}
  44. xywh {705 546 70 24} box THIN_UP_BOX
  45. }
  46. Fl_Group bankview {open
  47. xywh {5 34 772 491} box ENGRAVED_FRAME
  48. class BankView
  49. } {}
  50. Fl_Group modeselect {open
  51. xywh {5 528 425 42} box ENGRAVED_BOX
  52. class BankViewControls
  53. code0 {o->box(FL_UP_BOX);}
  54. } {}
  55. Fl_Button {} {
  56. label {New Bank...}
  57. callback {const char *dirname;
  58. dirname=fl_input("New empty Bank:");
  59. if (dirname==NULL) return;
  60. osc->write("/newbank", "s", dirname);
  61. /*if (result!=0) fl_alert("Error: Could not make a new bank (directory)..");*/
  62. refreshmainwindow();}
  63. xywh {685 5 93 25} labelfont 1 labelsize 11 align 128
  64. }
  65. Fl_Check_Button {} {
  66. label {auto close}
  67. tooltip {automatically close the bank window if the instrument is loaded} xywh {705 529 60 15} down_box DOWN_BOX labelsize 10
  68. code0 {o->init("config/cfg.BankUIAutoClose");}
  69. class Fl_Osc_Check
  70. }
  71. Fl_Choice banklist {
  72. callback {refreshmainwindow();}
  73. xywh {5 8 220 20} down_box BORDER_BOX labelfont 1 align 0 textfont 1 textsize 11
  74. code0 {bankview->init(osc, modeselect, npart);}
  75. code1 {o->init("loadbank");}
  76. class BankList
  77. } {}
  78. Fl_Button {} {
  79. label {Refresh bank list}
  80. callback {rescan_for_banks();
  81. banklist->value(0);}
  82. tooltip {Refresh the bank list (rescan)} xywh {230 8 105 20} box THIN_UP_BOX color 50 labelsize 11
  83. }
  84. }
  85. }
  86. Function {BankUI(int *npart_, Fl_Osc_Interface *osc_)} {open
  87. } {
  88. code {npart=npart_;
  89. osc =osc_;
  90. make_window();
  91. } {}
  92. }
  93. Function {~BankUI()} {open return_type virtual
  94. } {
  95. code {bankuiwindow->hide();
  96. delete bankuiwindow;} {}
  97. }
  98. Function {show()} {open
  99. } {
  100. code {bankuiwindow->show();} {}
  101. }
  102. Function {hide()} {open
  103. } {
  104. code {bankuiwindow->hide();} {}
  105. }
  106. Function {init(Fl_Valuator *cbwig_)} {open
  107. } {
  108. code {cbwig=cbwig_;
  109. bankview->cbwig(cbwig);
  110. rescan_for_banks();} {}
  111. }
  112. Function {process()} {open return_type void
  113. } {
  114. code {} {}
  115. }
  116. Function {refreshmainwindow()} {open
  117. } {
  118. code {
  119. bankview->refresh();} {}
  120. }
  121. Function {rescan_for_banks()} {open
  122. } {
  123. code {banklist->clear();
  124. osc->write("/rescanforbanks");
  125. if (banklist->size() == 0)
  126. banklist->add(" ");} {}
  127. }
  128. decl {Fl_Osc_Interface *osc;} {private local
  129. }
  130. decl {Fl_Valuator *cbwig;} {public local
  131. }
  132. decl {int *npart;} {private local
  133. }
  134. }