diff --git a/Timeline/Ruler_Point.H b/Timeline/Annotation_Point.H similarity index 89% rename from Timeline/Ruler_Point.H rename to Timeline/Annotation_Point.H index 1aa4616..b372374 100644 --- a/Timeline/Ruler_Point.H +++ b/Timeline/Annotation_Point.H @@ -24,7 +24,7 @@ #include -class Ruler_Point : public Sequence_Point +class Annotation_Point : public Sequence_Point { public: @@ -40,7 +40,7 @@ public: protected: -// const char *class_name ( void ) { return "Ruler_Point"; } +// const char *class_name ( void ) { return "Annotation_Point"; } virtual void get ( Log_Entry &e ) const { @@ -67,16 +67,16 @@ protected: // timeline->redraw(); } - Ruler_Point ( ) + Annotation_Point ( ) { } public: /* for loggable */ - LOG_CREATE_FUNC( Ruler_Point ); + LOG_CREATE_FUNC( Annotation_Point ); - Ruler_Point ( Sequence *track, nframes_t when, const char *name ) + Annotation_Point ( Sequence *track, nframes_t when, const char *name ) { _track = track; @@ -87,7 +87,7 @@ public: log_create(); } - Ruler_Point ( const Ruler_Point &rhs ) + Annotation_Point ( const Annotation_Point &rhs ) { _r->offset = rhs._r->offset; _label = strdup( rhs._label ); @@ -95,10 +95,10 @@ public: Sequence_Widget *clone ( const Sequence_Widget *r ) { - return new Ruler_Point( *(Ruler_Point*)r ); + return new Annotation_Point( *(Annotation_Point*)r ); } - ~Ruler_Point ( ) + ~Annotation_Point ( ) { if ( _label ) free( _label ); log_destroy(); diff --git a/Timeline/Ruler_Sequence.H b/Timeline/Annotation_Sequence.H similarity index 89% rename from Timeline/Ruler_Sequence.H rename to Timeline/Annotation_Sequence.H index 87211b4..c2d5f80 100644 --- a/Timeline/Ruler_Sequence.H +++ b/Timeline/Annotation_Sequence.H @@ -20,17 +20,17 @@ #pragma once #include "Sequence.H" -#include "Ruler_Point.H" +#include "Annotation_Point.H" #include "Timeline.H" -class Ruler_Sequence : public Sequence +class Annotation_Sequence : public Sequence { public: Fl_Cursor cursor ( void ) const { return FL_CURSOR_INSERT; } - Ruler_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H ) + Annotation_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H ) { // box( FL_UP_BOX ); } @@ -54,7 +54,7 @@ public: { if ( Fl::event_button1() ) { - add( new Ruler_Point( this, x_to_offset( Fl::event_x() ), "mark" ) ); + add( new Annotation_Point( this, x_to_offset( Fl::event_x() ), "mark" ) ); redraw(); } break; diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index af2dd4b..09283f2 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -24,7 +24,7 @@ #include "Control_Sequence.H" #include -#include "Ruler_Sequence.H" +#include "Annotation_Sequence.H" // #include // #include // needed for alpha blending @@ -180,7 +180,7 @@ Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : Fl_Overlay_Wi } { - Ruler_Sequence *o = new Ruler_Sequence( 0, 24, 800, 24 ); + Annotation_Sequence *o = new Annotation_Sequence( 0, 24, 800, 24 ); o->color( fl_gray_ramp( 'F' ) ); diff --git a/Timeline/Timeline.H b/Timeline/Timeline.H index 4e5d888..5bdb904 100644 --- a/Timeline/Timeline.H +++ b/Timeline/Timeline.H @@ -44,7 +44,7 @@ extern Timeline *timeline; class Tempo_Sequence; class Time_Sequence; -class Ruler_Sequence; +class Annotation_Sequence; class Track; // disables double-buffering to make unnecessary redrawing more apparent @@ -122,7 +122,7 @@ public: Tempo_Sequence *tempo_track; Time_Sequence *time_track; - Ruler_Sequence *ruler_track; + Annotation_Sequence *ruler_track; nframes_t xoffset; diff --git a/Timeline/Track.C b/Timeline/Track.C index d7ad116..4504d75 100644 --- a/Timeline/Track.C +++ b/Timeline/Track.C @@ -454,6 +454,7 @@ Track::handle ( int m ) { "...", 0, 0, 0, FL_MENU_RADIO | ( c == 3 || c > 4 ? FL_MENU_VALUE : 0 ) }, { 0 }, { "Add Control" }, + { "Add Annotation" }, { "Color" }, { "Remove", 0, 0, 0, transport->rolling ? FL_MENU_INACTIVE : 0 }, { 0 }, @@ -493,6 +494,10 @@ Track::handle ( int m ) } else if ( r == &menu[ 7 ] ) { +// new Annotation_Sequence; + } + else if ( r == &menu[ 8 ] ) + { unsigned char r, g, b; Fl::get_color( color(), r, g, b ); @@ -505,7 +510,7 @@ Track::handle ( int m ) // color( fl_show_colormap( color() ) ); redraw(); } - else if ( r == &menu[ 8 ] ) + else if ( r == &menu[ 9 ] ) { int r = fl_choice( "Are you certain you want to remove track \"%s\"?", "Cancel", NULL, "Remove", name() ); diff --git a/Timeline/main.C b/Timeline/main.C index 018f114..01a8fb8 100644 --- a/Timeline/main.C +++ b/Timeline/main.C @@ -32,7 +32,7 @@ #include "Timeline.H" #include "Tempo_Sequence.H" #include "Time_Sequence.H" -#include "Ruler_Sequence.H" +#include "Annotation_Sequence.H" #include "Control_Sequence.H" #include "Transport.H" @@ -89,7 +89,7 @@ main ( int argc, char **argv ) LOG_REGISTER_CREATE( Region ); LOG_REGISTER_CREATE( Time_Point ); LOG_REGISTER_CREATE( Tempo_Point ); - LOG_REGISTER_CREATE( Ruler_Point ); + LOG_REGISTER_CREATE( Annotation_Point ); LOG_REGISTER_CREATE( Control_Point ); LOG_REGISTER_CREATE( Track ); LOG_REGISTER_CREATE( Audio_Sequence );