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.

819 lines
21KB

  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 "Project.H"} {}
  12. decl {\#include "Clock.H"} {public
  13. }
  14. decl {\#include "Track.H" // for capture_format} {}
  15. decl {\#include "Audio_File.H" // for supported formats} {}
  16. decl {\#include "Waveform.H" // for options} {}
  17. decl {\#include "Audio_Region.H" // for options} {}
  18. decl {\#include "Control_Sequence.H" // for options} {}
  19. decl {\#include <FL/fl_ask.H>} {}
  20. decl {\#include <FL/Fl_File_Chooser.H>} {}
  21. decl {\#include <FL/Fl.H>} {}
  22. decl {\#include <Fl/Fl_PNG_Image.H>} {}
  23. decl {extern char project_display_name[256];} {global
  24. }
  25. decl {extern char *user_config_dir;} {global
  26. }
  27. class TLE {open
  28. } {
  29. decl {Fl_Color system_colors[3];} {public
  30. }
  31. decl {static void menubar_cb ( void *v )} {}
  32. decl {void menubar_cb ( void )} {}
  33. Function {menu_picked_value( const Fl_Menu_ *m )} {open return_type {static int}
  34. } {
  35. code {return m->menu()[ m->value() ].flags & FL_MENU_VALUE;} {}
  36. }
  37. Function {save()} {open
  38. } {
  39. code {const char options_filename[] = "options";
  40. // const char state_filename[] = "state";
  41. // save options
  42. char *path;
  43. asprintf( &path, "%s/%s", user_config_dir, options_filename );
  44. ((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options" ), path );
  45. free( path );
  46. // save unjournaled state
  47. // Loggable::save_unjournaled( state_filename );
  48. if ( Project::open() )
  49. {
  50. // save project local options (Timeline menu)
  51. ((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Timeline" ), options_filename );
  52. }} {}
  53. }
  54. Function {capture_format_cb( Fl_Widget *w, void *v )} {open private return_type {static void}
  55. } {
  56. code {((TLE*)v)->capture_format_cb();} {}
  57. }
  58. Function {capture_format_cb()} {open private return_type void
  59. } {
  60. code {Fl_Menu_ *o = menubar;
  61. Track::capture_format = o->menu()[ o->value() ].label();} {}
  62. }
  63. Function {run()} {open
  64. } {
  65. code {update_menu();
  66. main_window->show();
  67. Fl::run();} {}
  68. }
  69. Function {TLE()} {open
  70. } {
  71. code {make_window();
  72. // Fl::visual( RGB8 );
  73. Fl::visible_focus( 0 );
  74. Fl::get_system_colors();
  75. Fl::scheme( "plastic" );
  76. system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR );
  77. system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR );
  78. system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR );
  79. Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
  80. std::list <const char *> formats;
  81. Audio_File::all_supported_formats( formats );
  82. for ( std::list <const char *>::const_iterator f = formats.begin(); f != formats.end(); ++f )
  83. {
  84. // capture_format_menu->add( *f, FL_MENU_RADIO, 0, 0, 0 );
  85. //;
  86. char pat[256];
  87. snprintf( pat, sizeof( pat ), "&Timeline/Capture Format/%s", *f );
  88. menubar->add( pat, 0, &TLE::capture_format_cb, this, FL_MENU_RADIO );
  89. }
  90. menubar->picked( menubar->find_item( "&Timeline/Capture Format/Wav 24" ) );
  91. char *path;
  92. asprintf( &path, "%s/options", user_config_dir );
  93. ((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options" ), path );
  94. free( path );} {}
  95. }
  96. Function {make_window()} {open
  97. } {
  98. Fl_Window main_window {
  99. label {Non-DAW - Timeline} open
  100. xywh {236 77 1020 765} type Double resizable xclass {Non-DAW} visible
  101. } {
  102. Fl_Menu_Bar menubar {open
  103. xywh {0 0 1024 25}
  104. } {
  105. Submenu {} {
  106. label {&Project} open
  107. xywh {0 0 74 25}
  108. } {
  109. MenuItem {} {
  110. label {&Info}
  111. xywh {0 0 40 25} deactivate
  112. }
  113. MenuItem {} {
  114. label {&New}
  115. callback {save_timeline_settings();
  116. new_project_chooser();
  117. load_timeline_settings();
  118. update_menu();
  119. main_window->redraw();}
  120. xywh {0 0 40 25}
  121. }
  122. MenuItem {} {
  123. label {&Open}
  124. callback {const char *name = fl_dir_chooser( "Open Project", NULL, NULL );
  125. Project::close();
  126. if ( ! Project::open( name ) )
  127. {
  128. fl_alert( "Could not open \\"%s\\" as a Non-DAW project!", name );
  129. // we are in a somewhar ambiguous state now with no project open.
  130. }}
  131. xywh {10 10 40 25}
  132. }
  133. MenuItem {} {
  134. label {&Compact}
  135. callback {int n = fl_choice( "Compacting will replace the project history with a snapshot of the current state.\\nYou will not be able to use Undo to go back beyond this point.\\n\\nThis operation is irreversible!", NULL, "&Cancel", "Pr&ocede with compaction" );
  136. if ( n != 2 )
  137. return;
  138. Loggable::compact();}
  139. xywh {20 20 40 25}
  140. }
  141. Submenu {} {
  142. label {&Export} open
  143. xywh {0 0 74 25} deactivate
  144. } {
  145. MenuItem {} {
  146. label Project
  147. xywh {0 0 40 25}
  148. }
  149. MenuItem {} {
  150. label Range
  151. xywh {10 10 40 25}
  152. }
  153. }
  154. MenuItem {} {
  155. label {&Quit}
  156. callback {quit()}
  157. xywh {40 40 40 25} shortcut 0x40071
  158. }
  159. }
  160. Submenu {} {
  161. label {&Edit} open
  162. xywh {0 0 74 25}
  163. } {
  164. MenuItem {} {
  165. label Undo
  166. callback {Loggable::undo();}
  167. xywh {0 0 40 25} shortcut 0x4007a divider
  168. }
  169. MenuItem {} {
  170. label {Select None}
  171. callback {timeline->select_none();}
  172. xywh {10 10 40 25} shortcut 0x50061
  173. }
  174. MenuItem {} {
  175. label {Delete Selected}
  176. callback {timeline->delete_selected();}
  177. xywh {20 20 40 25} shortcut 0xffff
  178. }
  179. }
  180. Submenu {} {
  181. label Transport open
  182. xywh {0 0 74 25}
  183. } {
  184. MenuItem {} {
  185. label Start
  186. callback {transport->locate( 0 );}
  187. xywh {0 0 40 25} shortcut 0xff50
  188. }
  189. MenuItem {} {
  190. label End
  191. callback {transport->locate( timeline->length() );}
  192. xywh {10 10 40 25} shortcut 0xff57
  193. }
  194. MenuItem {} {
  195. label {Play/Stop}
  196. callback {transport->toggle();}
  197. xywh {20 20 40 25} shortcut 0x20
  198. }
  199. MenuItem {} {
  200. label Record
  201. callback {transport->toggle_record();}
  202. xywh {40 40 40 25} shortcut 0x10072
  203. }
  204. }
  205. Submenu {} {
  206. label {&View} open
  207. xywh {0 0 74 25}
  208. } {
  209. Submenu {} {
  210. label {&Zoom} open
  211. xywh {0 0 74 25}
  212. } {
  213. MenuItem {} {
  214. label {&In}
  215. callback {timeline->zoom_in();}
  216. xywh {20 20 40 25}
  217. }
  218. MenuItem {} {
  219. label {&Out}
  220. callback {timeline->zoom_out();}
  221. xywh {30 30 40 25}
  222. }
  223. MenuItem {} {
  224. label {&Fit}
  225. callback {timeline->zoom_fit();}
  226. xywh {10 10 40 25} divider
  227. }
  228. MenuItem {} {
  229. label {1 sec.}
  230. callback {timeline->zoom( 1 );}
  231. xywh {10 10 40 25} shortcut 0x31
  232. }
  233. MenuItem {} {
  234. label {1 min.}
  235. callback {timeline->zoom( 60 );}
  236. xywh {20 20 40 25} shortcut 0x32
  237. }
  238. MenuItem {} {
  239. label {1 hour.}
  240. callback {timeline->zoom( 60 * 60 );}
  241. xywh {30 30 40 25} shortcut 0x33
  242. }
  243. }
  244. }
  245. Submenu timeline_menu {
  246. label {&Timeline} open
  247. xywh {0 0 74 25}
  248. } {
  249. MenuItem {} {
  250. label {&Follow Playhead}
  251. callback {Timeline::follow_playhead = menu_picked_value( o );}
  252. xywh {20 20 40 25} type Toggle value 1
  253. }
  254. MenuItem {} {
  255. label {&Center Playhead}
  256. callback {Timeline::center_playhead = menu_picked_value( o );}
  257. xywh {30 30 40 25} type Toggle value 1
  258. }
  259. Submenu {} {
  260. label {&Snap to} open
  261. xywh {0 0 74 25}
  262. } {
  263. MenuItem {} {
  264. label Bars
  265. callback {Timeline::snap_to = Timeline::Bars;}
  266. xywh {0 0 40 25} type Radio value 1
  267. }
  268. MenuItem {} {
  269. label Beats
  270. callback {Timeline::snap_to = Timeline::Beats;}
  271. xywh {10 10 40 25} type Radio
  272. }
  273. MenuItem {} {
  274. label Off
  275. callback {Timeline::snap_to = Timeline::None;}
  276. xywh {20 20 40 25} type Radio
  277. }
  278. }
  279. MenuItem {} {
  280. label {Magnetic snap}
  281. callback {Timeline::snap_magnetic = menu_picked_value( o );}
  282. xywh {10 10 40 25} type Toggle value 1
  283. }
  284. Submenu {} {
  285. label {Capture Format} open
  286. xywh {0 0 74 25}
  287. } {}
  288. }
  289. Submenu {} {
  290. label {&Options} open
  291. xywh {0 0 74 25} divider
  292. } {
  293. Submenu {} {
  294. label {&Display} open
  295. xywh {0 0 74 25}
  296. } {
  297. Submenu {} {
  298. label {&Timeline} open
  299. xywh {0 0 74 25}
  300. } {
  301. MenuItem {} {
  302. label {&Measure lines}
  303. callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
  304. timeline->redraw();}
  305. xywh {0 0 40 25} type Toggle value 1
  306. }
  307. }
  308. Submenu {} {
  309. label {&Waveforms} open
  310. xywh {0 0 74 25}
  311. } {
  312. MenuItem {} {
  313. label Fill
  314. callback {Waveform::fill = menu_picked_value( o );
  315. timeline->redraw();}
  316. xywh {10 10 40 25} type Toggle value 1
  317. }
  318. MenuItem {} {
  319. label Outline
  320. callback {Waveform::outline = menu_picked_value( o );
  321. timeline->redraw();}
  322. xywh {30 30 40 25} type Toggle value 1
  323. }
  324. MenuItem {} {
  325. label {Vary color}
  326. callback {Waveform::vary_color = menu_picked_value( o );
  327. timeline->redraw();}
  328. xywh {20 20 40 25} type Toggle value 1
  329. }
  330. }
  331. Submenu {} {
  332. label {&Audio_Region} open
  333. xywh {0 0 74 25}
  334. } {
  335. MenuItem {} {
  336. label {Filled fades}
  337. xywh {30 30 40 25} type Toggle value 1
  338. }
  339. MenuItem {} {
  340. label {Inherit track color}
  341. callback {Audio_Region::inherit_track_color = menu_picked_value( o );
  342. timeline->redraw();}
  343. xywh {40 40 40 25} type Toggle value 1
  344. }
  345. }
  346. Submenu {} {
  347. label {&Control Sequence} open
  348. xywh {0 0 74 25}
  349. } {
  350. MenuItem {} {
  351. label Polygon
  352. callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
  353. timeline->redraw();}
  354. xywh {20 20 40 25} type Toggle value 1
  355. }
  356. MenuItem {} {
  357. label Graded
  358. callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
  359. timeline->redraw();}
  360. xywh {30 30 40 25} type Toggle value 1
  361. }
  362. MenuItem {} {
  363. label Ruled
  364. callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
  365. timeline->redraw();}
  366. xywh {40 40 40 25} type Toggle value 1
  367. }
  368. }
  369. Submenu {} {
  370. label {&Style} open
  371. xywh {0 0 74 25}
  372. } {
  373. MenuItem {} {
  374. label Default
  375. callback {Fl::scheme( "plastic" );}
  376. xywh {0 0 40 25} type Radio value 1
  377. }
  378. MenuItem {} {
  379. label Flat
  380. callback {Fl::scheme( "gtk+" );}
  381. xywh {10 10 40 25} type Radio
  382. }
  383. }
  384. Submenu {} {
  385. label {C&olors} open
  386. xywh {0 0 74 25}
  387. } {
  388. MenuItem {} {
  389. label System
  390. callback {//Fl::get_system_colors();
  391. unsigned char r, g, b;
  392. Fl::get_color( system_colors[ 0 ], r, g, b );
  393. Fl::background( r, g, b );
  394. Fl::get_color( system_colors[ 1 ], r, g, b );
  395. Fl::foreground( r, g, b );
  396. Fl::get_color( system_colors[ 2 ], r, g, b );
  397. Fl::background2( r, g, b );
  398. Fl::scheme( Fl::scheme() );}
  399. xywh {0 0 40 25} type Radio
  400. }
  401. MenuItem {} {
  402. label Dark
  403. callback {Fl::background2( 100, 100, 100 );
  404. Fl::background( 50, 50, 50 );
  405. Fl::foreground( 255, 255, 255 );
  406. Fl::scheme( Fl::scheme() );}
  407. xywh {10 10 40 25} type Radio value 1
  408. }
  409. MenuItem {} {
  410. label Light
  411. callback {Fl::background2( 192, 192, 192 );
  412. Fl::background( 220, 220, 220 );
  413. Fl::foreground( 0, 0, 0 );
  414. Fl::scheme( Fl::scheme() );}
  415. xywh {20 20 40 25} type Radio
  416. }
  417. }
  418. }
  419. }
  420. Submenu {} {
  421. label {&Help} open
  422. xywh {0 0 74 25}
  423. } {
  424. MenuItem {} {
  425. label {&About}
  426. callback {Fl_Window *win = make_about_dialog();
  427. win->show();
  428. while ( win->shown() )
  429. Fl::wait();
  430. delete win;}
  431. xywh {0 0 40 25}
  432. }
  433. }
  434. }
  435. Fl_Group {} {open
  436. xywh {0 23 1024 48}
  437. } {
  438. Fl_Pack {} {open
  439. xywh {0 23 473 46} type HORIZONTAL
  440. code0 {o->spacing( 10 );}
  441. } {
  442. Fl_Box {} {
  443. label {<Transport>}
  444. xywh {0 23 184 46} color 30
  445. code0 {transport = o;}
  446. code1 {o->labeltype( FL_NO_LABEL );}
  447. class Transport
  448. }
  449. Fl_Pack clocks_pack {open
  450. xywh {185 23 288 46} type HORIZONTAL
  451. code0 {o->spacing( 2 );}
  452. } {
  453. Fl_Box playhead_clock {
  454. label PLAYHEAD
  455. xywh {185 29 137 40} box BORDER_BOX color 40
  456. code0 {o->type( Clock::HMS );}
  457. code1 {o->run( &transport->frame );}
  458. class Clock
  459. }
  460. Fl_Box {} {
  461. label PLAYHEAD
  462. xywh {325 29 142 40} box BORDER_BOX color 40
  463. code0 {o->type( Clock::BBT );}
  464. code1 {o->run( &transport->frame );}
  465. class Clock
  466. }
  467. }
  468. }
  469. Fl_Box {} {
  470. label {<empty>}
  471. xywh {477 27 387 42} resizable
  472. code0 {o->labeltype( FL_NO_LABEL );}
  473. }
  474. Fl_Group {} {
  475. xywh {869 25 155 44}
  476. } {
  477. Fl_Box {} {
  478. label {capture:}
  479. xywh {869 25 56 14} labelsize 10 align 24
  480. }
  481. Fl_Box {} {
  482. label {playback:}
  483. xywh {869 41 56 14} labelsize 10 align 24
  484. }
  485. Fl_Box {} {
  486. label {DSP:}
  487. xywh {869 55 56 14} labelsize 10 align 24
  488. }
  489. Fl_Progress capture_buffer_progress {
  490. label {50%}
  491. xywh {925 25 99 14} labelsize 10
  492. }
  493. Fl_Progress cpu_load_progress {
  494. label {50%}
  495. xywh {925 55 99 14} labelsize 9
  496. }
  497. Fl_Progress playback_buffer_progress {
  498. label {50%}
  499. xywh {925 40 99 14} labelsize 10
  500. }
  501. }
  502. }
  503. Fl_Box {} {
  504. label {<Timeline>}
  505. xywh {0 72 1024 695} box FLAT_BOX color 47 labelsize 100 resizable
  506. code0 {timeline = o;}
  507. class Timeline
  508. }
  509. Fl_Box project_name {
  510. label {<project name>}
  511. xywh {450 0 475 22} labeltype SHADOW_LABEL labelfont 2
  512. code0 {o->label( Project::name() );}
  513. }
  514. Fl_Value_Output xruns_output {
  515. label {xruns:}
  516. xywh {980 2 44 20} maximum 40000 step 1
  517. }
  518. }
  519. }
  520. Function {find_item( Fl_Menu_ *menu, const char *path )} {open return_type {static Fl_Menu_Item *}
  521. } {
  522. code {return const_cast<Fl_Menu_Item*>(menu->find_item( path ));} {}
  523. }
  524. Function {update_menu()} {open
  525. } {
  526. code {Fl_Menu_Bar *m = menubar;
  527. if ( ! Project::open() )
  528. {
  529. find_item( m, "&Project/&Export" )->deactivate();
  530. find_item( m, "&Project/&Compact" )->deactivate();
  531. find_item( m, "&Project/&Info" )->deactivate();
  532. find_item( m, "&Timeline" )->deactivate();
  533. timeline->deactivate();
  534. transport->deactivate();
  535. }
  536. else
  537. {
  538. find_item( m, "&Project/&Export" )->activate();
  539. find_item( m, "&Project/&Compact" )->activate();
  540. find_item( m, "&Project/&Info" )->activate();
  541. find_item( m, "&Timeline" )->activate();
  542. timeline->activate();
  543. transport->activate();
  544. }
  545. m->redraw();
  546. project_name->redraw();} {}
  547. }
  548. Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void}
  549. } {
  550. code {p->value( v );
  551. snprintf( s, 5, "%d%%", (int)v );
  552. p->label( s );} {}
  553. }
  554. Function {update_status()} {open
  555. } {
  556. code {static char cbp[5], pbp[5], clp[5];
  557. update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_percent() );
  558. update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
  559. update_progress( cpu_load_progress, clp, engine->cpu_load() );
  560. if ( timeline->total_capture_xruns() )
  561. capture_buffer_progress->selection_color( FL_RED );
  562. if ( timeline->total_playback_xruns() )
  563. playback_buffer_progress->selection_color( FL_RED );
  564. xruns_output->value( engine->xruns() );} {}
  565. }
  566. Function {update_cb( void *v )} {return_type {static void}
  567. } {
  568. code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
  569. ((TLE*)v)->update_status();} {}
  570. }
  571. Function {make_about_dialog()} {open
  572. } {
  573. Fl_Window {} {
  574. label About open
  575. xywh {733 400 495 525} type Double visible
  576. } {
  577. Fl_Tabs {} {open
  578. xywh {-4 122 507 419}
  579. } {
  580. Fl_Group {} {
  581. label Credits open
  582. xywh {-4 147 507 394}
  583. } {
  584. Fl_Box {} {
  585. label {Non-DAW was written from scratch by
  586. Jonathan Moore Liles for his own use
  587. (see the manual).
  588. Nobody planned. Nobody helped.
  589. You can help now by donating time, money,
  590. and/or replacing the rest of Linux Audio
  591. with fast, light, reliable alternatives.}
  592. xywh {42 203 416 260} labelsize 17
  593. }
  594. }
  595. Fl_Group {} {
  596. label License open
  597. xywh {-1 157 504 384} hide
  598. } {
  599. Fl_Box {} {
  600. label {Copyright (C) 2008 Jonathan Moore Liles
  601. This software is released under version 3
  602. of the GNU General Public License (GPLv3).}
  603. xywh {45 213 403 83} labelsize 17
  604. }
  605. }
  606. }
  607. Fl_Box {} {
  608. label {the Non-DAW (Digital Audio Workstation)}
  609. xywh {-1 1 499 115} align 16
  610. code0 {o->image( new Fl_PNG_Image( INSTALL_PREFIX "/share/pixmaps/non-daw/logo.png" ) );}
  611. }
  612. }
  613. }
  614. Function {save_timeline_settings()} {open
  615. } {
  616. code {if ( Project::open() )
  617. {
  618. // save project local options (Timeline menu)
  619. ((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Timeline" ), "options" );
  620. }} {}
  621. }
  622. Function {load_timeline_settings()} {open
  623. } {
  624. code {if ( Project::open() )
  625. {
  626. ((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Timeline" ), "options" );
  627. }
  628. update_menu();
  629. project_name->redraw();} {}
  630. }
  631. Function {quit()} {open
  632. } {
  633. code {Project::close();
  634. save();
  635. exit( 0 );} {}
  636. }
  637. }
  638. class New_Project_Dialog {open
  639. } {
  640. Function {New_Project_Dialog()} {open
  641. } {
  642. code {make_window();} {}
  643. }
  644. Function {run()} {open return_type void
  645. } {
  646. code {_window->show();
  647. while ( _window->shown() )
  648. Fl::wait();} {}
  649. }
  650. Function {make_window()} {open
  651. } {
  652. Fl_Window _window {
  653. label {New Project} open
  654. xywh {23 779 550 195} type Double modal visible
  655. } {
  656. Fl_File_Input _name {
  657. label {Named:}
  658. xywh {75 140 375 35}
  659. }
  660. Fl_Button {} {
  661. label Browse
  662. callback {_directory->value( fl_dir_chooser( "Directory for new project", NULL, 0 ) );}
  663. xywh {455 100 80 35}
  664. }
  665. Fl_Return_Button {} {
  666. label Create
  667. callback {if ( strlen( _directory->value() ) && strlen( _name->value() ) )
  668. {
  669. char pat[512];
  670. snprintf( pat, sizeof( pat ), "%s/%s", _directory->value(), _name->value() );
  671. // if ( ! fl_filename_exists( pat ) )
  672. {
  673. if ( ! Project::create( pat, _template->text( _template->value() ) ) )
  674. fl_alert( "Error opening project!" );
  675. _window->hide();
  676. }
  677. // else
  678. // {
  679. // fl_alert( "A file already exists at that location. Choose a differnt name." );
  680. //
  681. // }
  682. }}
  683. xywh {455 140 80 35}
  684. }
  685. Fl_File_Input _directory {
  686. label {Where:}
  687. callback {if ( ! fl_filename_isdir( o->value() ) )
  688. {
  689. fl_alert( "Must be a directory" );
  690. o->value( "" );
  691. }}
  692. xywh {75 100 375 35}
  693. code0 {\#include <FL/filename.H>}
  694. }
  695. Fl_Box {} {
  696. label {New Project}
  697. xywh {15 8 520 33} box RSHADOW_BOX color 133 labelsize 20 labelcolor 32
  698. }
  699. Fl_Choice _template {
  700. label {Template:}
  701. private xywh {310 60 225 25} down_box BORDER_BOX
  702. } {
  703. MenuItem {} {
  704. label Default
  705. xywh {0 0 40 25}
  706. }
  707. }
  708. }
  709. }
  710. }
  711. Function {new_project_chooser()} {open C return_type void
  712. } {
  713. code {New_Project_Dialog nsd;
  714. nsd.run();} {}
  715. }