non/Timeline/TLE.fl

401 lines
11 KiB
Plaintext
Raw Normal View History

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}
decl {const float STATUS_UPDATE_FREQ = 0.5f;} {}
2008-04-23 04:22:46 +02:00
decl {\#include "Timeline.H"} {}
decl {\#include "Engine.H"} {}
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-04-23 04:22:46 +02:00
decl {\#include "Clock.H"} {public
}
decl {\#include "Waveform.H" // for options} {}
decl {\#include "Control_Sequence.H" // for options} {}
2008-04-24 00:29:14 +02:00
decl {\#include <FL/fl_ask.H>} {}
2008-04-23 04:22:46 +02:00
decl {\#include <FL/Fl.H>} {}
class TLE {open
} {
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-23 04:22:46 +02:00
Function {TLE()} {open
} {
code {make_window();
// Fl::visual( RGB8 );
Fl::visible_focus( 0 );
Fl::get_system_colors();
Fl::scheme( "plastic" );
Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );} {}
2008-04-23 04:22:46 +02:00
}
Function {make_window()} {open
} {
Fl_Window main_window {
label {Non-DAW - Timeline} open
2008-04-24 04:10:20 +02:00
xywh {522 141 1024 768} type Double resizable xclass {Non-DAW} visible
2008-04-23 04:22:46 +02:00
} {
2008-04-24 04:10:20 +02:00
Fl_Menu_Bar menubar {
label {capture:\\nfoo}
2008-04-23 04:22:46 +02:00
xywh {0 0 1024 25}
} {
Submenu {} {
label {&Session} open
xywh {0 0 74 25}
} {
MenuItem {} {
label {&New}
xywh {0 0 40 25}
}
MenuItem {} {
label {&Open}
xywh {10 10 40 25}
}
MenuItem {} {
label {&Compact}
2008-04-24 00:29:14 +02:00
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" );
if ( n != 2 )
return;
2008-04-24 04:10:20 +02:00
Loggable::compact();}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25}
}
Submenu {} {
label Export open
xywh {0 0 74 25}
} {
MenuItem {} {
label Session
xywh {0 0 40 25}
}
MenuItem {} {
label Range
xywh {10 10 40 25}
}
}
MenuItem {} {
label {&Quit}
callback {exit( 0 );}
2008-04-23 04:22:46 +02:00
xywh {40 40 40 25} shortcut 0x40071
}
}
Submenu {} {
label {&Edit} open
xywh {0 0 74 25}
} {
MenuItem {} {
label Preferences
xywh {0 0 40 25}
}
MenuItem {} {
label Undo
xywh {0 0 40 25} shortcut 0x4007a
}
}
Submenu {} {
label Transport open
xywh {0 0 74 25}
} {
MenuItem {} {
label Home
callback {transport->locate( 0 );}
xywh {0 0 40 25} shortcut 0xff50
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label End
callback {transport->locate( timeline->length() );}
xywh {10 10 40 25} shortcut 0xff57
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label Stop
callback {transport->stop();}
xywh {20 20 40 25} shortcut 0x50073
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label Play
callback {transport->start();}
xywh {30 30 40 25} shortcut 0x50070
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label Record
xywh {40 40 40 25} shortcut 0x50072
2008-04-23 04:22:46 +02:00
}
}
Submenu {} {
label {&View} open
xywh {0 0 74 25}
} {
Submenu {} {
label {&Zoom} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
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}
xywh {10 10 40 25} divider
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 sec.}
callback {timeline->zoom( 1 );}
xywh {10 10 40 25} shortcut 0x31
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 min.}
callback {timeline->zoom( 60 );}
xywh {20 20 40 25} shortcut 0x32
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 hour.}
callback {timeline->zoom( 60 * 60 );}
xywh {30 30 40 25} shortcut 0x33
2008-04-23 04:22:46 +02:00
}
}
}
Submenu {} {
label {&Options} open
xywh {0 0 74 25} divider
} {
Submenu {} {
label {&Display} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
Submenu {} {
label {&Waveforms} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
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 {} {
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
}
}
Submenu {} {
label {&Region} open
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
}
}
Submenu {} {
label {&Control Sequence} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Polygon
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
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
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 {} {
label {&Style} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Default
callback {Fl::scheme( "plastic" );}
2008-04-23 04:22:46 +02:00
xywh {0 0 40 25} type Radio value 1
}
MenuItem {} {
label Flat
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
callback {Fl::get_system_colors();
Fl::scheme( Fl::scheme() );}
2008-04-23 04:22:46 +02:00
xywh {0 0 40 25} type Radio
}
MenuItem {} {
label Dark
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
callback {Fl::background2( 255, 255, 255 );
Fl::background( 172, 172, 172 );
Fl::foreground( 0, 0, 0 );
Fl::scheme( Fl::scheme() );}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25} type Radio
}
}
}
}
MenuItem {} {
label {&Help}
xywh {0 0 40 25}
}
}
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 04:10:20 +02:00
Fl_Pack {} {open selected
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
}
Fl_Pack clocks_pack {
xywh {185 23 288 46} type HORIZONTAL
code0 {o->spacing( 2 );}
} {
Fl_Box playhead_clock {
label PLAYHEAD
xywh {185 29 137 40} box BORDER_BOX color 46
code0 {o->type( Clock::HMS );}
code1 {o->run( &transport->frame );}
class Clock
}
Fl_Box {} {
label PLAYHEAD
xywh {325 29 142 40} box BORDER_BOX color 46
code0 {o->type( Clock::BBT );}
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-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 );} {}
}
Function {update_status()} {open
} {
2008-04-24 04:10:20 +02:00
code {static char cbp[5], pbp[5], clp[5];
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() );
update_progress( cpu_load_progress, clp, engine->cpu_load() );} {}
}
Function {update_cb( void *v )} {open return_type {static void}
} {
code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
((TLE*)v)->update_status();} {}
}
2008-04-23 04:22:46 +02:00
}
Function {make_window()} {open
} {}