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.

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