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.

618 lines
17KB

  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 94 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. printf( "dropped %d buffers\\n", engine->dropped() );
  125. exit( 0 );} selected
  126. xywh {40 40 40 25} shortcut 0x40071
  127. }
  128. }
  129. Submenu {} {
  130. label {&Edit} open
  131. xywh {0 0 74 25}
  132. } {
  133. MenuItem {} {
  134. label Undo
  135. callback {Loggable::undo();}
  136. xywh {0 0 40 25} shortcut 0x4007a divider
  137. }
  138. MenuItem {} {
  139. label {Select None}
  140. callback {timeline->select_none();}
  141. xywh {10 10 40 25} shortcut 0x50061
  142. }
  143. MenuItem {} {
  144. label {Delete Selected}
  145. callback {timeline->delete_selected();}
  146. xywh {20 20 40 25} shortcut 0xffff
  147. }
  148. }
  149. Submenu {} {
  150. label Transport open
  151. xywh {0 0 74 25}
  152. } {
  153. MenuItem {} {
  154. label Start
  155. callback {transport->locate( 0 );}
  156. xywh {0 0 40 25} shortcut 0xff50
  157. }
  158. MenuItem {} {
  159. label End
  160. callback {transport->locate( timeline->length() );}
  161. xywh {10 10 40 25} shortcut 0xff57
  162. }
  163. MenuItem {} {
  164. label {Play/Stop}
  165. callback {transport->toggle();}
  166. xywh {20 20 40 25} shortcut 0x20
  167. }
  168. MenuItem {} {
  169. label Record
  170. callback {transport->toggle_record();}
  171. xywh {40 40 40 25} shortcut 0x10072
  172. }
  173. }
  174. Submenu {} {
  175. label {&View} open
  176. xywh {0 0 74 25}
  177. } {
  178. Submenu {} {
  179. label {&Zoom} open
  180. xywh {0 0 74 25}
  181. } {
  182. MenuItem {} {
  183. label {&In}
  184. callback {timeline->zoom_in();}
  185. xywh {20 20 40 25}
  186. }
  187. MenuItem {} {
  188. label {&Out}
  189. callback {timeline->zoom_out();}
  190. xywh {30 30 40 25}
  191. }
  192. MenuItem {} {
  193. label {&Fit}
  194. xywh {10 10 40 25} divider
  195. }
  196. MenuItem {} {
  197. label {1 sec.}
  198. callback {timeline->zoom( 1 );}
  199. xywh {10 10 40 25} shortcut 0x31
  200. }
  201. MenuItem {} {
  202. label {1 min.}
  203. callback {timeline->zoom( 60 );}
  204. xywh {20 20 40 25} shortcut 0x32
  205. }
  206. MenuItem {} {
  207. label {1 hour.}
  208. callback {timeline->zoom( 60 * 60 );}
  209. xywh {30 30 40 25} shortcut 0x33
  210. }
  211. }
  212. }
  213. Submenu timeline_menu {
  214. label {&Timeline}
  215. xywh {0 0 74 25}
  216. } {
  217. MenuItem {} {
  218. label {&Follow Playhead}
  219. callback {Timeline::follow_playhead = menu_picked_value( o );}
  220. xywh {20 20 40 25} type Toggle value 1
  221. }
  222. MenuItem {} {
  223. label {&Center Playhead}
  224. callback {Timeline::center_playhead = menu_picked_value( o );}
  225. xywh {30 30 40 25} type Toggle value 1
  226. }
  227. Submenu {} {
  228. label {&Snap to} open
  229. xywh {0 0 74 25}
  230. } {
  231. MenuItem {} {
  232. label Bars
  233. callback {Timeline::snap_to = Timeline::Bars;}
  234. xywh {0 0 40 25} type Radio value 1
  235. }
  236. MenuItem {} {
  237. label Beats
  238. callback {Timeline::snap_to = Timeline::Beats;}
  239. xywh {10 10 40 25} type Radio
  240. }
  241. MenuItem {} {
  242. label Off
  243. callback {Timeline::snap_to = Timeline::None;}
  244. xywh {20 20 40 25} type Radio
  245. }
  246. }
  247. MenuItem {} {
  248. label {Magnetic snap}
  249. callback {Timeline::snap_magnetic = menu_picked_value( o );}
  250. xywh {10 10 40 25} type Toggle value 1
  251. }
  252. Submenu {} {
  253. label {Capture Format} open
  254. xywh {0 0 74 25}
  255. } {}
  256. }
  257. Submenu {} {
  258. label {&Options} open
  259. xywh {0 0 74 25} divider
  260. } {
  261. Submenu {} {
  262. label {&Display} open
  263. xywh {0 0 74 25}
  264. } {
  265. Submenu {} {
  266. label {&Timeline} open
  267. xywh {0 0 74 25}
  268. } {
  269. MenuItem {} {
  270. label {&Measure lines}
  271. callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
  272. timeline->redraw();}
  273. xywh {0 0 40 25} type Toggle value 1
  274. }
  275. }
  276. Submenu {} {
  277. label {&Waveforms} open
  278. xywh {0 0 74 25}
  279. } {
  280. MenuItem {} {
  281. label Fill
  282. callback {Waveform::fill = menu_picked_value( o );
  283. timeline->redraw();}
  284. xywh {10 10 40 25} type Toggle value 1
  285. }
  286. MenuItem {} {
  287. label Outline
  288. callback {Waveform::outline = menu_picked_value( o );
  289. timeline->redraw();}
  290. xywh {30 30 40 25} type Toggle value 1
  291. }
  292. MenuItem {} {
  293. label {Vary color}
  294. callback {Waveform::vary_color = menu_picked_value( o );
  295. timeline->redraw();}
  296. xywh {20 20 40 25} type Toggle value 1
  297. }
  298. }
  299. Submenu {} {
  300. label {&Region} open
  301. xywh {0 0 74 25}
  302. } {
  303. MenuItem {} {
  304. label {Filled fades}
  305. xywh {30 30 40 25} type Toggle value 1
  306. }
  307. MenuItem {} {
  308. label {Inherit track color}
  309. callback {Region::inherit_track_color = menu_picked_value( o );
  310. timeline->redraw();}
  311. xywh {40 40 40 25} type Toggle value 1
  312. }
  313. }
  314. Submenu {} {
  315. label {&Control Sequence} open
  316. xywh {0 0 74 25}
  317. } {
  318. MenuItem {} {
  319. label Polygon
  320. callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
  321. timeline->redraw();}
  322. xywh {20 20 40 25} type Toggle value 1
  323. }
  324. MenuItem {} {
  325. label Graded
  326. callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
  327. timeline->redraw();}
  328. xywh {30 30 40 25} type Toggle value 1
  329. }
  330. MenuItem {} {
  331. label Ruled
  332. callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
  333. timeline->redraw();}
  334. xywh {40 40 40 25} type Toggle value 1
  335. }
  336. }
  337. Submenu {} {
  338. label {&Style} open
  339. xywh {0 0 74 25}
  340. } {
  341. MenuItem {} {
  342. label Default
  343. callback {Fl::scheme( "plastic" );}
  344. xywh {0 0 40 25} type Radio value 1
  345. }
  346. MenuItem {} {
  347. label Flat
  348. callback {Fl::scheme( "gtk+" );}
  349. xywh {10 10 40 25} type Radio
  350. }
  351. }
  352. Submenu {} {
  353. label {C&olors} open
  354. xywh {0 0 74 25}
  355. } {
  356. MenuItem {} {
  357. label System
  358. callback {//Fl::get_system_colors();
  359. unsigned char r, g, b;
  360. Fl::get_color( system_colors[ 0 ], r, g, b );
  361. Fl::background( r, g, b );
  362. Fl::get_color( system_colors[ 1 ], r, g, b );
  363. Fl::foreground( r, g, b );
  364. Fl::get_color( system_colors[ 2 ], r, g, b );
  365. Fl::background2( r, g, b );
  366. Fl::scheme( Fl::scheme() );}
  367. xywh {0 0 40 25} type Radio
  368. }
  369. MenuItem {} {
  370. label Dark
  371. callback {Fl::background2( 100, 100, 100 );
  372. Fl::background( 50, 50, 50 );
  373. Fl::foreground( 255, 255, 255 );
  374. Fl::scheme( Fl::scheme() );}
  375. xywh {10 10 40 25} type Radio value 1
  376. }
  377. MenuItem {} {
  378. label Light
  379. callback {Fl::background2( 192, 192, 192 );
  380. Fl::background( 220, 220, 220 );
  381. Fl::foreground( 0, 0, 0 );
  382. Fl::scheme( Fl::scheme() );}
  383. xywh {20 20 40 25} type Radio
  384. }
  385. }
  386. }
  387. }
  388. Submenu {} {
  389. label {&Help} open
  390. xywh {0 0 74 25}
  391. } {
  392. MenuItem {} {
  393. label {&About}
  394. callback {Fl_Window *win = make_about_dialog();
  395. win->show();
  396. while ( win->shown() )
  397. Fl::wait();
  398. delete win;}
  399. xywh {0 0 40 25}
  400. }
  401. }
  402. }
  403. Fl_Group {} {open
  404. xywh {0 23 1024 48}
  405. } {
  406. Fl_Pack {} {open
  407. xywh {0 23 473 46} type HORIZONTAL
  408. code0 {o->spacing( 10 );}
  409. } {
  410. Fl_Box {} {
  411. label {<Transport>}
  412. xywh {0 23 184 46} color 30
  413. code0 {transport = o;}
  414. code1 {o->labeltype( FL_NO_LABEL );}
  415. class Transport
  416. }
  417. Fl_Pack clocks_pack {open
  418. xywh {185 23 288 46} type HORIZONTAL
  419. code0 {o->spacing( 2 );}
  420. } {
  421. Fl_Box playhead_clock {
  422. label PLAYHEAD
  423. xywh {185 29 137 40} box BORDER_BOX color 40
  424. code0 {o->type( Clock::HMS );}
  425. code1 {o->run( &transport->frame );}
  426. class Clock
  427. }
  428. Fl_Box {} {
  429. label PLAYHEAD
  430. xywh {325 29 142 40} box BORDER_BOX color 40
  431. code0 {o->type( Clock::BBT );}
  432. code1 {o->run( &transport->frame );}
  433. class Clock
  434. }
  435. }
  436. }
  437. Fl_Box {} {
  438. label {<empty>}
  439. xywh {477 27 387 42} resizable
  440. code0 {o->labeltype( FL_NO_LABEL );}
  441. }
  442. Fl_Group {} {
  443. xywh {869 25 155 44}
  444. } {
  445. Fl_Box {} {
  446. label {capture:}
  447. xywh {869 25 56 14} labelsize 10 align 24
  448. }
  449. Fl_Box {} {
  450. label {playback:}
  451. xywh {869 41 56 14} labelsize 10 align 24
  452. }
  453. Fl_Box {} {
  454. label {DSP:}
  455. xywh {869 55 56 14} labelsize 10 align 24
  456. }
  457. Fl_Progress capture_buffer_progress {
  458. label {50%}
  459. xywh {925 25 99 14} labelsize 10
  460. }
  461. Fl_Progress cpu_load_progress {
  462. label {50%}
  463. xywh {925 55 99 14} labelsize 9
  464. }
  465. Fl_Progress playback_buffer_progress {
  466. label {50%}
  467. xywh {925 40 99 14} labelsize 10
  468. }
  469. }
  470. }
  471. Fl_Box {} {
  472. label {<Timeline>}
  473. xywh {0 72 1024 695} box FLAT_BOX color 47 labelsize 100 resizable
  474. code0 {timeline = o;}
  475. class Timeline
  476. }
  477. Fl_Value_Output xruns_output {
  478. label {xruns:}
  479. xywh {980 2 44 20} maximum 40000 step 1
  480. }
  481. }
  482. }
  483. Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void}
  484. } {
  485. code {p->value( v );
  486. snprintf( s, 5, "%d%%", (int)v );
  487. p->label( s );} {}
  488. }
  489. Function {update_status()} {open
  490. } {
  491. code {static char cbp[5], pbp[5], clp[5];
  492. update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_percent() );
  493. update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
  494. update_progress( cpu_load_progress, clp, engine->cpu_load() );
  495. if ( timeline->total_capture_xruns() )
  496. capture_buffer_progress->selection_color( FL_RED );
  497. if ( timeline->total_playback_xruns() )
  498. playback_buffer_progress->selection_color( FL_RED );
  499. xruns_output->value( engine->xruns() );} {}
  500. }
  501. Function {update_cb( void *v )} {open return_type {static void}
  502. } {
  503. code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
  504. ((TLE*)v)->update_status();} {}
  505. }
  506. Function {make_about_dialog()} {open
  507. } {
  508. Fl_Window {} {
  509. label About open
  510. xywh {1082 94 498 529} type Double visible
  511. } {
  512. Fl_Tabs {} {open
  513. xywh {-4 122 507 419}
  514. } {
  515. Fl_Group {} {
  516. label Credits open
  517. xywh {-4 147 507 394}
  518. } {
  519. Fl_Box {} {
  520. label {Non-DAW was written from scratch by
  521. Jonathan Moore Liles for his own use
  522. (see the manual).
  523. Nobody planned. Nobody helped.
  524. You can help now by donating time, money,
  525. and/or replacing the rest of Linux Audio
  526. with fast, light, reliable alternatives.}
  527. xywh {42 203 416 260} labelsize 17
  528. }
  529. }
  530. Fl_Group {} {
  531. label License open
  532. xywh {-1 157 504 384} hide
  533. } {
  534. Fl_Box {} {
  535. label {Copyright (C) 2008 Jonathan Moore Liles
  536. This software is released under version 3
  537. of the GNU General Public License (GPLv3).}
  538. xywh {45 213 403 83} labelsize 17
  539. }
  540. }
  541. }
  542. Fl_Box {} {
  543. label {the Non-DAW (Digital Audio Workstation)}
  544. image {../logo-small.png} xywh {-1 1 499 115} align 16
  545. }
  546. }
  547. }
  548. }