Refine transport controls.

This commit is contained in:
Jonathan Moore Liles 2008-04-27 16:08:30 -05:00
parent 6bcadabe8d
commit 5a4cb046d0
2 changed files with 15 additions and 12 deletions

View File

@ -114,7 +114,7 @@ free( path );} {}
label {Non-DAW - Timeline} open
xywh {577 50 1024 768} type Double resizable xclass {Non-DAW} visible
} {
Fl_Menu_Bar menubar {open
Fl_Menu_Bar menubar {open selected
xywh {0 0 1024 25}
} {
Submenu {} {
@ -185,19 +185,14 @@ exit( 0 );}
xywh {10 10 40 25} shortcut 0xff57
}
MenuItem {} {
label Stop
callback {transport->stop();}
xywh {20 20 40 25} shortcut 0x50073
}
MenuItem {} {
label Play
callback {transport->start();}
xywh {30 30 40 25} shortcut 0x50070
label {Play/Stop}
callback {transport->toggle();}
xywh {20 20 40 25} shortcut 0x20
}
MenuItem {} {
label Record
callback {transport->toggle_record();}
xywh {40 40 40 25} shortcut 0x50072
xywh {40 40 40 25} shortcut 0x10072
}
}
Submenu {} {
@ -265,7 +260,7 @@ exit( 0 );}
}
MenuItem {} {
label {Magnetic snap}
callback {Timeline::snap_magnetic = menu_picked_value( o );} selected
callback {Timeline::snap_magnetic = menu_picked_value( o );}
xywh {10 10 40 25} type Toggle value 1
}
Submenu {} {

View File

@ -57,6 +57,13 @@ private:
toggle();
else if ( w == _record_button )
{
if ( _record_button->value() )
w->labelcolor( FL_RED );
else
w->labelcolor( fl_color_average( FL_RED, FL_WHITE, 0.25f ) );
redraw();
if ( rolling )
if ( _record_button->value() )
timeline->record();
@ -107,9 +114,10 @@ public:
_record_button = o = new Fl_Button( 0, 0, bw, 0, "@circle" );
o->type( FL_TOGGLE_BUTTON );
o->labeltype( FL_EMBOSSED_LABEL );
o->labelcolor( FL_RED );
o->labelcolor( fl_color_average( FL_RED, FL_WHITE, 0.25f ) );
o->shortcut( 'R' );
o->callback( cb_button, this );
o->when( FL_WHEN_CHANGED );
o->box( FL_UP_BOX );
end();