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 )
{
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 )
{
color( fl_darker( FL_GREEN ) );
log_create();
}
~Control_Track ( )
{
log_destroy();
}
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 ) );
align( FL_ALIGN_LEFT );
log_create();
// log_create();
}
Track::~Track ( )
@ -45,7 +45,7 @@ Track::~Track ( )
/* FIXME: what to do with regions? */
parent()->redraw();
parent()->remove( this );
log_destroy();
// log_destroy();
}
void

20
Track.H
View File

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