@@ -1 +1 @@ | |||||
Subproject commit 5db6dfccef8b26076f2dc985ace462655c176c82 | |||||
Subproject commit a6ac4c8bab5d3b41f382493ab0b1b89ce2d3df92 |
@@ -59,6 +59,7 @@ void | |||||
Cursor_Sequence::handle_widget_change ( nframes_t start, nframes_t length ) | Cursor_Sequence::handle_widget_change ( nframes_t start, nframes_t length ) | ||||
{ | { | ||||
sort(); | sort(); | ||||
timeline->redraw_overlay(); | |||||
timeline->redraw(); | timeline->redraw(); | ||||
} | } | ||||
@@ -60,22 +60,9 @@ | |||||
#include <nsm.h> | #include <nsm.h> | ||||
extern nsm_client_t *nsm; | extern nsm_client_t *nsm; | ||||
#ifdef USE_WIDGET_FOR_TIMELINE | |||||
#define BASE Fl_Group | #define BASE Fl_Group | ||||
#define redraw_overlay() ((Fl_Overlay_Window*)window())->redraw_overlay() | |||||
#define BX this->x() | #define BX this->x() | ||||
#define BY this->y() | #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 | nframes_t | ||||
Timeline::range_start ( void ) const | 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_yposition = 0; | ||||
_old_xposition = 0; | _old_xposition = 0; | ||||
#ifndef USE_WIDGET_FOR_TIMELINE | |||||
X = Y = 0; | |||||
#endif | |||||
// range_start( range_end( 0 ) ); | // range_start( range_end( 0 ) ); | ||||
menu = new Fl_Menu_Button( 0, 0, 0, 0, "Timeline" ); | menu = new Fl_Menu_Button( 0, 0, 0, 0, "Timeline" ); | ||||
@@ -1527,8 +1517,6 @@ Timeline::update_cb ( void *arg ) | |||||
void | void | ||||
Timeline::draw_overlay ( void ) | Timeline::draw_overlay ( void ) | ||||
{ | { | ||||
fl_push_no_clip(); | |||||
draw_playhead(); | draw_playhead(); | ||||
draw_cursors(); | draw_cursors(); | ||||
@@ -1548,8 +1536,6 @@ Timeline::draw_overlay ( void ) | |||||
fl_rect( r.x, r.y, r.w, r.h ); | fl_rect( r.x, r.y, r.w, r.h ); | ||||
fl_pop_clip(); | fl_pop_clip(); | ||||
fl_pop_clip(); | |||||
} | } | ||||
/** select sequence widgets within rectangle /r/ */ | /** select sequence widgets within rectangle /r/ */ | ||||
@@ -58,20 +58,12 @@ class Fl_Panzoomer; | |||||
class Fl_Tile; | class Fl_Tile; | ||||
#include "RWLock.H" | #include "RWLock.H" | ||||
#include <FL/Fl_Overlay_Window.H> | |||||
namespace OSC { class Endpoint; } | namespace OSC { class Endpoint; } | ||||
#define USE_WIDGET_FOR_TIMELINE | |||||
#include <lo/lo.h> | #include <lo/lo.h> | ||||
#ifndef USE_SINGLEBUFFERED_TIMELINE | |||||
#include <FL/Fl_Overlay_Window.H> | |||||
#else | |||||
#include <FL/Fl_Single_Window.H> | |||||
#endif | |||||
struct position_info; | struct position_info; | ||||
struct Rectangle | 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 ) {} | 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 | 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; | class Timeline_Panzoomer; | ||||
@@ -142,7 +124,9 @@ class Timeline : public Fl_Single_Window, public RWLock | |||||
public: | public: | ||||
void redraw_overlay ( void ); | |||||
void insert_track ( Track *track, Track *before ); | void insert_track ( Track *track, Track *before ); | ||||
Track * event_inside ( void ); | Track * event_inside ( void ); | ||||