@@ -205,6 +205,16 @@ public: | |||||
delete _selection.front(); | delete _selection.front(); | ||||
} | } | ||||
static void | |||||
select_none ( void ) | |||||
{ | |||||
while ( _selection.size() ) | |||||
{ | |||||
_selection.front()->redraw(); | |||||
_selection.pop_front(); | |||||
} | |||||
} | |||||
static Sequence_Widget *current ( void ) { return Sequence_Widget::_current; } | static Sequence_Widget *current ( void ) { return Sequence_Widget::_current; } | ||||
static Sequence_Widget *pushed ( void ) { return Sequence_Widget::_pushed; } | static Sequence_Widget *pushed ( void ) { return Sequence_Widget::_pushed; } | ||||
@@ -114,7 +114,7 @@ free( path );} {} | |||||
label {Non-DAW - Timeline} open | label {Non-DAW - Timeline} open | ||||
xywh {577 94 1024 768} type Double resizable xclass {Non-DAW} visible | xywh {577 94 1024 768} type Double resizable xclass {Non-DAW} visible | ||||
} { | } { | ||||
Fl_Menu_Bar menubar { | |||||
Fl_Menu_Bar menubar {open | |||||
xywh {0 0 1024 25} | xywh {0 0 1024 25} | ||||
} { | } { | ||||
Submenu {} { | Submenu {} { | ||||
@@ -167,7 +167,17 @@ exit( 0 );} | |||||
MenuItem {} { | MenuItem {} { | ||||
label Undo | label Undo | ||||
callback {Loggable::undo();} | callback {Loggable::undo();} | ||||
xywh {0 0 40 25} shortcut 0x4007a | |||||
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} | |||||
callback {timeline->delete_selected();} selected | |||||
xywh {20 20 40 25} shortcut 0xffff | |||||
} | } | ||||
} | } | ||||
Submenu {} { | Submenu {} { | ||||
@@ -510,7 +520,7 @@ delete win;} | |||||
class Timeline | class Timeline | ||||
} | } | ||||
Fl_Value_Output xruns_output { | Fl_Value_Output xruns_output { | ||||
label {xruns:} selected | |||||
label {xruns:} | |||||
xywh {980 2 44 20} maximum 40000 step 1 | xywh {980 2 44 20} maximum 40000 step 1 | ||||
} | } | ||||
} | } | ||||
@@ -742,7 +742,7 @@ Timeline::draw_overlay ( void ) | |||||
/** select all widgets in inside rectangle /r/ */ | /** select all widgets in inside rectangle /r/ */ | ||||
void | void | ||||
Timeline::select( const Rectangle &r ) | |||||
Timeline::select ( const Rectangle &r ) | |||||
{ | { | ||||
const int Y = r.y; | const int Y = r.y; | ||||
@@ -755,6 +755,18 @@ Timeline::select( const Rectangle &r ) | |||||
} | } | ||||
} | } | ||||
void | |||||
Timeline::delete_selected ( void ) | |||||
{ | |||||
Sequence_Widget::delete_selected(); | |||||
} | |||||
void | |||||
Timeline::select_none ( void ) | |||||
{ | |||||
Sequence_Widget::select_none(); | |||||
} | |||||
int | int | ||||
Timeline::handle ( int m ) | Timeline::handle ( int m ) | ||||
{ | { | ||||
@@ -776,11 +788,6 @@ Timeline::handle ( int m ) | |||||
switch ( Fl::event_key() ) | switch ( Fl::event_key() ) | ||||
{ | { | ||||
case FL_Delete: | case FL_Delete: | ||||
{ | |||||
Sequence_Widget::delete_selected(); | |||||
return 1; | |||||
} | |||||
case FL_Home: | case FL_Home: | ||||
case FL_End: | case FL_End: | ||||
/* keep scrollbar from eating these. */ | /* keep scrollbar from eating these. */ | ||||
@@ -158,6 +158,10 @@ public: | |||||
void select( const Rectangle &r ); | void select( const Rectangle &r ); | ||||
void delete_selected ( void ); | |||||
void select_none ( void ); | |||||
void add_track ( Track *track ); | void add_track ( Track *track ); | ||||
void remove_track ( Track *track ); | void remove_track ( Track *track ); | ||||
@@ -172,6 +176,8 @@ public: | |||||
void zoom_in ( void ); | void zoom_in ( void ); | ||||
void zoom_out ( void ); | void zoom_out ( void ); | ||||
private: | private: | ||||
friend class Engine; // FIXME: only Engine::process() needs to be friended.x | friend class Engine; // FIXME: only Engine::process() needs to be friended.x | ||||