X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.h;h=4ba1cc425f022b6fe11d634052f7915a5c012ee8;hb=ab011bbc0d68ff676a672c7c4c1bef81e84a5007;hp=db33dbbdc70e161003eaf9df40ebbaf46c64eefa;hpb=16a7ea91e973b327735658857cbf996cc740be77;p=dcpomatic.git diff --git a/src/wx/timeline.h b/src/wx/timeline.h index db33dbbdc..4ba1cc425 100644 --- a/src/wx/timeline.h +++ b/src/wx/timeline.h @@ -52,8 +52,8 @@ public: return 48; } - double pixels_per_time_unit () const { - return _pixels_per_time_unit; + boost::optional pixels_per_second () const { + return _pixels_per_second; } Position tracks_position () const { @@ -62,7 +62,15 @@ public: int tracks () const; - void setup_pixels_per_time_unit (); + void setup_pixels_per_second (); + + void set_snap (bool s) { + _snap = s; + } + + bool snap () const { + return _snap; + } private: void paint (); @@ -73,7 +81,7 @@ private: void playlist_changed (); void resized (); void assign_tracks (); - void set_start_from_event (wxMouseEvent &); + void set_position_from_event (wxMouseEvent &); void clear_selection (); typedef std::vector > ViewList; @@ -88,13 +96,14 @@ private: ViewList _views; boost::shared_ptr _time_axis_view; int _tracks; - double _pixels_per_time_unit; + boost::optional _pixels_per_second; bool _left_down; wxPoint _down_point; boost::shared_ptr _down_view; - Time _down_view_start; + DCPTime _down_view_position; bool _first_move; ContentMenu _menu; + bool _snap; boost::signals2::scoped_connection _playlist_connection; };