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.

581 lines
16KB

  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 "Track.H" // for capture_format} {}
  14. decl {\#include "Audio_File.H" // for supported formats} {}
  15. decl {\#include "Waveform.H" // for options} {}
  16. decl {\#include "Region.H" // for options} {}
  17. decl {\#include "Control_Sequence.H" // for options} {}
  18. decl {\#include <FL/fl_ask.H>} {}
  19. decl {\#include <FL/Fl.H>} {}
  20. decl {extern char *user_config_dir;} {global
  21. }
  22. class TLE {open
  23. } {
  24. decl {Fl_Color system_colors[3];} {public
  25. }
  26. decl {static void menubar_cb ( void *v )} {}
  27. decl {void menubar_cb ( void )} {}
  28. Function {menu_picked_value( const Fl_Menu_ *m )} {open return_type {static int}
  29. } {
  30. code {return m->menu()[ m->value() ].flags & FL_MENU_VALUE;} {}
  31. }
  32. Function {save()} {open
  33. } {
  34. code {const char options_filename[] = "options";
  35. // const char state_filename[] = "state";
  36. // save options
  37. char *path;
  38. asprintf( &path, "%s/%s", user_config_dir, options_filename );
  39. ((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options" ), path );
  40. free( path );
  41. // save unjournaled state
  42. // Loggable::save_unjournaled( state_filename );} {}
  43. }
  44. Function {capture_format_cb( Fl_Widget *w, void *v )} {open private return_type {static void}
  45. } {
  46. code {((TLE*)v)->capture_format_cb();} {}
  47. }
  48. Function {capture_format_cb()} {open private return_type void
  49. } {
  50. code {Fl_Menu_ *o = menubar;
  51. Track::capture_format = o->menu()[ o->value() ].label();} {}
  52. }
  53. Function {TLE()} {open
  54. } {
  55. code {make_window();
  56. // Fl::visual( RGB8 );
  57. Fl::visible_focus( 0 );
  58. Fl::get_system_colors();
  59. Fl::scheme( "plastic" );
  60. system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR );
  61. system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR );
  62. system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR );
  63. Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
  64. std::list <const char *> formats;
  65. Audio_File::all_supported_formats( formats );
  66. for ( std::list <const char *>::const_iterator f = formats.begin(); f != formats.end(); ++f )
  67. {
  68. // capture_format_menu->add( *f, FL_MENU_RADIO, 0, 0, 0 );
  69. //;
  70. char pat[256];
  71. snprintf( pat, sizeof( pat ), "Timeline/Capture Format/%s", *f );
  72. menubar->add( pat, 0, &TLE::capture_format_cb, this, FL_MENU_RADIO );
  73. }
  74. char *path;
  75. asprintf( &path, "%s/options", user_config_dir );
  76. ((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options" ), path );
  77. free( path );} {}
  78. }
  79. Function {make_window()} {open
  80. } {
  81. Fl_Window main_window {
  82. label {Non-DAW - Timeline} open
  83. xywh {577 50 1024 768} type Double resizable xclass {Non-DAW} visible
  84. } {
  85. Fl_Menu_Bar menubar {open
  86. xywh {0 0 1024 25}
  87. } {
  88. Submenu {} {
  89. label {&Session} open
  90. xywh {0 0 74 25}
  91. } {
  92. MenuItem {} {
  93. label {&New}
  94. xywh {0 0 40 25} deactivate
  95. }
  96. MenuItem {} {
  97. label {&Open}
  98. xywh {10 10 40 25} deactivate
  99. }
  100. MenuItem {} {
  101. label {&Compact}
  102. 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" );
  103. if ( n != 2 )
  104. return;
  105. Loggable::compact();}
  106. xywh {20 20 40 25}
  107. }
  108. Submenu {} {
  109. label Export open
  110. xywh {0 0 74 25} deactivate
  111. } {
  112. MenuItem {} {
  113. label Session
  114. xywh {0 0 40 25}
  115. }
  116. MenuItem {} {
  117. label Range
  118. xywh {10 10 40 25}
  119. }
  120. }
  121. MenuItem {} {
  122. label {&Quit}
  123. callback {save();
  124. exit( 0 );}
  125. xywh {40 40 40 25} shortcut 0x40071
  126. }
  127. }
  128. Submenu {} {
  129. label {&Edit} open
  130. xywh {0 0 74 25}
  131. } {
  132. MenuItem {} {
  133. label Undo
  134. callback {Loggable::undo();}
  135. xywh {0 0 40 25} shortcut 0x4007a
  136. }
  137. }
  138. Submenu {} {
  139. label Transport open
  140. xywh {0 0 74 25}
  141. } {
  142. MenuItem {} {
  143. label Start
  144. callback {transport->locate( 0 );}
  145. xywh {0 0 40 25} shortcut 0xff50
  146. }
  147. MenuItem {} {
  148. label End
  149. callback {transport->locate( timeline->length() );}
  150. xywh {10 10 40 25} shortcut 0xff57
  151. }
  152. MenuItem {} {
  153. label Stop
  154. callback {transport->stop();}
  155. xywh {20 20 40 25} shortcut 0x50073
  156. }
  157. MenuItem {} {
  158. label Play
  159. callback {transport->start();}
  160. xywh {30 30 40 25} shortcut 0x50070
  161. }
  162. MenuItem {} {
  163. label Record
  164. callback {transport->toggle_record();}
  165. xywh {40 40 40 25} shortcut 0x50072
  166. }
  167. }
  168. Submenu {} {
  169. label {&View} open
  170. xywh {0 0 74 25}
  171. } {
  172. Submenu {} {
  173. label {&Zoom} open
  174. xywh {0 0 74 25}
  175. } {
  176. MenuItem {} {
  177. label {&In}
  178. callback {timeline->zoom_in();}
  179. xywh {20 20 40 25}
  180. }
  181. MenuItem {} {
  182. label {&Out}
  183. callback {timeline->zoom_out();}
  184. xywh {30 30 40 25}
  185. }
  186. MenuItem {} {
  187. label {&Fit}
  188. xywh {10 10 40 25} divider
  189. }
  190. MenuItem {} {
  191. label {1 sec.}
  192. callback {timeline->zoom( 1 );}
  193. xywh {10 10 40 25} shortcut 0x31
  194. }
  195. MenuItem {} {
  196. label {1 min.}
  197. callback {timeline->zoom( 60 );}
  198. xywh {20 20 40 25} shortcut 0x32
  199. }
  200. MenuItem {} {
  201. label {1 hour.}
  202. callback {timeline->zoom( 60 * 60 );}
  203. xywh {30 30 40 25} shortcut 0x33
  204. }
  205. }
  206. }
  207. Submenu timeline_menu {
  208. label {&Timeline} open
  209. xywh {0 0 74 25}
  210. } {
  211. Submenu {} {
  212. label {&Snap} open
  213. xywh {0 0 74 25}
  214. } {
  215. MenuItem {} {
  216. label Bars
  217. callback {Timeline::snap_to = Timeline::Bars;}
  218. xywh {0 0 40 25} type Radio value 1
  219. }
  220. MenuItem {} {
  221. label Beats
  222. callback {Timeline::snap_to = Timeline::Beats;}
  223. xywh {10 10 40 25} type Radio
  224. }
  225. MenuItem {} {
  226. label Off
  227. callback {Timeline::snap_to = Timeline::None;}
  228. xywh {20 20 40 25} type Radio
  229. }
  230. }
  231. Submenu {} {
  232. label {Capture Format} open
  233. xywh {0 0 74 25}
  234. } {}
  235. }
  236. Submenu {} {
  237. label {&Options} open
  238. xywh {0 0 74 25} divider
  239. } {
  240. Submenu {} {
  241. label {&Display} open
  242. xywh {0 0 74 25}
  243. } {
  244. Submenu {} {
  245. label {&Timeline} open
  246. xywh {0 0 74 25}
  247. } {
  248. MenuItem {} {
  249. label {&Measure lines}
  250. callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
  251. timeline->redraw();}
  252. xywh {0 0 40 25} type Toggle value 1
  253. }
  254. }
  255. Submenu {} {
  256. label {&Waveforms} open
  257. xywh {0 0 74 25}
  258. } {
  259. MenuItem {} {
  260. label Fill
  261. callback {Waveform::fill = menu_picked_value( o );
  262. timeline->redraw();}
  263. xywh {10 10 40 25} type Toggle value 1
  264. }
  265. MenuItem {} {
  266. label Outline
  267. callback {Waveform::outline = menu_picked_value( o );
  268. timeline->redraw();}
  269. xywh {30 30 40 25} type Toggle value 1
  270. }
  271. MenuItem {} {
  272. label {Vary color}
  273. callback {Waveform::vary_color = menu_picked_value( o );
  274. timeline->redraw();}
  275. xywh {20 20 40 25} type Toggle value 1
  276. }
  277. }
  278. Submenu {} {
  279. label {&Region} open
  280. xywh {0 0 74 25}
  281. } {
  282. MenuItem {} {
  283. label {Filled fades}
  284. xywh {30 30 40 25} type Toggle value 1
  285. }
  286. MenuItem {} {
  287. label {Inherit track color}
  288. callback {Region::inherit_track_color = menu_picked_value( o );
  289. timeline->redraw();}
  290. xywh {40 40 40 25} type Toggle value 1
  291. }
  292. }
  293. Submenu {} {
  294. label {&Control Sequence} open
  295. xywh {0 0 74 25}
  296. } {
  297. MenuItem {} {
  298. label Polygon
  299. callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
  300. timeline->redraw();}
  301. xywh {20 20 40 25} type Toggle value 1
  302. }
  303. MenuItem {} {
  304. label Graded
  305. callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
  306. timeline->redraw();}
  307. xywh {30 30 40 25} type Toggle value 1
  308. }
  309. MenuItem {} {
  310. label Ruled
  311. callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
  312. timeline->redraw();}
  313. xywh {40 40 40 25} type Toggle value 1
  314. }
  315. }
  316. Submenu {} {
  317. label {&Style} open
  318. xywh {0 0 74 25}
  319. } {
  320. MenuItem {} {
  321. label Default
  322. callback {Fl::scheme( "plastic" );}
  323. xywh {0 0 40 25} type Radio value 1
  324. }
  325. MenuItem {} {
  326. label Flat
  327. callback {Fl::scheme( "gtk+" );}
  328. xywh {10 10 40 25} type Radio
  329. }
  330. }
  331. Submenu {} {
  332. label {C&olors} open
  333. xywh {0 0 74 25}
  334. } {
  335. MenuItem {} {
  336. label System
  337. callback {//Fl::get_system_colors();
  338. unsigned char r, g, b;
  339. Fl::get_color( system_colors[ 0 ], r, g, b );
  340. Fl::background( r, g, b );
  341. Fl::get_color( system_colors[ 1 ], r, g, b );
  342. Fl::foreground( r, g, b );
  343. Fl::get_color( system_colors[ 2 ], r, g, b );
  344. Fl::background2( r, g, b );
  345. Fl::scheme( Fl::scheme() );}
  346. xywh {0 0 40 25} type Radio
  347. }
  348. MenuItem {} {
  349. label Dark
  350. callback {Fl::background2( 100, 100, 100 );
  351. Fl::background( 50, 50, 50 );
  352. Fl::foreground( 255, 255, 255 );
  353. Fl::scheme( Fl::scheme() );}
  354. xywh {10 10 40 25} type Radio value 1
  355. }
  356. MenuItem {} {
  357. label Light
  358. callback {Fl::background2( 192, 192, 192 );
  359. Fl::background( 220, 220, 220 );
  360. Fl::foreground( 0, 0, 0 );
  361. Fl::scheme( Fl::scheme() );} selected
  362. xywh {20 20 40 25} type Radio
  363. }
  364. }
  365. }
  366. }
  367. Submenu {} {
  368. label {&Help} open
  369. xywh {0 0 74 25}
  370. } {
  371. MenuItem {} {
  372. label {&About}
  373. callback {Fl_Window *win = make_about_dialog();
  374. win->show();
  375. while ( win->shown() )
  376. Fl::wait();
  377. delete win;}
  378. xywh {0 0 40 25}
  379. }
  380. }
  381. }
  382. Fl_Group {} {open
  383. xywh {0 23 1024 48}
  384. } {
  385. Fl_Pack {} {open
  386. xywh {0 23 473 46} type HORIZONTAL
  387. code0 {o->spacing( 10 );}
  388. } {
  389. Fl_Box {} {
  390. label {<Transport>}
  391. xywh {0 23 184 46} color 30
  392. code0 {transport = o;}
  393. code1 {o->labeltype( FL_NO_LABEL );}
  394. class Transport
  395. }
  396. Fl_Pack clocks_pack {open
  397. xywh {185 23 288 46} type HORIZONTAL
  398. code0 {o->spacing( 2 );}
  399. } {
  400. Fl_Box playhead_clock {
  401. label PLAYHEAD
  402. xywh {185 29 137 40} box BORDER_BOX color 40
  403. code0 {o->type( Clock::HMS );}
  404. code1 {o->run( &transport->frame );}
  405. class Clock
  406. }
  407. Fl_Box {} {
  408. label PLAYHEAD
  409. xywh {325 29 142 40} box BORDER_BOX color 40
  410. code0 {o->type( Clock::BBT );}
  411. code1 {o->run( &transport->frame );}
  412. class Clock
  413. }
  414. }
  415. }
  416. Fl_Box {} {
  417. label {<empty>}
  418. xywh {477 27 387 42} resizable
  419. code0 {o->labeltype( FL_NO_LABEL );}
  420. }
  421. Fl_Group {} {
  422. xywh {869 25 155 44}
  423. } {
  424. Fl_Box {} {
  425. label {capture:}
  426. xywh {869 25 56 14} labelsize 10 align 24
  427. }
  428. Fl_Box {} {
  429. label {playback:}
  430. xywh {869 41 56 14} labelsize 10 align 24
  431. }
  432. Fl_Box {} {
  433. label {DSP:}
  434. xywh {869 55 56 14} labelsize 10 align 24
  435. }
  436. Fl_Progress capture_buffer_progress {
  437. label {50%}
  438. xywh {925 25 99 14} labelsize 10
  439. }
  440. Fl_Progress cpu_load_progress {
  441. label {50%}
  442. xywh {925 55 99 14} labelsize 9
  443. }
  444. Fl_Progress playback_buffer_progress {
  445. label {50%}
  446. xywh {925 40 99 14} labelsize 10
  447. }
  448. }
  449. }
  450. Fl_Box {} {
  451. label {<Timeline>}
  452. xywh {0 72 1024 695} box FLAT_BOX color 47 labelsize 100 resizable
  453. code0 {timeline = o;}
  454. class Timeline
  455. }
  456. }
  457. }
  458. Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void}
  459. } {
  460. code {p->value( v );
  461. snprintf( s, 5, "%d%%", (int)v );
  462. p->label( s );} {}
  463. }
  464. Function {update_status()} {open
  465. } {
  466. code {static char cbp[5], pbp[5], clp[5];
  467. update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_percent() );
  468. update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
  469. update_progress( cpu_load_progress, clp, engine->cpu_load() );} {}
  470. }
  471. Function {update_cb( void *v )} {open return_type {static void}
  472. } {
  473. code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
  474. ((TLE*)v)->update_status();} {}
  475. }
  476. Function {make_about_dialog()} {open
  477. } {
  478. Fl_Window {} {
  479. label About open
  480. xywh {1082 94 498 529} type Double visible
  481. } {
  482. Fl_Tabs {} {open
  483. xywh {-4 122 507 419}
  484. } {
  485. Fl_Group {} {
  486. label Credits open
  487. xywh {-4 147 507 394}
  488. } {
  489. Fl_Box {} {
  490. label {Non-DAW was written from scratch by
  491. Jonathan Moore Liles for his own use
  492. (see the manual).
  493. Nobody planned. Nobody helped.
  494. You can help now by donating time, money,
  495. and/or replacing the rest of Linux Audio
  496. with fast, light, reliable alternatives.}
  497. xywh {42 203 416 260} labelsize 17
  498. }
  499. }
  500. Fl_Group {} {
  501. label License open
  502. xywh {-1 157 504 384} hide
  503. } {
  504. Fl_Box {} {
  505. label {Copyright (C) 2008 Jonathan Moore Liles
  506. This software is released under version 3
  507. of the GNU General Public License (GPLv3).}
  508. xywh {45 213 403 83} labelsize 17
  509. }
  510. }
  511. }
  512. Fl_Box {} {
  513. label {the Non-DAW (Digital Audio Workstation)}
  514. image {../logo-small.png} xywh {-1 1 499 115} align 16
  515. }
  516. }
  517. }
  518. }