X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.h;h=ef887dab8242878563dde77e08dd4a53d32d4caf;hb=c536ea4b470fffadcc491b2b9885e027efa2ec5c;hp=89fd941790b5265ea5d0ad5a2bc605c586488c3f;hpb=4408e6eea87ce9630e71e4a7d40e2dade091b0ee;p=dcpomatic.git diff --git a/src/wx/timeline.h b/src/wx/timeline.h index 89fd94179..ef887dab8 100644 --- a/src/wx/timeline.h +++ b/src/wx/timeline.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Carl Hetherington + Copyright (C) 2013-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -34,11 +34,12 @@ class TimelineView; class TimelineTimeAxisView; class TimelineReelsView; class TimelineLabelsView; +class FilmViewer; class Timeline : public wxPanel { public: - Timeline (wxWindow *, ContentPanel *, boost::shared_ptr); + Timeline (wxWindow *, ContentPanel *, boost::shared_ptr, boost::weak_ptr viewer); boost::shared_ptr film () const; @@ -95,7 +96,7 @@ private: void film_content_change (ChangeType type, int, bool frequent); void resized (); void assign_tracks (); - void set_position_from_event (wxMouseEvent &); + void set_position_from_event (wxMouseEvent& ev, bool force_emit = false); void clear_selection (); void recreate_views (); void setup_scrollbars (); @@ -103,16 +104,18 @@ private: void set_pixels_per_second (double pps); void set_pixels_per_track (int h); void zoom_all (); + void position_change (); boost::shared_ptr event_to_view (wxMouseEvent &); TimelineContentViewList selected_views () const; ContentList selected_content () const; - void maybe_snap (DCPTime a, DCPTime b, boost::optional& nearest_distance) const; + void maybe_snap (dcpomatic::DCPTime a, dcpomatic::DCPTime b, boost::optional& nearest_distance) const; wxScrolledCanvas* _labels_canvas; wxScrolledCanvas* _main_canvas; ContentPanel* _content_panel; boost::weak_ptr _film; + boost::weak_ptr _viewer; TimelineViewList _views; boost::shared_ptr _time_axis_view; boost::shared_ptr _reels_view; @@ -123,12 +126,12 @@ private: wxPoint _down_point; boost::optional _zoom_point; boost::shared_ptr _down_view; - DCPTime _down_view_position; + dcpomatic::DCPTime _down_view_position; bool _first_move; ContentMenu _menu; bool _snap; - std::list _start_snaps; - std::list _end_snaps; + std::list _start_snaps; + std::list _end_snaps; Tool _tool; int _x_scroll_rate; int _y_scroll_rate; @@ -140,4 +143,5 @@ private: boost::signals2::scoped_connection _film_changed_connection; boost::signals2::scoped_connection _film_content_change_connection; + boost::signals2::scoped_connection _viewer_position_change_connection; };