{
#ifndef __WXOSX__
SetDoubleBuffered (true);
-#endif
+#endif
Bind (wxEVT_PAINT, boost::bind (&Timeline::paint, this));
Bind (wxEVT_LEFT_DOWN, boost::bind (&Timeline::left_down, this, _1));
++j;
continue;
}
-
+
shared_ptr<Content> test_content = test->content();
-
+
if (test && test->track() && test->track().get() == t) {
bool const no_overlap =
(content->position() < test_content->position() && content->end() < test_content->position()) ||
(content->position() > test_content->end() && content->end() > test_content->end());
-
+
if (!no_overlap) {
/* we have an overlap on track `t' */
++t;
break;
}
}
-
+
++j;
}
if (!cv) {
continue;
}
-
+
if (!ev.ShiftDown ()) {
cv->set_selected (view == *i);
}
-
+
if (view == *i) {
_content_panel->set_selection (cv->content ());
}
if (!_down_view) {
return;
}
-
+
DCPTime new_position = _down_view_position + DCPTime::from_seconds ((p.x - _down_point.x) / pps);
-
+
if (_snap) {
DCPTime const new_end = new_position + _down_view->content()->length_after_trim () - DCPTime (1);
positive is right).
*/
optional<DCPTime> nearest_distance;
-
+
/* Find the nearest content edge; this is inefficient */
for (TimelineViewList::iterator i = _views.begin(); i != _views.end(); ++i) {
shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i);
maybe_snap (cv->content()->end() + DCPTime (1), new_position, nearest_distance);
maybe_snap (cv->content()->end() + DCPTime (1), new_end, nearest_distance);
}
-
+
if (nearest_distance) {
/* Snap if it's close; `close' means within a proportion of the time on the timeline */
if (nearest_distance.get().abs() < DCPTime::from_seconds ((width() / pps) / 64)) {
}
}
}
-
+
if (new_position < DCPTime ()) {
new_position = DCPTime ();
}
_down_view->content()->set_position (new_position);
-
+
shared_ptr<Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
film->set_sequence_video (false);
Timeline::selected_views () const
{
TimelineContentViewList sel;
-
+
for (TimelineViewList::const_iterator i = _views.begin(); i != _views.end(); ++i) {
shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i);
if (cv && cv->selected()) {
{
ContentList sel;
TimelineContentViewList views = selected_views ();
-
+
for (TimelineContentViewList::const_iterator i = views.begin(); i != views.end(); ++i) {
sel.push_back ((*i)->content ());
}