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.

ConfigUI.fl 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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 <stdio.h>} {public local
  10. }
  11. decl {\#include <math.h>} {public local
  12. }
  13. decl {\#include <stdlib.h>} {public local
  14. }
  15. decl {\#include <FL/Fl_File_Chooser.H>} {public local
  16. }
  17. decl {\#include "Fl_Osc_Button.H"} {public local
  18. }
  19. decl {\#include "Fl_Osc_Counter.H"} {public local
  20. }
  21. decl {\#include "Fl_Osc_Choice.H"} {public local
  22. }
  23. decl {\#include "Osc_IntModel.h"} {public local
  24. }
  25. decl {\#include "Fl_Osc_Check.H"} {public local
  26. }
  27. decl {\#include "Fl_Osc_Input.H"} {public local
  28. }
  29. decl {\#include "Fl_Osc_Numeric_Input.H"} {public local
  30. }
  31. decl {\#include "Fl_Osc_ListView.H"} {public local
  32. }
  33. decl {\#include "Fl_Osc_Pane.H"} {public local
  34. }
  35. decl {\#include "../globals.h"} {public local
  36. }
  37. decl {\#include "../Misc/Util.h"} {public local
  38. }
  39. decl {using namespace zyncarla;} {public local
  40. }
  41. class ConfigUI {} {
  42. Function {make_window()} {} {
  43. Fl_Window configwindow {
  44. label {ZynAddSubFX Settings}
  45. callback {o->hide();}
  46. xywh {554 443 510 370} type Double visible
  47. class Fl_Osc_Window
  48. } {
  49. Fl_Box dummy {
  50. xywh {25 25 25 25}
  51. code0 {configwindow->init(osc, "/config/");}
  52. }
  53. Fl_Tabs {} {
  54. xywh {5 5 500 330}
  55. } {
  56. Fl_Group mainsettings {
  57. label {Main settings}
  58. xywh {5 25 500 310}
  59. } {
  60. Fl_Group {} {
  61. label {Sample Rate}
  62. xywh {15 45 165 30} box ENGRAVED_FRAME
  63. } {
  64. Fl_Input samplerateinput {
  65. xywh {115 50 60 20} type Int textfont 1
  66. code0 {o->init("cfg.SampleRate");}
  67. class Fl_Osc_Numeric_Input
  68. }
  69. }
  70. Fl_Input {} {
  71. label {Buffer Size}
  72. tooltip {Internal Sound Buffer Size (samples)} xywh {190 45 60 20} type Int labelsize 11 align 129 textfont 1
  73. code0 {o->init("cfg.SoundBufferSize");}
  74. class Fl_Osc_Numeric_Input
  75. }
  76. Fl_Check_Button {} {
  77. label {Swap Stereo }
  78. xywh {15 80 95 20} box NO_BOX labelsize 11
  79. code0 {o->init("cfg.SwapStereo");}
  80. class Fl_Osc_Check
  81. }
  82. Fl_Choice oscilsize_widget {
  83. label OscilSize
  84. callback{
  85. oscilsize->updateVal((int)(o->value()+7));
  86. }
  87. tooltip {ADSynth Oscillator Size (samples)} xywh {175 80 75 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 10
  88. } {
  89. MenuItem {} {
  90. label 128
  91. xywh {25 25 100 20} labelfont 1
  92. }
  93. MenuItem {} {
  94. label 256
  95. xywh {35 35 100 20} labelfont 1
  96. }
  97. MenuItem {} {
  98. label 512
  99. xywh {45 45 100 20} labelfont 1
  100. }
  101. MenuItem {} {
  102. label 1024
  103. xywh {45 45 100 20} labelfont 1
  104. }
  105. MenuItem {} {
  106. label 2048
  107. xywh {55 55 100 20} labelfont 1
  108. }
  109. MenuItem {} {
  110. label 4096
  111. xywh {55 55 100 20} labelfont 1
  112. }
  113. MenuItem {} {
  114. label 8192
  115. xywh {65 65 100 20} labelfont 1
  116. }
  117. MenuItem {} {
  118. label 16384
  119. xywh {75 75 100 20} labelfont 1
  120. }
  121. }
  122. Fl_Box {} {
  123. label {Most settings has effect only after ZynAddSubFX is restarted.}
  124. xywh {10 300 235 30} labelfont 1 labelsize 11 align 128
  125. }
  126. Fl_Counter {} {
  127. label {XML compression level}
  128. tooltip {gzip compression level (0 - uncompressed)} xywh {20 215 65 15} type Simple labelsize 11 align 8 minimum 0 maximum 9 step 1
  129. code0 {o->init("cfg.GzipCompression");}
  130. class Fl_Osc_Counter
  131. }
  132. Fl_Choice {} {
  133. label {PADsynth Interpolation}
  134. xywh {175 105 75 15} down_box BORDER_BOX labelsize 10 textsize 11
  135. code0 {o->init("cfg.Interpolation");}
  136. class Fl_Osc_Choice
  137. } {
  138. MenuItem {} {
  139. label {Linear(fast)}
  140. xywh {0 0 100 20} labelfont 1 labelsize 10
  141. }
  142. MenuItem {} {
  143. label {Cubic(slow)}
  144. xywh {10 10 100 20} labelfont 1 labelsize 10
  145. }
  146. }
  147. Fl_Choice {} {
  148. label {Virtual Keyboard Layout}
  149. xywh {155 235 85 20} down_box BORDER_BOX labelsize 12 textfont 1 textsize 11
  150. code0 {o->init("cfg.VirKeybLayout");}
  151. class Fl_Osc_Choice
  152. } {
  153. MenuItem {} {
  154. label { }
  155. xywh {5 5 100 20} labelfont 1 labelsize 11 deactivate
  156. }
  157. MenuItem {} {
  158. label QWERTY
  159. xywh {15 15 100 20} labelfont 1 labelsize 11
  160. }
  161. MenuItem {} {
  162. label Dvorak
  163. xywh {25 25 100 20} labelfont 1 labelsize 11
  164. }
  165. MenuItem {} {
  166. label QWERTZ
  167. xywh {35 35 100 20} labelfont 1 labelsize 11
  168. }
  169. MenuItem {} {
  170. label AZERTY
  171. xywh {45 45 100 20} labelfont 1 labelsize 11
  172. }
  173. }
  174. Fl_Check_Button {} {
  175. label {Ignore MIDI Program Change}
  176. xywh {10 255 220 20} down_box DOWN_BOX
  177. code0 {o->init("cfg.IgnoreProgramChange");}
  178. class Fl_Osc_Check
  179. }
  180. }
  181. Fl_Group {} {
  182. label {Bank root dirs}
  183. xywh {5 25 500 285} hide
  184. } {
  185. Fl_Browser rootsbrowse {
  186. callback {activatebutton_rootdir(o->value()!=0);}
  187. xywh {15 35 485 220} type Hold
  188. code0 {o->init("cfg.bankRootDirList");}
  189. class Fl_Osc_ListView
  190. }
  191. Fl_Button {} {
  192. label {Add root directory...}
  193. callback {const char *dirname;
  194. dirname=fl_dir_chooser("Add a root directory for banks:",NULL,0);
  195. if (dirname==NULL) return;
  196. rootsbrowse->append(dirname);}
  197. xywh {15 265 80 35} box THIN_UP_BOX align 128
  198. }
  199. Fl_Button removerootdirbutton {
  200. label {Remove root dir...}
  201. callback {if (rootsbrowse->value()!=0) {
  202. rootsbrowse->doRemove(rootsbrowse->value());
  203. };
  204. activatebutton_rootdir(false);}
  205. xywh {105 265 80 35} box THIN_UP_BOX align 128
  206. code0 {o->deactivate();}
  207. }
  208. Fl_Button makedefaultrootdirbutton {
  209. label {Make default}
  210. callback {int n=rootsbrowse->value();
  211. if (n!=0) {
  212. rootsbrowse->doMove(1,n);
  213. rootsbrowse->value(1);
  214. rootsbrowse->redraw();
  215. };
  216. activatebutton_rootdir(true);}
  217. xywh {190 265 80 35} box THIN_UP_BOX align 128
  218. code0 {o->deactivate();}
  219. }
  220. }
  221. Fl_Group {} {
  222. label {Presets dirs}
  223. xywh {5 25 500 285} hide
  224. } {
  225. Fl_Browser presetbrowse {
  226. callback {activatebutton_presetdir(o->value()!=0);}
  227. xywh {15 35 485 220} type Hold
  228. code0 {o->init("cfg.presetsDirList");}
  229. class Fl_Osc_ListView
  230. }
  231. Fl_Button {} {
  232. label {Add preset directory...}
  233. callback {const char *dirname;
  234. dirname=fl_dir_chooser("Add a preset directory :",NULL,0);
  235. if (dirname==NULL) return;
  236. presetbrowse->add(dirname);}
  237. xywh {15 265 80 35} box THIN_UP_BOX align 128
  238. }
  239. Fl_Button removepresetbutton {
  240. label {Remove preset dir...}
  241. callback {if (presetbrowse->value()!=0) {
  242. presetbrowse->remove(presetbrowse->value());
  243. };
  244. activatebutton_presetdir(false);}
  245. xywh {105 265 80 35} box THIN_UP_BOX align 128
  246. code0 {o->deactivate();}
  247. }
  248. Fl_Button makedefaultpresetbutton {
  249. label {Make default}
  250. callback {int n=presetbrowse->value();
  251. if (n!=0) {
  252. presetbrowse->move(1,n);
  253. presetbrowse->value(1);
  254. presetbrowse->redraw();
  255. };
  256. activatebutton_presetdir(true);}
  257. xywh {190 265 80 35} box THIN_UP_BOX align 128
  258. code0 {o->deactivate();}
  259. }
  260. }
  261. }
  262. Fl_Button {} {
  263. label Close
  264. callback {configwindow->hide();}
  265. xywh {200 345 105 20} box THIN_UP_BOX
  266. }
  267. }
  268. }
  269. Function {ConfigUI(Fl_Osc_Interface *osc_)} {} {
  270. code {
  271. osc = osc_;
  272. make_window();
  273. oscilsize = new Osc_IntModel(osc);
  274. oscilsize->callback = [this](int i){
  275. oscilsize_widget->value(i-7);
  276. };
  277. oscilsize->doUpdate("/config/cfg.OscilPower");
  278. } {}
  279. }
  280. Function {activatebutton_rootdir(bool active)} {} {
  281. code {if (active) {
  282. removerootdirbutton->activate();
  283. makedefaultrootdirbutton->activate();
  284. }else{
  285. removerootdirbutton->deactivate();
  286. makedefaultrootdirbutton->deactivate();
  287. };} {}
  288. }
  289. Function {activatebutton_presetdir(bool active)} {} {
  290. code {if (active) {
  291. removepresetbutton->activate();
  292. makedefaultpresetbutton->activate();
  293. }else{
  294. removepresetbutton->deactivate();
  295. makedefaultpresetbutton->deactivate();
  296. };} {}
  297. }
  298. Function {show()} {} {
  299. code {
  300. if (isPlugin) {
  301. mainsettings->deactivate();
  302. }
  303. rootsbrowse->update();
  304. presetbrowse->update();
  305. configwindow->show();
  306. } {}
  307. }
  308. decl {class Fl_Osc_Interface *osc;} {public local
  309. }
  310. decl {class Osc_IntModel *oscilsize;} {public local
  311. }
  312. }