Log auido tracks as Audio_Track.

This commit is contained in:
Jonathan Moore Liles 2008-03-09 16:27:06 -05:00
parent 7d6121e2d8
commit 90a5568a20
4 changed files with 26 additions and 11 deletions

View File

@ -31,6 +31,12 @@ public:
Audio_Track ( int X, int Y, int W, int H ) : Track( X, Y, W, H ) Audio_Track ( int X, int Y, int W, int H ) : Track( X, Y, W, H )
{ {
log_create();
}
~Audio_Track ( )
{
log_destroy();
} }

View File

@ -31,6 +31,13 @@ public:
Control_Track ( int X, int Y, int W, int H ) : Track( X, Y, W, H ) Control_Track ( int X, int Y, int W, int H ) : Track( X, Y, W, H )
{ {
color( fl_darker( FL_GREEN ) ); color( fl_darker( FL_GREEN ) );
log_create();
}
~Control_Track ( )
{
log_destroy();
} }
const char *class_name ( void ) { return "Control_Track"; } const char *class_name ( void ) { return "Control_Track"; }

View File

@ -37,7 +37,7 @@ Track::Track ( int X, int Y, int W, int H ) : Fl_Widget( X, Y, W, H )
color( fl_darker( FL_GRAY ) ); color( fl_darker( FL_GRAY ) );
align( FL_ALIGN_LEFT ); align( FL_ALIGN_LEFT );
log_create(); // log_create();
} }
Track::~Track ( ) Track::~Track ( )
@ -45,7 +45,7 @@ Track::~Track ( )
/* FIXME: what to do with regions? */ /* FIXME: what to do with regions? */
parent()->redraw(); parent()->redraw();
parent()->remove( this ); parent()->remove( this );
log_destroy(); // log_destroy();
} }
void void

20
Track.H
View File

@ -67,17 +67,19 @@ protected:
sa[0] = (char*)malloc( (_widgets.size() * ((sizeof( int ) * 2) + 3)) + 1 ); sa[0] = (char*)malloc( (_widgets.size() * ((sizeof( int ) * 2) + 3)) + 1 );
sa[1] = NULL; sa[1] = NULL;
char *s = sa[0]; sa[0][0] = '\0';
s += sprintf( s, ":items " ); /* char *s = sa[0]; */
for ( list <Track_Widget *>::const_iterator i = _widgets.begin(); i != _widgets.end(); i++ )
{
s += sprintf( s, "0x%X", ((Loggable*)(*i))->id() );
list <Track_Widget *>::const_iterator e = i; /* s += sprintf( s, ":items " ); */
if ( ++e != _widgets.end() ) /* for ( list <Track_Widget *>::const_iterator i = _widgets.begin(); i != _widgets.end(); i++ ) */
s += sprintf( s, "," ); /* { */
} /* s += sprintf( s, "0x%X", ((Loggable*)(*i))->id() ); */
/* list <Track_Widget *>::const_iterator e = i; */
/* if ( ++e != _widgets.end() ) */
/* s += sprintf( s, "," ); */
/* } */
return sa; return sa;
} }