Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
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.

429 lines
12KB

  1. # data file for the Fltk User Interface Designer (fluid)
  2. version 1.0108
  3. header_name {.H}
  4. code_name {.C}
  5. decl {const float STATUS_UPDATE_FREQ = 0.5f;} {}
  6. decl {\#include "Fl_Menu_Settings.H"} {}
  7. decl {\#include "Timeline.H"} {}
  8. decl {\#include "Engine.H"} {}
  9. decl {\#include "Transport.H"} {}
  10. decl {\#include "Loggable.H"} {}
  11. decl {\#include "Clock.H"} {public
  12. }
  13. decl {\#include "Waveform.H" // for options} {}
  14. decl {\#include "Control_Sequence.H" // for options} {}
  15. decl {\#include <FL/fl_ask.H>} {}
  16. decl {\#include <FL/Fl.H>} {}
  17. decl {extern char *user_config_dir;} {global
  18. }
  19. class TLE {open
  20. } {
  21. decl {static void menubar_cb ( void *v )} {}
  22. decl {void menubar_cb ( void )} {}
  23. Function {menu_picked_value( const Fl_Menu_ *m )} {open return_type {static int}
  24. } {
  25. code {return m->menu()[ m->value() ].flags & FL_MENU_VALUE;} {}
  26. }
  27. Function {TLE()} {open
  28. } {
  29. code {make_window();
  30. // Fl::visual( RGB8 );
  31. Fl::visible_focus( 0 );
  32. Fl::get_system_colors();
  33. Fl::scheme( "plastic" );
  34. Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
  35. char *path;
  36. asprintf( &path, "%s/options", user_config_dir );
  37. ((Fl_Menu_Settings*)menubar)->load( options_menu, path );
  38. free( path );} {}
  39. }
  40. Function {make_window()} {open
  41. } {
  42. Fl_Window main_window {
  43. label {Non-DAW - Timeline} open
  44. xywh {522 141 1024 768} type Double resizable xclass {Non-DAW} visible
  45. } {
  46. Fl_Menu_Bar menubar {
  47. label {capture:\\nfoo} open
  48. xywh {0 0 1024 25}
  49. } {
  50. Submenu {} {
  51. label {&Session} open
  52. xywh {0 0 74 25}
  53. } {
  54. MenuItem {} {
  55. label {&New}
  56. xywh {0 0 40 25}
  57. }
  58. MenuItem {} {
  59. label {&Open}
  60. xywh {10 10 40 25}
  61. }
  62. MenuItem {} {
  63. label {&Compact}
  64. callback {int n = fl_choice( "Compacting will replace the session history with a snapshot of the current state.\\n You will not be able to use Undo to go back beyond this point.\\n This operation is irreversible!", NULL, "Abort", "Procede with compaction" );
  65. if ( n != 2 )
  66. return;
  67. Loggable::compact();}
  68. xywh {20 20 40 25}
  69. }
  70. Submenu {} {
  71. label Export open
  72. xywh {0 0 74 25}
  73. } {
  74. MenuItem {} {
  75. label Session
  76. xywh {0 0 40 25}
  77. }
  78. MenuItem {} {
  79. label Range
  80. xywh {10 10 40 25}
  81. }
  82. }
  83. MenuItem {} {
  84. label {&Quit}
  85. callback {char *path;
  86. asprintf( &path, "%s/options", user_config_dir );
  87. ((Fl_Menu_Settings*)menubar)->dump( options_menu, path );
  88. free( path );
  89. exit( 0 );}
  90. xywh {40 40 40 25} shortcut 0x40071
  91. }
  92. }
  93. Submenu {} {
  94. label {&Edit} open
  95. xywh {0 0 74 25}
  96. } {
  97. MenuItem {} {
  98. label Preferences
  99. xywh {0 0 40 25}
  100. }
  101. MenuItem {} {
  102. label Undo
  103. xywh {0 0 40 25} shortcut 0x4007a
  104. }
  105. }
  106. Submenu {} {
  107. label Transport open
  108. xywh {0 0 74 25}
  109. } {
  110. MenuItem {} {
  111. label Home
  112. callback {transport->locate( 0 );}
  113. xywh {0 0 40 25} shortcut 0xff50
  114. }
  115. MenuItem {} {
  116. label End
  117. callback {transport->locate( timeline->length() );}
  118. xywh {10 10 40 25} shortcut 0xff57
  119. }
  120. MenuItem {} {
  121. label Stop
  122. callback {transport->stop();}
  123. xywh {20 20 40 25} shortcut 0x50073
  124. }
  125. MenuItem {} {
  126. label Play
  127. callback {transport->start();}
  128. xywh {30 30 40 25} shortcut 0x50070
  129. }
  130. MenuItem {} {
  131. label Record
  132. xywh {40 40 40 25} shortcut 0x50072
  133. }
  134. }
  135. Submenu {} {
  136. label {&View} open
  137. xywh {0 0 74 25}
  138. } {
  139. Submenu {} {
  140. label {&Zoom} open
  141. xywh {0 0 74 25}
  142. } {
  143. MenuItem {} {
  144. label {&In}
  145. callback {timeline->zoom_in();}
  146. xywh {20 20 40 25}
  147. }
  148. MenuItem {} {
  149. label {&Out}
  150. callback {timeline->zoom_out();}
  151. xywh {30 30 40 25}
  152. }
  153. MenuItem {} {
  154. label {&Fit}
  155. xywh {10 10 40 25} divider
  156. }
  157. MenuItem {} {
  158. label {1 sec.}
  159. callback {timeline->zoom( 1 );}
  160. xywh {10 10 40 25} shortcut 0x31
  161. }
  162. MenuItem {} {
  163. label {1 min.}
  164. callback {timeline->zoom( 60 );}
  165. xywh {20 20 40 25} shortcut 0x32
  166. }
  167. MenuItem {} {
  168. label {1 hour.}
  169. callback {timeline->zoom( 60 * 60 );}
  170. xywh {30 30 40 25} shortcut 0x33
  171. }
  172. }
  173. }
  174. Submenu options_menu {
  175. label {&Options} open
  176. xywh {0 0 74 25} divider
  177. } {
  178. Submenu {} {
  179. label {&Display} open
  180. xywh {0 0 74 25}
  181. } {
  182. Submenu {} {
  183. label {&Timeline} open
  184. xywh {0 0 74 25}
  185. } {
  186. MenuItem {} {
  187. label {&Measure lines}
  188. callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
  189. timeline->redraw();}
  190. xywh {0 0 40 25} type Toggle value 1
  191. }
  192. }
  193. Submenu {} {
  194. label {&Waveforms} open
  195. xywh {0 0 74 25}
  196. } {
  197. MenuItem {} {
  198. label Fill
  199. callback {Waveform::fill = menu_picked_value( o );
  200. timeline->redraw();}
  201. xywh {10 10 40 25} type Toggle value 1
  202. }
  203. MenuItem {} {
  204. label Outline
  205. callback {Waveform::outline = menu_picked_value( o );
  206. timeline->redraw();}
  207. xywh {30 30 40 25} type Toggle value 1
  208. }
  209. MenuItem {} {
  210. label {Vary color}
  211. callback {Waveform::vary_color = menu_picked_value( o );
  212. timeline->redraw();}
  213. xywh {20 20 40 25} type Toggle value 1
  214. }
  215. }
  216. Submenu {} {
  217. label {&Region} open
  218. xywh {0 0 74 25}
  219. } {
  220. MenuItem {} {
  221. label {Filled fades}
  222. xywh {30 30 40 25} type Toggle value 1
  223. }
  224. }
  225. Submenu {} {
  226. label {&Control Sequence} open
  227. xywh {0 0 74 25}
  228. } {
  229. MenuItem {} {
  230. label Polygon
  231. callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
  232. timeline->redraw();}
  233. xywh {20 20 40 25} type Toggle value 1
  234. }
  235. MenuItem {} {
  236. label Graded
  237. callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
  238. timeline->redraw();}
  239. xywh {30 30 40 25} type Toggle value 1
  240. }
  241. MenuItem {} {
  242. label Ruled
  243. callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
  244. timeline->redraw();}
  245. xywh {40 40 40 25} type Toggle value 1
  246. }
  247. }
  248. Submenu {} {
  249. label {&Style} open
  250. xywh {0 0 74 25}
  251. } {
  252. MenuItem {} {
  253. label Default
  254. callback {Fl::scheme( "plastic" );}
  255. xywh {0 0 40 25} type Radio value 1
  256. }
  257. MenuItem {} {
  258. label Flat
  259. callback {Fl::scheme( "gtk+" );}
  260. xywh {10 10 40 25} type Radio
  261. }
  262. }
  263. Submenu {} {
  264. label {C&olors} open
  265. xywh {0 0 74 25}
  266. } {
  267. MenuItem {} {
  268. label System
  269. callback {Fl::get_system_colors();
  270. Fl::scheme( Fl::scheme() );}
  271. xywh {0 0 40 25} type Radio
  272. }
  273. MenuItem {} {
  274. label Dark
  275. callback {Fl::background2( 100, 100, 100 );
  276. Fl::background( 50, 50, 50 );
  277. Fl::foreground( 255, 255, 255 );
  278. Fl::scheme( Fl::scheme() );}
  279. xywh {10 10 40 25} type Radio value 1
  280. }
  281. MenuItem {} {
  282. label Light
  283. callback {Fl::background2( 255, 255, 255 );
  284. Fl::background( 172, 172, 172 );
  285. Fl::foreground( 0, 0, 0 );
  286. Fl::scheme( Fl::scheme() );}
  287. xywh {20 20 40 25} type Radio
  288. }
  289. }
  290. }
  291. }
  292. MenuItem {} {
  293. label {&Help}
  294. xywh {0 0 40 25}
  295. }
  296. }
  297. Fl_Group {} {open
  298. xywh {0 23 1024 48}
  299. } {
  300. Fl_Pack {} {open
  301. xywh {0 23 473 46} type HORIZONTAL
  302. code0 {o->spacing( 10 );}
  303. } {
  304. Fl_Box {} {
  305. label {<Transport>}
  306. xywh {0 23 184 46} color 30
  307. code0 {transport = o;}
  308. code1 {o->labeltype( FL_NO_LABEL );}
  309. class Transport
  310. }
  311. Fl_Pack clocks_pack {open
  312. xywh {185 23 288 46} type HORIZONTAL
  313. code0 {o->spacing( 2 );}
  314. } {
  315. Fl_Box playhead_clock {
  316. label PLAYHEAD
  317. xywh {185 29 137 40} box BORDER_BOX color 46
  318. code0 {o->type( Clock::HMS );}
  319. code1 {o->run( &transport->frame );}
  320. class Clock
  321. }
  322. Fl_Box {} {
  323. label PLAYHEAD selected
  324. xywh {325 29 142 40} box BORDER_BOX color 46
  325. code0 {o->type( Clock::BBT );}
  326. code1 {o->run( &transport->frame );}
  327. class Clock
  328. }
  329. }
  330. }
  331. Fl_Box {} {
  332. label {<empty>}
  333. xywh {477 27 387 42} resizable
  334. code0 {o->labeltype( FL_NO_LABEL );}
  335. }
  336. Fl_Group {} {
  337. xywh {869 25 155 44}
  338. } {
  339. Fl_Box {} {
  340. label {capture:}
  341. xywh {869 25 56 14} labelsize 10 align 24
  342. }
  343. Fl_Box {} {
  344. label {playback:}
  345. xywh {869 41 56 14} labelsize 10 align 24
  346. }
  347. Fl_Box {} {
  348. label {DSP:}
  349. xywh {869 55 56 14} labelsize 10 align 24
  350. }
  351. Fl_Progress capture_buffer_progress {
  352. label {50%}
  353. xywh {925 25 99 14} labelsize 10
  354. }
  355. Fl_Progress cpu_load_progress {
  356. label {50%}
  357. xywh {925 55 99 14} labelsize 9
  358. }
  359. Fl_Progress playback_buffer_progress {
  360. label {50%}
  361. xywh {925 40 99 14} labelsize 10
  362. }
  363. }
  364. }
  365. Fl_Box {} {
  366. label {<Timeline>}
  367. xywh {0 72 1024 695} box FLAT_BOX color 47 labelsize 100 resizable
  368. code0 {timeline = o;}
  369. class Timeline
  370. }
  371. }
  372. }
  373. Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void}
  374. } {
  375. code {p->value( v );
  376. snprintf( s, 5, "%d%%", (int)v );
  377. p->label( s );} {}
  378. }
  379. Function {update_status()} {open
  380. } {
  381. code {static char cbp[5], pbp[5], clp[5];
  382. update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_percent() );
  383. update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
  384. update_progress( cpu_load_progress, clp, engine->cpu_load() );} {}
  385. }
  386. Function {update_cb( void *v )} {open return_type {static void}
  387. } {
  388. code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
  389. ((TLE*)v)->update_status();} {}
  390. }
  391. }
  392. Function {make_window()} {open
  393. } {}