diff --git a/Timeline/Clock.H b/Timeline/Clock.H index d327c9a..af8b7b7 100644 --- a/Timeline/Clock.H +++ b/Timeline/Clock.H @@ -219,6 +219,10 @@ public: type( t ); redraw(); + + return 0; } + + return 0; } }; diff --git a/Timeline/TLE.fl b/Timeline/TLE.fl index 7f6c122..2ebd8fe 100644 --- a/Timeline/TLE.fl +++ b/Timeline/TLE.fl @@ -103,7 +103,7 @@ Loggable::compact();} } MenuItem {} { label Load - callback {((Fl_Menu_Settings*)menubar)->load( options_menu, "foo.state" );} selected + callback {((Fl_Menu_Settings*)menubar)->load( options_menu, "foo.state" );} xywh {10 10 40 25} } } @@ -196,6 +196,18 @@ Loggable::compact();} label {&Display} open xywh {0 0 74 25} } { + Submenu {} { + label {&Timeline} open + xywh {0 0 74 25} + } { + MenuItem {} { + label {&Measure lines} + callback {Timeline::draw_with_measure_lines = menu_picked_value( o ); + +timeline->redraw();} selected + xywh {0 0 40 25} type Toggle value 1 + } + } Submenu {} { label {&Waveforms} open xywh {0 0 74 25} diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index 0193daa..3ae09de 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -31,6 +31,8 @@ #include "Track.H" +bool Timeline::draw_with_measure_lines = true; + const float UPDATE_FREQ = 0.02f; @@ -83,8 +85,6 @@ Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : Fl_Overlay_Wi box( FL_FLAT_BOX ); xoffset = 0; - _enable_measure_lines = true; - X = Y = 0; { @@ -256,7 +256,7 @@ Timeline::nearest_line ( int ix ) void Timeline::draw_measure ( int X, int Y, int W, int H, Fl_Color color, bool BBT ) { - if ( ! _enable_measure_lines ) + if ( ! draw_with_measure_lines ) return; // fl_line_style( FL_DASH, 2 ); diff --git a/Timeline/Timeline.H b/Timeline/Timeline.H index 98720b1..bf1b69e 100644 --- a/Timeline/Timeline.H +++ b/Timeline/Timeline.H @@ -61,8 +61,6 @@ class Track; #define redraw_overlay() #endif - - struct Rectangle { int x; @@ -88,8 +86,6 @@ class Timeline : public Fl_Overlay_Window, public RWLock Rectangle _selection; - bool _enable_measure_lines; - enum snap_flags_e { SNAP_TO_REGION, SNAP_TO_BAR, @@ -116,6 +112,8 @@ class Timeline : public Fl_Overlay_Window, public RWLock public: + static bool draw_with_measure_lines; + Tempo_Sequence *tempo_track; Time_Sequence *time_track; Ruler_Sequence *ruler_track;