Browse Source

Enhance the way sequence points are drawn.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
80005dcf89
3 changed files with 19 additions and 9 deletions
  1. +6
    -6
      Timeline/Ruler_Sequence.H
  2. +1
    -1
      Timeline/Sequence.C
  3. +12
    -2
      Timeline/Sequence_Point.H

+ 6
- 6
Timeline/Ruler_Sequence.H View File

@@ -33,12 +33,12 @@ public:
// box( FL_UP_BOX );
}

void
draw ( void )
{
Sequence::draw();
timeline->draw_measure_BBT( x(), y(), w(), h(), FL_WHITE );
}
/* void */
/* draw ( void ) */
/* { */
/* // timeline->draw_measure_BBT( x(), y(), w(), h(), FL_WHITE ); */
/* Sequence::draw(); */
/* } */

int handle ( int m )
{


+ 1
- 1
Timeline/Sequence.C View File

@@ -111,7 +111,7 @@ Sequence::draw ( void )

// 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++ )
(*r)->draw_box();


+ 12
- 2
Timeline/Sequence_Point.H View File

@@ -56,10 +56,12 @@ public:

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; }

/* 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() ); }

Sequence_Point ( )
@@ -77,6 +79,14 @@ public:
{
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() );
}
};

Loading…
Cancel
Save