Timeline: Fix overlay drawing.
This commit is contained in:
parent
b664d0ed04
commit
6adba68975
2
lib/ntk
2
lib/ntk
|
@ -1 +1 @@
|
|||
Subproject commit 5db6dfccef8b26076f2dc985ace462655c176c82
|
||||
Subproject commit a6ac4c8bab5d3b41f382493ab0b1b89ce2d3df92
|
|
@ -59,6 +59,7 @@ void
|
|||
Cursor_Sequence::handle_widget_change ( nframes_t start, nframes_t length )
|
||||
{
|
||||
sort();
|
||||
timeline->redraw_overlay();
|
||||
timeline->redraw();
|
||||
}
|
||||
|
||||
|
|
|
@ -60,22 +60,9 @@
|
|||
#include <nsm.h>
|
||||
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/ */
|
||||
|
|
|
@ -58,20 +58,12 @@ class Fl_Panzoomer;
|
|||
class Fl_Tile;
|
||||
|
||||
#include "RWLock.H"
|
||||
#include <FL/Fl_Overlay_Window.H>
|
||||
|
||||
namespace OSC { class Endpoint; }
|
||||
|
||||
#define USE_WIDGET_FOR_TIMELINE
|
||||
|
||||
|
||||
#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 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;
|
||||
|
@ -143,6 +125,8 @@ class Timeline : public Fl_Single_Window, public RWLock
|
|||
|
||||
public:
|
||||
|
||||
void redraw_overlay ( void );
|
||||
|
||||
void insert_track ( Track *track, Track *before );
|
||||
Track * event_inside ( void );
|
||||
|
||||
|
|
Loading…
Reference in New Issue