Enhance the way sequence points are drawn.

This commit is contained in:
Jonathan Moore Liles 2008-04-30 19:38:49 -05:00
parent 34400df589
commit 80005dcf89
3 changed files with 19 additions and 9 deletions

View File

@ -33,12 +33,12 @@ public:
// box( FL_UP_BOX ); // box( FL_UP_BOX );
} }
void /* void */
draw ( void ) /* draw ( void ) */
{ /* { */
Sequence::draw(); /* // timeline->draw_measure_BBT( x(), y(), w(), h(), FL_WHITE ); */
timeline->draw_measure_BBT( x(), y(), w(), h(), FL_WHITE ); /* Sequence::draw(); */
} /* } */
int handle ( int m ) int handle ( int m )
{ {

View File

@ -111,7 +111,7 @@ Sequence::draw ( void )
// printf( "track::draw %d,%d %dx%d\n", X,Y,W,H ); // printf( "track::draw %d,%d %dx%d\n", X,Y,W,H );
timeline->draw_measure_lines( x(), y(), w(), h(), color() ); timeline->draw_measure_lines( X, Y, W, H, color() );
for ( list <Sequence_Widget *>::const_iterator r = _widgets.begin(); r != _widgets.end(); r++ ) for ( list <Sequence_Widget *>::const_iterator r = _widgets.begin(); r != _widgets.end(); r++ )
(*r)->draw_box(); (*r)->draw_box();

View File

@ -56,10 +56,12 @@ public:
Fl_Align align ( void ) const { return FL_ALIGN_RIGHT; } Fl_Align align ( void ) const { return FL_ALIGN_RIGHT; }
/* FIXME: hack */
virtual int x ( void ) const { const int x = Sequence_Widget::x(); if ( x == _track->x() ) return x - 3; else return x; }
virtual int abs_w ( void ) const { return 10; } virtual int abs_w ( void ) const { return 10; }
/* FIXME: hack */
virtual int x ( void ) const { const int x = Sequence_Widget::x() - ( abs_w() >> 1 ); if ( x == _track->x() ) return x - 3; else return x; }
nframes_t length ( void ) const { return timeline->x_to_ts( abs_w() ); } nframes_t length ( void ) const { return timeline->x_to_ts( abs_w() ); }
Sequence_Point ( ) Sequence_Point ( )
@ -77,6 +79,14 @@ public:
{ {
Sequence_Widget::draw(); Sequence_Widget::draw();
const int x = Sequence_Widget::x();
const int y = this->y() + Fl::box_dy( box() );
fl_color( FL_WHITE );
fl_line( x, y, x, y + h() - Fl::box_dh( box() ) );
draw_label( _label, align() ); draw_label( _label, align() );
} }
}; };