Browse Source

Draw capture in red.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
ef0851b426
3 changed files with 12 additions and 4 deletions
  1. +2
    -0
      Timeline/Audio_Sequence.H
  2. +7
    -4
      Timeline/Region.C
  3. +3
    -0
      Timeline/Track.H

+ 2
- 0
Timeline/Audio_Sequence.H 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 );

};

+ 7
- 4
Timeline/Region.C 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 );



+ 3
- 0
Timeline/Track.H 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 );


Loading…
Cancel
Save