|
|
@@ -85,7 +85,7 @@ Region::init ( void ) |
|
|
|
_end = 0; |
|
|
|
_scale = 1.0f; |
|
|
|
_clip = NULL; |
|
|
|
|
|
|
|
_current = false; |
|
|
|
|
|
|
|
_box_color = FL_CYAN; |
|
|
|
_color = FL_BLUE; |
|
|
@@ -103,6 +103,7 @@ Region::Region ( const Region & rhs ) |
|
|
|
_scale = rhs._scale; |
|
|
|
_box_color = rhs._box_color; |
|
|
|
_color = rhs._color; |
|
|
|
_current = false; |
|
|
|
|
|
|
|
log_create(); |
|
|
|
} |
|
|
@@ -222,6 +223,14 @@ Region::handle ( int m ) |
|
|
|
|
|
|
|
switch ( m ) |
|
|
|
{ |
|
|
|
case FL_ENTER: |
|
|
|
_current = true; |
|
|
|
redraw(); |
|
|
|
break; |
|
|
|
case FL_LEAVE: |
|
|
|
_current = false; |
|
|
|
redraw(); |
|
|
|
break; |
|
|
|
case FL_PUSH: |
|
|
|
{ |
|
|
|
|
|
|
@@ -469,7 +478,14 @@ Region::draw ( int X, int Y, int W, int H ) |
|
|
|
|
|
|
|
draw_label( _clip->name(), align() ); |
|
|
|
|
|
|
|
if ( _current ) |
|
|
|
{ |
|
|
|
char pat[40]; |
|
|
|
|
|
|
|
snprintf( pat, sizeof( pat ), "%dm:%.1fs", (int)(length() / timeline->sample_rate) / 60, (double)length() / timeline->sample_rate ); |
|
|
|
|
|
|
|
draw_label( pat, (Fl_Align)(FL_ALIGN_INSIDE | FL_ALIGN_CENTER), FL_GRAY ); |
|
|
|
} |
|
|
|
|
|
|
|
/* if ( _selected ) */ |
|
|
|
/* { */ |
|
|
|