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.

330 lines
9.3KB

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