2008-04-23 04:22:46 +02:00
# data file for the Fltk User Interface Designer (fluid)
version 1.0108
header_name {.H}
code_name {.C}
2008-04-23 07:35:49 +02:00
decl {const float STATUS_UPDATE_FREQ = 0.5f;} {}
2008-04-24 23:09:17 +02:00
decl {\#include "Fl_Menu_Settings.H"} {}
2008-04-24 22:52:30 +02:00
2008-04-23 04:22:46 +02:00
decl {\#include "Timeline.H"} {}
2008-04-23 22:43:17 +02:00
decl {\#include "Engine.H"} {}
2008-04-23 07:35:49 +02:00
2008-04-23 04:22:46 +02:00
decl {\#include "Transport.H"} {}
2008-04-24 00:29:14 +02:00
decl {\#include "Loggable.H"} {}
2008-05-07 01:33:24 +02:00
decl {\#include "Project.H"} {}
2008-05-04 09:10:15 +02:00
2008-04-23 04:22:46 +02:00
decl {\#include "Clock.H"} {public
}
2008-04-26 10:42:30 +02:00
decl {\#include "Track.H" // for capture_format} {}
2008-04-26 07:33:04 +02:00
decl {\#include "Audio_File.H" // for supported formats} {}
2008-04-23 22:43:17 +02:00
decl {\#include "Waveform.H" // for options} {}
2008-05-05 02:04:20 +02:00
decl {\#include "Audio_Region.H" // for options} {}
2008-04-26 11:01:54 +02:00
2008-04-23 22:43:17 +02:00
decl {\#include "Control_Sequence.H" // for options} {}
2008-04-24 00:29:14 +02:00
decl {\#include <FL/fl_ask.H>} {}
2008-05-04 03:28:36 +02:00
decl {\#include <FL/Fl_File_Chooser.H>} {}
2008-04-23 04:22:46 +02:00
decl {\#include <FL/Fl.H>} {}
2008-05-16 02:53:46 +02:00
decl {\#include <Fl/Fl_Shared_Image.H>} {selected
}
2008-05-16 02:26:51 +02:00
2008-05-07 01:33:24 +02:00
decl {extern char project_display_name[256];} {global
2008-05-03 06:44:48 +02:00
}
2008-04-25 06:36:02 +02:00
decl {extern char *user_config_dir;} {global
2008-04-25 05:15:17 +02:00
}
2008-05-03 01:03:44 +02:00
class TLE {open
2008-04-23 04:22:46 +02:00
} {
2008-04-26 18:07:43 +02:00
decl {Fl_Color system_colors[3];} {public
2008-04-26 12:11:19 +02:00
}
2008-04-23 22:43:17 +02:00
decl {static void menubar_cb ( void *v )} {}
decl {void menubar_cb ( void )} {}
Function {menu_picked_value( const Fl_Menu_ *m )} {open return_type {static int}
} {
code {return m->menu()[ m->value() ].flags & FL_MENU_VALUE;} {}
}
2008-04-26 07:33:04 +02:00
Function {save()} {open
} {
code {const char options_filename[] = "options";
2008-04-26 10:42:30 +02:00
// const char state_filename[] = "state";
2008-04-26 07:33:04 +02:00
// save options
char *path;
asprintf( &path, "%s/%s", user_config_dir, options_filename );
2008-04-26 10:42:30 +02:00
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options" ), path );
2008-04-26 07:33:04 +02:00
free( path );
// save unjournaled state
2008-05-06 22:13:52 +02:00
// Loggable::save_unjournaled( state_filename );
2008-05-07 01:33:24 +02:00
if ( Project::open() )
2008-05-06 22:13:52 +02:00
{
2008-05-07 01:33:24 +02:00
// save project local options (Timeline menu)
2008-05-06 22:13:52 +02:00
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Timeline" ), options_filename );
}} {}
2008-04-26 07:33:04 +02:00
}
Function {capture_format_cb( Fl_Widget *w, void *v )} {open private return_type {static void}
} {
code {((TLE*)v)->capture_format_cb();} {}
}
Function {capture_format_cb()} {open private return_type void
} {
code {Fl_Menu_ *o = menubar;
Track::capture_format = o->menu()[ o->value() ].label();} {}
2008-05-06 06:33:41 +02:00
}
Function {run()} {open
} {
code {update_menu();
main_window->show();
Fl::run();} {}
2008-04-26 07:33:04 +02:00
}
2008-04-23 04:22:46 +02:00
Function {TLE()} {open
} {
code {make_window();
// Fl::visual( RGB8 );
Fl::visible_focus( 0 );
Fl::get_system_colors();
2008-04-23 07:35:49 +02:00
Fl::scheme( "plastic" );
2008-04-26 12:11:19 +02:00
system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR );
system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR );
system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR );
2008-04-23 07:35:49 +02:00
2008-04-25 05:15:17 +02:00
Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
2008-04-26 07:33:04 +02:00
std::list <const char *> formats;
Audio_File::all_supported_formats( formats );
for ( std::list <const char *>::const_iterator f = formats.begin(); f != formats.end(); ++f )
{
// capture_format_menu->add( *f, FL_MENU_RADIO, 0, 0, 0 );
//;
char pat[256];
2008-05-06 22:13:52 +02:00
snprintf( pat, sizeof( pat ), "&Timeline/Capture Format/%s", *f );
2008-04-26 07:33:04 +02:00
menubar->add( pat, 0, &TLE::capture_format_cb, this, FL_MENU_RADIO );
2008-04-26 10:42:30 +02:00
}
2008-05-06 22:13:52 +02:00
menubar->picked( menubar->find_item( "&Timeline/Capture Format/Wav 24" ) );
2008-04-26 10:42:30 +02:00
char *path;
asprintf( &path, "%s/options", user_config_dir );
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options" ), path );
2008-05-07 02:41:07 +02:00
free( path );} {}
2008-04-23 04:22:46 +02:00
}
Function {make_window()} {open
} {
Fl_Window main_window {
label {Non-DAW - Timeline} open
2008-05-06 22:13:52 +02:00
xywh {236 77 1020 765} type Double resizable xclass {Non-DAW} visible
2008-04-23 04:22:46 +02:00
} {
2008-05-03 01:03:44 +02:00
Fl_Menu_Bar menubar {open
2008-04-23 04:22:46 +02:00
xywh {0 0 1024 25}
} {
Submenu {} {
2008-05-07 01:33:24 +02:00
label {&Project} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
2008-05-05 00:20:38 +02:00
MenuItem {} {
label {&Info}
xywh {0 0 40 25} deactivate
}
2008-04-23 04:22:46 +02:00
MenuItem {} {
label {&New}
2008-05-06 22:13:52 +02:00
callback {save_timeline_settings();
2008-05-07 01:33:24 +02:00
new_project_chooser();
2008-05-06 22:13:52 +02:00
load_timeline_settings();
2008-05-06 06:33:41 +02:00
update_menu();
2008-05-04 03:28:36 +02:00
2008-05-06 06:33:41 +02:00
main_window->redraw();}
2008-05-04 00:50:32 +02:00
xywh {0 0 40 25}
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {&Open}
2008-05-15 06:23:16 +02:00
callback {const char *name = fl_dir_chooser( "Open Project", NULL, NULL );
2008-05-06 05:50:57 +02:00
2008-05-07 01:33:24 +02:00
Project::close();
2008-05-06 05:50:57 +02:00
2008-05-07 01:33:24 +02:00
if ( ! Project::open( name ) )
2008-05-06 05:50:57 +02:00
{
2008-05-07 01:33:24 +02:00
fl_alert( "Could not open \\"%s\\" as a Non-DAW project!", name );
2008-05-06 05:50:57 +02:00
2008-05-07 01:33:24 +02:00
// we are in a somewhar ambiguous state now with no project open.
2008-05-15 06:23:16 +02:00
}}
2008-05-06 05:50:57 +02:00
xywh {10 10 40 25}
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {&Compact}
2008-05-07 17:20:13 +02:00
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" );
2008-04-24 00:29:14 +02:00
if ( n != 2 )
return;
2008-05-15 06:23:16 +02:00
Loggable::compact();}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25}
}
Submenu {} {
2008-05-06 06:33:41 +02:00
label {&Export} open
2008-04-27 09:10:37 +02:00
xywh {0 0 74 25} deactivate
2008-04-23 04:22:46 +02:00
} {
MenuItem {} {
2008-05-07 01:33:24 +02:00
label Project
2008-04-23 04:22:46 +02:00
xywh {0 0 40 25}
}
MenuItem {} {
label Range
xywh {10 10 40 25}
}
}
MenuItem {} {
label {&Quit}
2008-05-15 06:23:16 +02:00
callback {quit()}
2008-04-23 04:22:46 +02:00
xywh {40 40 40 25} shortcut 0x40071
}
}
Submenu {} {
2008-04-27 12:18:03 +02:00
label {&Edit} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Undo
2008-04-26 07:33:04 +02:00
callback {Loggable::undo();}
2008-04-29 23:16:09 +02:00
xywh {0 0 40 25} shortcut 0x4007a divider
}
MenuItem {} {
label {Select None}
callback {timeline->select_none();}
xywh {10 10 40 25} shortcut 0x50061
}
MenuItem {} {
label {Delete Selected}
2008-04-30 03:08:49 +02:00
callback {timeline->delete_selected();}
2008-04-29 23:16:09 +02:00
xywh {20 20 40 25} shortcut 0xffff
2008-04-23 04:22:46 +02:00
}
}
Submenu {} {
label Transport open
xywh {0 0 74 25}
} {
MenuItem {} {
2008-04-27 05:50:58 +02:00
label Start
2008-04-23 22:43:17 +02:00
callback {transport->locate( 0 );}
xywh {0 0 40 25} shortcut 0xff50
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label End
2008-04-23 22:43:17 +02:00
callback {transport->locate( timeline->length() );}
xywh {10 10 40 25} shortcut 0xff57
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
2008-04-27 23:08:30 +02:00
label {Play/Stop}
callback {transport->toggle();}
xywh {20 20 40 25} shortcut 0x20
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label Record
2008-04-27 09:07:16 +02:00
callback {transport->toggle_record();}
2008-04-27 23:08:30 +02:00
xywh {40 40 40 25} shortcut 0x10072
2008-04-23 04:22:46 +02:00
}
}
Submenu {} {
label {&View} open
xywh {0 0 74 25}
} {
Submenu {} {
2008-04-23 22:43:17 +02:00
label {&Zoom} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
2008-04-23 22:43:17 +02:00
label {&In}
callback {timeline->zoom_in();}
xywh {20 20 40 25}
}
MenuItem {} {
label {&Out}
callback {timeline->zoom_out();}
xywh {30 30 40 25}
}
MenuItem {} {
label {&Fit}
2008-05-03 06:44:48 +02:00
callback {timeline->zoom_fit();}
2008-04-23 22:43:17 +02:00
xywh {10 10 40 25} divider
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 sec.}
2008-04-23 22:43:17 +02:00
callback {timeline->zoom( 1 );}
xywh {10 10 40 25} shortcut 0x31
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 min.}
2008-04-23 22:43:17 +02:00
callback {timeline->zoom( 60 );}
xywh {20 20 40 25} shortcut 0x32
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 hour.}
2008-04-23 22:43:17 +02:00
callback {timeline->zoom( 60 * 60 );}
xywh {30 30 40 25} shortcut 0x33
2008-04-23 04:22:46 +02:00
}
}
}
2008-04-25 08:34:08 +02:00
Submenu timeline_menu {
2008-05-06 22:13:52 +02:00
label {&Timeline} open
2008-04-25 08:34:08 +02:00
xywh {0 0 74 25}
} {
2008-04-30 03:08:49 +02:00
MenuItem {} {
label {&Follow Playhead}
2008-05-01 08:47:49 +02:00
callback {Timeline::follow_playhead = menu_picked_value( o );}
2008-04-30 03:08:49 +02:00
xywh {20 20 40 25} type Toggle value 1
}
2008-05-01 08:47:49 +02:00
MenuItem {} {
label {&Center Playhead}
2008-05-01 13:35:42 +02:00
callback {Timeline::center_playhead = menu_picked_value( o );}
2008-05-01 08:47:49 +02:00
xywh {30 30 40 25} type Toggle value 1
}
2008-04-25 08:34:08 +02:00
Submenu {} {
2008-04-27 20:56:20 +02:00
label {&Snap to} open
2008-04-25 08:34:08 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Bars
2008-04-27 05:50:58 +02:00
callback {Timeline::snap_to = Timeline::Bars;}
2008-04-25 08:34:08 +02:00
xywh {0 0 40 25} type Radio value 1
}
MenuItem {} {
label Beats
2008-04-26 18:07:43 +02:00
callback {Timeline::snap_to = Timeline::Beats;}
2008-04-25 08:34:08 +02:00
xywh {10 10 40 25} type Radio
}
MenuItem {} {
label Off
2008-04-26 18:07:43 +02:00
callback {Timeline::snap_to = Timeline::None;}
2008-04-25 08:34:08 +02:00
xywh {20 20 40 25} type Radio
}
}
2008-04-27 20:56:20 +02:00
MenuItem {} {
label {Magnetic snap}
2008-04-27 23:08:30 +02:00
callback {Timeline::snap_magnetic = menu_picked_value( o );}
2008-04-27 20:56:20 +02:00
xywh {10 10 40 25} type Toggle value 1
}
2008-04-26 07:33:04 +02:00
Submenu {} {
label {Capture Format} open
xywh {0 0 74 25}
} {}
2008-04-25 08:34:08 +02:00
}
2008-04-26 10:42:30 +02:00
Submenu {} {
2008-04-26 11:01:54 +02:00
label {&Options} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25} divider
} {
Submenu {} {
2008-04-23 22:43:17 +02:00
label {&Display} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
2008-04-25 04:48:44 +02:00
Submenu {} {
label {&Timeline} open
xywh {0 0 74 25}
} {
MenuItem {} {
label {&Measure lines}
callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
2008-04-25 05:15:17 +02:00
timeline->redraw();}
2008-04-25 04:48:44 +02:00
xywh {0 0 40 25} type Toggle value 1
}
}
2008-04-23 04:22:46 +02:00
Submenu {} {
2008-04-23 22:43:17 +02:00
label {&Waveforms} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
2008-04-23 22:43:17 +02:00
label Fill
callback {Waveform::fill = menu_picked_value( o );
timeline->redraw();}
2008-04-23 04:22:46 +02:00
xywh {10 10 40 25} type Toggle value 1
}
MenuItem {} {
2008-04-23 22:43:17 +02:00
label Outline
callback {Waveform::outline = menu_picked_value( o );
timeline->redraw();}
xywh {30 30 40 25} type Toggle value 1
}
MenuItem {} {
label {Vary color}
callback {Waveform::vary_color = menu_picked_value( o );
timeline->redraw();}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25} type Toggle value 1
}
2008-04-23 22:43:17 +02:00
}
Submenu {} {
2008-05-05 02:04:20 +02:00
label {&Audio_Region} open
2008-04-23 22:43:17 +02:00
xywh {0 0 74 25}
} {
2008-04-23 04:22:46 +02:00
MenuItem {} {
label {Filled fades}
xywh {30 30 40 25} type Toggle value 1
}
2008-04-26 11:01:54 +02:00
MenuItem {} {
label {Inherit track color}
2008-05-05 02:04:20 +02:00
callback {Audio_Region::inherit_track_color = menu_picked_value( o );
2008-04-26 11:01:54 +02:00
timeline->redraw();}
xywh {40 40 40 25} type Toggle value 1
}
2008-04-23 04:22:46 +02:00
}
Submenu {} {
2008-04-23 22:43:17 +02:00
label {&Control Sequence} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Polygon
2008-04-23 22:43:17 +02:00
callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
timeline->redraw();}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25} type Toggle value 1
}
MenuItem {} {
label Graded
2008-04-23 22:43:17 +02:00
callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
timeline->redraw();}
2008-04-23 04:22:46 +02:00
xywh {30 30 40 25} type Toggle value 1
}
MenuItem {} {
label Ruled
2008-04-23 22:43:17 +02:00
callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
timeline->redraw();}
2008-04-23 04:22:46 +02:00
xywh {40 40 40 25} type Toggle value 1
}
}
Submenu {} {
2008-04-23 22:43:17 +02:00
label {&Style} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Default
2008-04-23 22:43:17 +02:00
callback {Fl::scheme( "plastic" );}
2008-04-23 04:22:46 +02:00
xywh {0 0 40 25} type Radio value 1
}
MenuItem {} {
label Flat
2008-04-27 14:04:56 +02:00
callback {Fl::scheme( "gtk+" );}
2008-04-23 04:22:46 +02:00
xywh {10 10 40 25} type Radio
}
}
Submenu {} {
2008-04-24 00:29:14 +02:00
label {C&olors} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label System
2008-04-26 12:11:19 +02:00
callback {//Fl::get_system_colors();
unsigned char r, g, b;
Fl::get_color( system_colors[ 0 ], r, g, b );
Fl::background( r, g, b );
Fl::get_color( system_colors[ 1 ], r, g, b );
Fl::foreground( r, g, b );
Fl::get_color( system_colors[ 2 ], r, g, b );
Fl::background2( r, g, b );
2008-04-23 22:43:17 +02:00
Fl::scheme( Fl::scheme() );}
2008-04-23 04:22:46 +02:00
xywh {0 0 40 25} type Radio
}
MenuItem {} {
label Dark
2008-04-23 22:43:17 +02:00
callback {Fl::background2( 100, 100, 100 );
Fl::background( 50, 50, 50 );
Fl::foreground( 255, 255, 255 );
Fl::scheme( Fl::scheme() );}
2008-04-23 04:22:46 +02:00
xywh {10 10 40 25} type Radio value 1
}
MenuItem {} {
label Light
2008-04-27 14:04:56 +02:00
callback {Fl::background2( 192, 192, 192 );
Fl::background( 220, 220, 220 );
2008-04-23 22:43:17 +02:00
Fl::foreground( 0, 0, 0 );
2008-04-27 20:56:20 +02:00
Fl::scheme( Fl::scheme() );}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25} type Radio
}
}
}
}
2008-04-27 09:07:16 +02:00
Submenu {} {
label {&Help} open
xywh {0 0 74 25}
} {
MenuItem {} {
label {&About}
callback {Fl_Window *win = make_about_dialog();
win->show();
while ( win->shown() )
Fl::wait();
delete win;}
xywh {0 0 40 25}
}
2008-04-23 04:22:46 +02:00
}
}
2008-04-24 04:10:20 +02:00
Fl_Group {} {open
xywh {0 23 1024 48}
2008-04-23 04:22:46 +02:00
} {
2008-04-24 22:52:30 +02:00
Fl_Pack {} {open
2008-04-24 04:10:20 +02:00
xywh {0 23 473 46} type HORIZONTAL
code0 {o->spacing( 10 );}
} {
Fl_Box {} {
label {<Transport>}
xywh {0 23 184 46} color 30
code0 {transport = o;}
code1 {o->labeltype( FL_NO_LABEL );}
class Transport
}
2008-04-25 06:36:02 +02:00
Fl_Pack clocks_pack {open
2008-04-24 04:10:20 +02:00
xywh {185 23 288 46} type HORIZONTAL
code0 {o->spacing( 2 );}
} {
Fl_Box playhead_clock {
label PLAYHEAD
2008-04-27 14:04:56 +02:00
xywh {185 29 137 40} box BORDER_BOX color 40
2008-04-24 04:10:20 +02:00
code0 {o->type( Clock::HMS );}
code1 {o->run( &transport->frame );}
class Clock
}
Fl_Box {} {
2008-04-25 08:34:08 +02:00
label PLAYHEAD
2008-04-27 14:04:56 +02:00
xywh {325 29 142 40} box BORDER_BOX color 40
2008-04-24 04:10:20 +02:00
code0 {o->type( Clock::BBT );}
2008-04-25 06:36:02 +02:00
code1 {o->run( &transport->frame );}
2008-04-24 04:10:20 +02:00
class Clock
}
}
2008-04-23 04:22:46 +02:00
}
Fl_Box {} {
2008-04-24 04:10:20 +02:00
label {<empty>}
xywh {477 27 387 42} resizable
code0 {o->labeltype( FL_NO_LABEL );}
}
Fl_Group {} {
xywh {869 25 155 44}
} {
Fl_Box {} {
label {capture:}
xywh {869 25 56 14} labelsize 10 align 24
}
Fl_Box {} {
label {playback:}
xywh {869 41 56 14} labelsize 10 align 24
}
Fl_Box {} {
label {DSP:}
xywh {869 55 56 14} labelsize 10 align 24
}
Fl_Progress capture_buffer_progress {
label {50%}
xywh {925 25 99 14} labelsize 10
}
Fl_Progress cpu_load_progress {
label {50%}
xywh {925 55 99 14} labelsize 9
}
Fl_Progress playback_buffer_progress {
label {50%}
xywh {925 40 99 14} labelsize 10
}
2008-04-23 04:22:46 +02:00
}
}
Fl_Box {} {
2008-04-24 04:10:20 +02:00
label {<Timeline>}
xywh {0 72 1024 695} box FLAT_BOX color 47 labelsize 100 resizable
code0 {timeline = o;}
class Timeline
2008-04-23 04:22:46 +02:00
}
2008-05-15 06:23:16 +02:00
Fl_Box project_name {
2008-05-07 01:33:24 +02:00
label {<project name>}
2008-05-03 06:44:48 +02:00
xywh {450 0 475 22} labeltype SHADOW_LABEL labelfont 2
2008-05-07 01:33:24 +02:00
code0 {o->label( Project::name() );}
2008-05-03 06:44:48 +02:00
}
2008-04-29 19:18:27 +02:00
Fl_Value_Output xruns_output {
2008-04-29 23:16:09 +02:00
label {xruns:}
2008-04-29 19:18:27 +02:00
xywh {980 2 44 20} maximum 40000 step 1
}
2008-04-23 04:22:46 +02:00
}
}
2008-05-06 06:37:45 +02:00
Function {find_item( Fl_Menu_ *menu, const char *path )} {open return_type {static Fl_Menu_Item *}
2008-05-06 06:33:41 +02:00
} {
code {return const_cast<Fl_Menu_Item*>(menu->find_item( path ));} {}
}
Function {update_menu()} {open
} {
code {Fl_Menu_Bar *m = menubar;
2008-05-07 01:33:24 +02:00
if ( ! Project::open() )
2008-05-06 06:33:41 +02:00
{
2008-05-07 01:33:24 +02:00
find_item( m, "&Project/&Export" )->deactivate();
find_item( m, "&Project/&Compact" )->deactivate();
find_item( m, "&Project/&Info" )->deactivate();
2008-05-06 06:33:41 +02:00
2008-05-06 06:37:45 +02:00
find_item( m, "&Timeline" )->deactivate();
2008-05-06 06:33:41 +02:00
timeline->deactivate();
transport->deactivate();
}
else
{
2008-05-07 01:33:24 +02:00
find_item( m, "&Project/&Export" )->activate();
find_item( m, "&Project/&Compact" )->activate();
find_item( m, "&Project/&Info" )->activate();
2008-05-06 06:37:45 +02:00
find_item( m, "&Timeline" )->activate();
2008-05-06 06:33:41 +02:00
timeline->activate();
transport->activate();
2008-05-06 22:13:52 +02:00
}
2008-05-15 06:23:16 +02:00
m->redraw();
2008-05-16 02:26:51 +02:00
project_name->redraw();} {}
2008-05-06 06:33:41 +02:00
}
2008-04-24 04:10:20 +02:00
Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void}
} {
code {p->value( v );
snprintf( s, 5, "%d%%", (int)v );
p->label( s );} {}
}
2008-04-23 07:35:49 +02:00
Function {update_status()} {open
} {
2008-04-24 04:10:20 +02:00
code {static char cbp[5], pbp[5], clp[5];
2008-04-23 07:35:49 +02:00
2008-04-24 04:10:20 +02:00
update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_percent() );
update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
2008-04-29 19:18:27 +02:00
update_progress( cpu_load_progress, clp, engine->cpu_load() );
2008-05-01 13:35:42 +02:00
if ( timeline->total_capture_xruns() )
capture_buffer_progress->selection_color( FL_RED );
if ( timeline->total_playback_xruns() )
playback_buffer_progress->selection_color( FL_RED );
2008-04-29 19:18:27 +02:00
xruns_output->value( engine->xruns() );} {}
2008-04-23 07:35:49 +02:00
}
2008-05-04 03:28:36 +02:00
Function {update_cb( void *v )} {return_type {static void}
2008-04-23 07:35:49 +02:00
} {
code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
((TLE*)v)->update_status();} {}
}
2008-04-27 09:07:16 +02:00
Function {make_about_dialog()} {open
} {
Fl_Window {} {
label About open
2008-05-15 06:23:16 +02:00
xywh {733 400 495 525} type Double visible
2008-04-27 09:07:16 +02:00
} {
Fl_Tabs {} {open
xywh {-4 122 507 419}
} {
Fl_Group {} {
2008-05-06 05:50:57 +02:00
label Credits open
2008-04-27 09:07:16 +02:00
xywh {-4 147 507 394}
} {
Fl_Box {} {
label {Non-DAW was written from scratch by
Jonathan Moore Liles for his own use
(see the manual).
Nobody planned. Nobody helped.
You can help now by donating time, money,
and/or replacing the rest of Linux Audio
with fast, light, reliable alternatives.}
xywh {42 203 416 260} labelsize 17
}
}
Fl_Group {} {
label License open
xywh {-1 157 504 384} hide
} {
Fl_Box {} {
label {Copyright (C) 2008 Jonathan Moore Liles
This software is released under version 3
of the GNU General Public License (GPLv3).}
xywh {45 213 403 83} labelsize 17
}
}
}
Fl_Box {} {
label {the Non-DAW (Digital Audio Workstation)}
2008-05-16 02:26:51 +02:00
xywh {-1 1 499 115} align 16
2008-05-16 02:53:46 +02:00
code0 {o->image( Fl_Shared_Image::get( INSTALL_PREFIX "/share/pixmaps/non-daw/logo.png" ) );}
2008-04-27 09:07:16 +02:00
}
}
}
2008-05-06 22:13:52 +02:00
Function {save_timeline_settings()} {open
} {
2008-05-07 01:33:24 +02:00
code {if ( Project::open() )
2008-05-06 22:13:52 +02:00
{
2008-05-07 01:33:24 +02:00
// save project local options (Timeline menu)
2008-05-06 22:13:52 +02:00
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Timeline" ), "options" );
}} {}
}
Function {load_timeline_settings()} {open
} {
2008-05-07 01:33:24 +02:00
code {if ( Project::open() )
2008-05-06 22:13:52 +02:00
{
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Timeline" ), "options" );
2008-05-15 06:23:16 +02:00
}
update_menu();
project_name->redraw();} {}
}
Function {quit()} {open
} {
code {Project::close();
save();
exit( 0 );} {}
2008-05-06 22:13:52 +02:00
}
2008-04-23 04:22:46 +02:00
}
2008-05-04 03:28:36 +02:00
2008-05-07 01:33:24 +02:00
class New_Project_Dialog {open
2008-05-04 03:28:36 +02:00
} {
2008-05-07 01:33:24 +02:00
Function {New_Project_Dialog()} {open
2008-05-04 03:28:36 +02:00
} {
code {make_window();} {}
}
2008-05-06 06:33:41 +02:00
Function {run()} {open return_type void
2008-05-04 03:28:36 +02:00
} {
code {_window->show();
while ( _window->shown() )
2008-05-04 09:32:54 +02:00
Fl::wait();} {}
2008-05-04 03:28:36 +02:00
}
Function {make_window()} {open
} {
Fl_Window _window {
2008-05-07 01:33:24 +02:00
label {New Project} open
2008-05-15 06:23:16 +02:00
xywh {23 779 550 195} type Double modal visible
2008-05-04 03:28:36 +02:00
} {
Fl_File_Input _name {
label {Named:}
xywh {75 140 375 35}
}
Fl_Button {} {
label Browse
2008-05-07 01:33:24 +02:00
callback {_directory->value( fl_dir_chooser( "Directory for new project", NULL, 0 ) );}
2008-05-05 00:20:38 +02:00
xywh {455 100 80 35}
2008-05-04 03:28:36 +02:00
}
Fl_Return_Button {} {
label Create
2008-05-04 09:32:54 +02:00
callback {if ( strlen( _directory->value() ) && strlen( _name->value() ) )
{
char pat[512];
snprintf( pat, sizeof( pat ), "%s/%s", _directory->value(), _name->value() );
2008-05-05 00:20:38 +02:00
// if ( ! fl_filename_exists( pat ) )
{
2008-05-04 09:32:54 +02:00
2008-05-07 01:33:24 +02:00
if ( ! Project::create( pat, _template->text( _template->value() ) ) )
fl_alert( "Error opening project!" );
2008-05-04 09:32:54 +02:00
2008-05-05 00:20:38 +02:00
_window->hide();
}
// else
// {
// fl_alert( "A file already exists at that location. Choose a differnt name." );
//
// }
2008-05-05 07:42:26 +02:00
}}
2008-05-04 03:28:36 +02:00
xywh {455 140 80 35}
}
2008-05-05 00:20:38 +02:00
Fl_File_Input _directory {
2008-05-04 03:28:36 +02:00
label {Where:}
2008-05-05 00:20:38 +02:00
callback {if ( ! fl_filename_isdir( o->value() ) )
{
fl_alert( "Must be a directory" );
o->value( "" );
}}
xywh {75 100 375 35}
code0 {\#include <FL/filename.H>}
2008-05-04 03:28:36 +02:00
}
Fl_Box {} {
2008-05-07 01:33:24 +02:00
label {New Project}
2008-05-04 03:28:36 +02:00
xywh {15 8 520 33} box RSHADOW_BOX color 133 labelsize 20 labelcolor 32
}
Fl_Choice _template {
label {Template:}
2008-05-05 00:20:38 +02:00
private xywh {310 60 225 25} down_box BORDER_BOX
2008-05-04 03:28:36 +02:00
} {
MenuItem {} {
label Default
xywh {0 0 40 25}
}
}
}
}
}
2008-05-07 01:33:24 +02:00
Function {new_project_chooser()} {open C return_type void
2008-05-04 03:28:36 +02:00
} {
2008-05-07 01:33:24 +02:00
code {New_Project_Dialog nsd;
2008-05-04 03:28:36 +02:00
2008-05-06 06:33:41 +02:00
nsd.run();} {}
2008-05-04 03:28:36 +02:00
}