Draw capture in red.

pull/3/head
Jonathan Moore Liles 2008-04-25 02:07:18 -05:00
parent 4bee9a7053
commit ef0851b426
3 changed files with 12 additions and 4 deletions

View File

@ -105,6 +105,8 @@ public:
void dump ( void );
void remove_selected ( void );
const Region *capture ( void ) const { return track()->capture(); }
nframes_t play ( sample_t *buf, nframes_t frame, nframes_t nframes, int channels );
};

View File

@ -22,6 +22,8 @@
#include "Timeline.H"
#include "Waveform.H"
#include "Audio_Sequence.H"
#include "dsp.h"
#include <FL/fl_draw.H>
@ -548,12 +550,14 @@ Region::draw_box( void )
fl_push_clip( x(), y(), w(), h() );
int active = active_r();
Fl_Color selection_color = _selection_color;
Fl_Color color = _box_color;
if ( ! active_r() )
if ( this == ((Audio_Sequence*)track())->capture() )
{
color = FL_RED;
}
else if ( ! active_r() )
{
color = fl_inactive( color );
selection_color = fl_inactive( selection_color );
@ -561,7 +565,6 @@ Region::draw_box( void )
if ( selected() )
fl_draw_box( fl_down( box() ), x() - 10, y(), w() + 50, h(), selection_color );
// fl_draw_box( fl_down( box() ), x() - 10, Y, w() + 50, H, fl_invert_color( _box_color ) );
else
fl_draw_box( box(), x() - 10, y(), w() + 50, h(), color );

View File

@ -229,6 +229,9 @@ public:
void draw ( void );
int handle ( int m );
const Region *capture ( void ) const { return _capture; }
/* Engine */
nframes_t process ( nframes_t nframes );
void seek ( nframes_t frame );