Rename Ruler_* to Annotation_*

This commit is contained in:
Jonathan Moore Liles 2008-05-04 17:32:08 -05:00
parent f34496f703
commit f16bbb1ab6
6 changed files with 24 additions and 19 deletions

View File

@ -24,7 +24,7 @@
#include <FL/fl_ask.H>
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();

View File

@ -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;

View File

@ -24,7 +24,7 @@
#include "Control_Sequence.H"
#include <FL/Fl_Scrollbar.H>
#include "Ruler_Sequence.H"
#include "Annotation_Sequence.H"
// #include <FL/Fl_Image.H>
// #include <FL/Fl_RGB_Image.H> // 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' ) );

View File

@ -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;

View File

@ -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() );

View File

@ -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 );