diff --git a/lib/ntk b/lib/ntk index 5db6dfc..a6ac4c8 160000 --- a/lib/ntk +++ b/lib/ntk @@ -1 +1 @@ -Subproject commit 5db6dfccef8b26076f2dc985ace462655c176c82 +Subproject commit a6ac4c8bab5d3b41f382493ab0b1b89ce2d3df92 diff --git a/timeline/src/Cursor_Sequence.C b/timeline/src/Cursor_Sequence.C index e420b40..2f683e9 100644 --- a/timeline/src/Cursor_Sequence.C +++ b/timeline/src/Cursor_Sequence.C @@ -59,6 +59,7 @@ void Cursor_Sequence::handle_widget_change ( nframes_t start, nframes_t length ) { sort(); + timeline->redraw_overlay(); timeline->redraw(); } diff --git a/timeline/src/Timeline.C b/timeline/src/Timeline.C index 30c998b..1d561d0 100644 --- a/timeline/src/Timeline.C +++ b/timeline/src/Timeline.C @@ -60,22 +60,9 @@ #include extern nsm_client_t *nsm; -#ifdef USE_WIDGET_FOR_TIMELINE #define BASE Fl_Group -#define redraw_overlay() ((Fl_Overlay_Window*)window())->redraw_overlay() #define BX this->x() #define BY this->y() -#else -#ifdef USE_SINGLEBUFFERED_TIMELINE -#warning Using singlebuffered timeline window. This may cause flicker and makes the cursors invisible. -#define BASE Fl_Single_Window -#define redraw_overlay() -#else -#define BASE Fl_Overlay_Window -#endif -#define BX 0 -#define BY 0 -#endif @@ -198,6 +185,13 @@ protected: + +void +Timeline::redraw_overlay ( void ) +{ + ((Fl_Overlay_Window*)window())->redraw_overlay(); +} + nframes_t Timeline::range_start ( void ) const { @@ -610,10 +604,6 @@ Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : BASE( X, Y, W _old_yposition = 0; _old_xposition = 0; -#ifndef USE_WIDGET_FOR_TIMELINE - X = Y = 0; -#endif - // range_start( range_end( 0 ) ); menu = new Fl_Menu_Button( 0, 0, 0, 0, "Timeline" ); @@ -1527,8 +1517,6 @@ Timeline::update_cb ( void *arg ) void Timeline::draw_overlay ( void ) { - fl_push_no_clip(); - draw_playhead(); draw_cursors(); @@ -1548,8 +1536,6 @@ Timeline::draw_overlay ( void ) fl_rect( r.x, r.y, r.w, r.h ); fl_pop_clip(); - - fl_pop_clip(); } /** select sequence widgets within rectangle /r/ */ diff --git a/timeline/src/Timeline.H b/timeline/src/Timeline.H index 3d382be..868cd19 100644 --- a/timeline/src/Timeline.H +++ b/timeline/src/Timeline.H @@ -58,20 +58,12 @@ class Fl_Panzoomer; class Fl_Tile; #include "RWLock.H" +#include namespace OSC { class Endpoint; } -#define USE_WIDGET_FOR_TIMELINE - - #include -#ifndef USE_SINGLEBUFFERED_TIMELINE -#include -#else -#include -#endif - struct position_info; struct Rectangle @@ -85,17 +77,7 @@ struct Rectangle Rectangle ( int X, int Y, int W, int H ) : x( X ), y( Y ), w( W ), h( H ) {} }; -#ifdef USE_WIDGET_FOR_TIMELINE class Timeline : public Fl_Group, public RWLock -#else -#ifndef USE_SINGLEBUFFERED_TIMELINE -class Timeline : public Fl_Overlay_Window, public RWLock -#else -class Timeline : public Fl_Single_Window, public RWLock -#endif -#endif - - { class Timeline_Panzoomer; @@ -142,7 +124,9 @@ class Timeline : public Fl_Single_Window, public RWLock public: - + + void redraw_overlay ( void ); + void insert_track ( Track *track, Track *before ); Track * event_inside ( void );