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.

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