Work on cleaning up scrolling bounardy conditions (not done).

This commit is contained in:
Jonathan Moore Liles 2008-04-27 00:11:00 -05:00
parent 6d2521312e
commit afa0a690bc
5 changed files with 17 additions and 18 deletions

View File

@ -140,22 +140,18 @@ public:
return r; return r;
} }
int x ( void ) const { return line_x(); } /* int x ( void ) const { return line_x(); } */
int y ( void ) const { return parent()->y() + ((float)parent()->h() * _y); }
int w ( void ) const { return 6; }
int h ( void ) const { return 6; }
/* void */ int abs_w ( void ) const { return 6; }
/* draw_box ( int X, int Y, int W, int H ) */
/* { */ // int w ( void ) const { return 6; }
/* } */
int y ( void ) const { return parent()->y() + ((float)parent()->h() * _y); }
int h ( void ) const { return 6; }
void void
draw ( int X, int Y, int W, int H ) draw ( int X, int Y, int W, int H )
{ {
// fl_draw_box( box(), x(), y(), w(), h(), box_color() );
return;
} }
}; };

View File

@ -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 ) if ( r == e )
{ {

View File

@ -556,7 +556,6 @@ Region::draw_box( void )
Fl_Color selection_color = _selection_color; Fl_Color selection_color = _selection_color;
Fl_Color color = Region::inherit_track_color ? track()->track()->color() : _box_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 ); timeline->draw_measure_lines( rx, Y, rw, H, _box_color );
fl_color( FL_BLACK ); /* fl_color( FL_BLACK ); */
fl_line( rx, Y, rx, Y + H ); /* fl_line( rx, Y, rx, Y + H ); */
fl_line( rx + rw - 1, Y, rx + rw - 1, Y + H ); /* fl_line( rx + rw - 1, Y, rx + rw - 1, Y + H ); */
draw_label( _clip->name(), align() ); draw_label( _clip->name(), align() );

View File

@ -55,7 +55,7 @@ protected:
public: public:
Fl_Align align ( void ) const { return FL_ALIGN_RIGHT; } 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() ); } nframes_t length ( void ) const { return timeline->x_to_ts( abs_w() ); }
Sequence_Point ( ) Sequence_Point ( )

View File

@ -269,7 +269,10 @@ public:
virtual int h ( void ) const { return _track->h(); } virtual int h ( void ) const { return _track->h(); }
/* used by regions */ /* 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 */ /* use this as x() when you need to draw lines between widgets */
int line_x ( void ) const int line_x ( void ) const