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.

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