diff --git a/Timeline/Control_Point.H b/Timeline/Control_Point.H index af7dc32..3ef484d 100644 --- a/Timeline/Control_Point.H +++ b/Timeline/Control_Point.H @@ -140,22 +140,18 @@ public: return r; } - int x ( void ) const { return line_x(); } +/* int x ( void ) const { return line_x(); } */ + + int abs_w ( void ) const { return 6; } + +// int w ( void ) const { return 6; } + int y ( void ) const { return parent()->y() + ((float)parent()->h() * _y); } - int w ( void ) const { return 6; } int h ( void ) const { return 6; } -/* void */ -/* draw_box ( int X, int Y, int W, int H ) */ -/* { */ -/* } */ - void draw ( int X, int Y, int W, int H ) { - -// fl_draw_box( box(), x(), y(), w(), h(), box_color() ); - return; } }; diff --git a/Timeline/Control_Sequence.C b/Timeline/Control_Sequence.C index 8c99510..89e93a4 100644 --- a/Timeline/Control_Sequence.C +++ b/Timeline/Control_Sequence.C @@ -116,7 +116,7 @@ Control_Sequence::draw_curve ( bool flip, bool filled ) } } - fl_vertex( (*r)->x(), ry ); + fl_vertex( (*r)->line_x(), ry ); if ( r == e ) { diff --git a/Timeline/Region.C b/Timeline/Region.C index 457df31..d1fb03d 100644 --- a/Timeline/Region.C +++ b/Timeline/Region.C @@ -556,7 +556,6 @@ Region::draw_box( void ) Fl_Color selection_color = _selection_color; - Fl_Color color = Region::inherit_track_color ? track()->track()->color() : _box_color; @@ -681,11 +680,12 @@ Region::draw ( void ) } } + /* FIXME: only draw as many as are necessary! */ timeline->draw_measure_lines( rx, Y, rw, H, _box_color ); - fl_color( FL_BLACK ); - fl_line( rx, Y, rx, Y + H ); - fl_line( rx + rw - 1, Y, rx + rw - 1, Y + H ); +/* fl_color( FL_BLACK ); */ +/* fl_line( rx, Y, rx, Y + H ); */ +/* fl_line( rx + rw - 1, Y, rx + rw - 1, Y + H ); */ draw_label( _clip->name(), align() ); diff --git a/Timeline/Sequence_Point.H b/Timeline/Sequence_Point.H index 383c4c3..ae62905 100644 --- a/Timeline/Sequence_Point.H +++ b/Timeline/Sequence_Point.H @@ -55,7 +55,7 @@ protected: public: Fl_Align align ( void ) const { return FL_ALIGN_RIGHT; } - int abs_w ( void ) const { return 10; } + virtual int abs_w ( void ) const { return 10; } nframes_t length ( void ) const { return timeline->x_to_ts( abs_w() ); } Sequence_Point ( ) diff --git a/Timeline/Sequence_Widget.H b/Timeline/Sequence_Widget.H index 34fc7ab..4ab13fc 100644 --- a/Timeline/Sequence_Widget.H +++ b/Timeline/Sequence_Widget.H @@ -269,7 +269,10 @@ public: virtual int h ( void ) const { return _track->h(); } /* used by regions */ - virtual int x ( void ) const { return _r->offset < timeline->xoffset ? _track->x() - 1 : min( 32767, _track->x() + timeline->ts_to_x( _r->offset - timeline->xoffset ) ); } + virtual int x ( void ) const + { + return _r->offset < timeline->xoffset ? _track->x() : min( _track->x() + _track->w(), _track->x() + timeline->ts_to_x( _r->offset - timeline->xoffset ) ); + } /* use this as x() when you need to draw lines between widgets */ int line_x ( void ) const