diff --git a/Timeline/TLE.fl b/Timeline/TLE.fl index 7387419..6d5cfef 100644 --- a/Timeline/TLE.fl +++ b/Timeline/TLE.fl @@ -810,8 +810,7 @@ project_name->redraw();} {} save(); -while ( Fl::first_window() ) Fl::first_window()->hide();} {selected - } +while ( Fl::first_window() ) Fl::first_window()->hide();} {} } Function {progress_cb( int p, void *arg )} {open return_type {static void} } { @@ -933,7 +932,7 @@ while ( _window->shown() ) Function {make_window()} {open } { Fl_Window _window { - label {Project info} open + label {Project info} open selected xywh {623 64 550 625} type Double visible } { Fl_Value_Output {} { @@ -961,7 +960,7 @@ while ( _window->shown() ) } Fl_Output {} { label {Size of Journal} - xywh {220 35 100 25} box UP_BOX labeltype SHADOW_LABEL align 1 + xywh {215 35 100 25} box UP_BOX labeltype SHADOW_LABEL align 1 code0 {static char pat[40];} code1 {snprintf( pat, sizeof( pat ), "%.1fK", size( "history" ) / (float)1024 );} code2 {o->value( pat );} @@ -984,6 +983,18 @@ while ( _window->shown() ) _window->hide();} xywh {455 590 74 25} } + Fl_Output {} { + label Length + xywh {15 85 115 25} align 1 + code0 {char pat[40];} + code1 {Clock::frame_to_HMS( pat, sizeof( pat ), timeline->length() );} + code2 {o->value( pat );} + } + Fl_Value_Output {} { + label Tracks + xywh {40 135 60 25} align 1 + code0 {o->value( timeline->ntracks() );} + } } } } diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index 1168a37..d3bee36 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -324,6 +324,12 @@ Timeline::menu_cb ( Fl_Menu_ *m ) WARNING( "programming error: Unknown menu item" ); } +int +Timeline::ntracks ( void ) const +{ + return tracks->children(); +} + Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : Fl_Overlay_Window( X, Y, W, H, L ) { diff --git a/Timeline/Timeline.H b/Timeline/Timeline.H index 902c2b9..d38c5d4 100644 --- a/Timeline/Timeline.H +++ b/Timeline/Timeline.H @@ -190,6 +190,7 @@ public: void add_track ( Track *track ); void remove_track ( Track *track ); + int ntracks ( void ) const; void zoom ( float secs ); void zoom_in ( void );