Browse Source

Rename Ruler_* to Annotation_*

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
f16bbb1ab6
6 changed files with 24 additions and 19 deletions
  1. +8
    -8
      Timeline/Annotation_Point.H
  2. +4
    -4
      Timeline/Annotation_Sequence.H
  3. +2
    -2
      Timeline/Timeline.C
  4. +2
    -2
      Timeline/Timeline.H
  5. +6
    -1
      Timeline/Track.C
  6. +2
    -2
      Timeline/main.C

Timeline/Ruler_Point.H → Timeline/Annotation_Point.H View File

@@ -24,7 +24,7 @@


#include <FL/fl_ask.H> #include <FL/fl_ask.H>


class Ruler_Point : public Sequence_Point
class Annotation_Point : public Sequence_Point
{ {


public: public:
@@ -40,7 +40,7 @@ public:


protected: protected:


// const char *class_name ( void ) { return "Ruler_Point"; }
// const char *class_name ( void ) { return "Annotation_Point"; }


virtual void get ( Log_Entry &e ) const virtual void get ( Log_Entry &e ) const
{ {
@@ -67,16 +67,16 @@ protected:
// timeline->redraw(); // timeline->redraw();
} }


Ruler_Point ( )
Annotation_Point ( )
{ {
} }


public: public:


/* for loggable */ /* 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; _track = track;


@@ -87,7 +87,7 @@ public:
log_create(); log_create();
} }


Ruler_Point ( const Ruler_Point &rhs )
Annotation_Point ( const Annotation_Point &rhs )
{ {
_r->offset = rhs._r->offset; _r->offset = rhs._r->offset;
_label = strdup( rhs._label ); _label = strdup( rhs._label );
@@ -95,10 +95,10 @@ public:


Sequence_Widget *clone ( const Sequence_Widget *r ) 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 ); if ( _label ) free( _label );
log_destroy(); log_destroy();

Timeline/Ruler_Sequence.H → Timeline/Annotation_Sequence.H View File

@@ -20,17 +20,17 @@
#pragma once #pragma once


#include "Sequence.H" #include "Sequence.H"
#include "Ruler_Point.H"
#include "Annotation_Point.H"
#include "Timeline.H" #include "Timeline.H"


class Ruler_Sequence : public Sequence
class Annotation_Sequence : public Sequence
{ {


public: public:


Fl_Cursor cursor ( void ) const { return FL_CURSOR_INSERT; } 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 ); // box( FL_UP_BOX );
} }
@@ -54,7 +54,7 @@ public:
{ {
if ( Fl::event_button1() ) 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(); redraw();
} }
break; break;

+ 2
- 2
Timeline/Timeline.C View File

@@ -24,7 +24,7 @@
#include "Control_Sequence.H" #include "Control_Sequence.H"
#include <FL/Fl_Scrollbar.H> #include <FL/Fl_Scrollbar.H>


#include "Ruler_Sequence.H"
#include "Annotation_Sequence.H"


// #include <FL/Fl_Image.H> // #include <FL/Fl_Image.H>
// #include <FL/Fl_RGB_Image.H> // needed for alpha blending // #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' ) ); o->color( fl_gray_ramp( 'F' ) );




+ 2
- 2
Timeline/Timeline.H View File

@@ -44,7 +44,7 @@ extern Timeline *timeline;


class Tempo_Sequence; class Tempo_Sequence;
class Time_Sequence; class Time_Sequence;
class Ruler_Sequence;
class Annotation_Sequence;
class Track; class Track;


// disables double-buffering to make unnecessary redrawing more apparent // disables double-buffering to make unnecessary redrawing more apparent
@@ -122,7 +122,7 @@ public:


Tempo_Sequence *tempo_track; Tempo_Sequence *tempo_track;
Time_Sequence *time_track; Time_Sequence *time_track;
Ruler_Sequence *ruler_track;
Annotation_Sequence *ruler_track;




nframes_t xoffset; nframes_t xoffset;


+ 6
- 1
Timeline/Track.C 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, 0, 0, FL_MENU_RADIO | ( c == 3 || c > 4 ? FL_MENU_VALUE : 0 ) },
{ 0 }, { 0 },
{ "Add Control" }, { "Add Control" },
{ "Add Annotation" },
{ "Color" }, { "Color" },
{ "Remove", 0, 0, 0, transport->rolling ? FL_MENU_INACTIVE : 0 }, { "Remove", 0, 0, 0, transport->rolling ? FL_MENU_INACTIVE : 0 },
{ 0 }, { 0 },
@@ -493,6 +494,10 @@ Track::handle ( int m )
} }
else if ( r == &menu[ 7 ] ) else if ( r == &menu[ 7 ] )
{ {
// new Annotation_Sequence;
}
else if ( r == &menu[ 8 ] )
{
unsigned char r, g, b; unsigned char r, g, b;


Fl::get_color( color(), r, g, b ); Fl::get_color( color(), r, g, b );
@@ -505,7 +510,7 @@ Track::handle ( int m )
// color( fl_show_colormap( color() ) ); // color( fl_show_colormap( color() ) );
redraw(); 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() ); int r = fl_choice( "Are you certain you want to remove track \"%s\"?", "Cancel", NULL, "Remove", name() );




+ 2
- 2
Timeline/main.C View File

@@ -32,7 +32,7 @@
#include "Timeline.H" #include "Timeline.H"
#include "Tempo_Sequence.H" #include "Tempo_Sequence.H"
#include "Time_Sequence.H" #include "Time_Sequence.H"
#include "Ruler_Sequence.H"
#include "Annotation_Sequence.H"
#include "Control_Sequence.H" #include "Control_Sequence.H"


#include "Transport.H" #include "Transport.H"
@@ -89,7 +89,7 @@ main ( int argc, char **argv )
LOG_REGISTER_CREATE( Region ); LOG_REGISTER_CREATE( Region );
LOG_REGISTER_CREATE( Time_Point ); LOG_REGISTER_CREATE( Time_Point );
LOG_REGISTER_CREATE( Tempo_Point ); LOG_REGISTER_CREATE( Tempo_Point );
LOG_REGISTER_CREATE( Ruler_Point );
LOG_REGISTER_CREATE( Annotation_Point );
LOG_REGISTER_CREATE( Control_Point ); LOG_REGISTER_CREATE( Control_Point );
LOG_REGISTER_CREATE( Track ); LOG_REGISTER_CREATE( Track );
LOG_REGISTER_CREATE( Audio_Sequence ); LOG_REGISTER_CREATE( Audio_Sequence );


Loading…
Cancel
Save