Cleanups.
This commit is contained in:
parent
212dc3e3ea
commit
8a927c8876
|
@ -39,6 +39,8 @@ class Loggable;
|
|||
typedef Loggable *(create_func)(Log_Entry &);
|
||||
|
||||
|
||||
#define LOG_REGISTER_CREATE( class ) \
|
||||
Loggable::register_create( #class, & class ::create );
|
||||
|
||||
#define LOG_CREATE_FUNC( class ) \
|
||||
static Loggable * \
|
||||
|
|
|
@ -99,6 +99,7 @@ private:
|
|||
Fade _fade_out;
|
||||
|
||||
friend class Track; /* for _clip */
|
||||
|
||||
protected:
|
||||
|
||||
const char *class_name ( void ) { return "Region"; }
|
||||
|
|
|
@ -284,6 +284,34 @@ Track::size ( int v )
|
|||
resize();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Track::add ( Sequence * t )
|
||||
{
|
||||
takes->insert( *t, 0 );
|
||||
if ( ! t->name() )
|
||||
{
|
||||
char pat[20];
|
||||
snprintf( pat, sizeof( pat ), "%d", takes->children() );
|
||||
t->name( strdup( pat ) );
|
||||
take_menu->add( t->name() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
Track::remove ( Sequence *t )
|
||||
{
|
||||
takes->remove( t );
|
||||
// take_menu->remove( t->name() );
|
||||
}
|
||||
|
||||
void
|
||||
Track::remove ( Control_Sequence *t )
|
||||
{
|
||||
control->remove( t );
|
||||
}
|
||||
|
||||
void
|
||||
Track::track ( Sequence * t )
|
||||
{
|
||||
|
|
|
@ -162,6 +162,9 @@ public:
|
|||
LOG_CREATE_FUNC( Track );
|
||||
|
||||
void add ( Control_Sequence *t );
|
||||
void add ( Sequence *t );
|
||||
void remove ( Sequence *t );
|
||||
void remove ( Control_Sequence *t );
|
||||
|
||||
int size ( void ) const { return _size; }
|
||||
|
||||
|
@ -205,26 +208,6 @@ public:
|
|||
void track( Sequence * t );
|
||||
Sequence * track ( void ) { return _track; }
|
||||
|
||||
void add ( Sequence * t )
|
||||
{
|
||||
takes->insert( *t, 0 );
|
||||
if ( ! t->name() )
|
||||
{
|
||||
char pat[20];
|
||||
snprintf( pat, sizeof( pat ), "%d", takes->children() );
|
||||
t->name( strdup( pat ) );
|
||||
take_menu->add( t->name() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void remote ( Sequence *t )
|
||||
{
|
||||
takes->remove( t );
|
||||
// take_menu->remove( t->name() );
|
||||
}
|
||||
|
||||
|
||||
void draw ( void );
|
||||
int handle ( int m );
|
||||
|
||||
|
|
|
@ -73,13 +73,13 @@ main ( int argc, char **argv )
|
|||
// Fl::scheme( "gtk+" );
|
||||
|
||||
/* welcome to C++ */
|
||||
Loggable::register_create( "Region", &Region::create );
|
||||
Loggable::register_create( "Tempo_Point", &Tempo_Point::create );
|
||||
Loggable::register_create( "Time_Point", &Time_Point::create );
|
||||
Loggable::register_create( "Control_Point", &Control_Point::create );
|
||||
Loggable::register_create( "Track", &Track::create );
|
||||
Loggable::register_create( "Audio_Sequence", &Audio_Sequence::create );
|
||||
Loggable::register_create( "Control_Sequence", &Control_Sequence::create );
|
||||
LOG_REGISTER_CREATE( Region );
|
||||
LOG_REGISTER_CREATE( Time_Point );
|
||||
LOG_REGISTER_CREATE( Tempo_Point );
|
||||
LOG_REGISTER_CREATE( Control_Point );
|
||||
LOG_REGISTER_CREATE( Track );
|
||||
LOG_REGISTER_CREATE( Audio_Sequence );
|
||||
LOG_REGISTER_CREATE( Control_Sequence );
|
||||
|
||||
/* TODO: change to seesion dir */
|
||||
|
||||
|
|
Loading…
Reference in New Issue