projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
src
/
wx
/
timeline.cc
diff --git
a/src/wx/timeline.cc
b/src/wx/timeline.cc
index 6141c8eedcef75abd352a424d36355f8fe1394d2..556e6f1b3e08ca44c2108c27cd001a4cb02c2c29 100644
(file)
--- a/
src/wx/timeline.cc
+++ b/
src/wx/timeline.cc
@@
-25,6
+25,7
@@
#include "lib/image_content.h"
#include "film_editor.h"
#include "timeline.h"
#include "lib/image_content.h"
#include "film_editor.h"
#include "timeline.h"
+#include "content_panel.h"
#include "wx_util.h"
using std::list;
#include "wx_util.h"
using std::list;
@@
-212,6
+213,9
@@
private:
boost::signals2::scoped_connection _content_connection;
};
boost::signals2::scoped_connection _content_connection;
};
+/** @class AudioContentView
+ * @brief Timeline view for AudioContent.
+ */
class AudioContentView : public ContentView
{
public:
class AudioContentView : public ContentView
{
public:
@@
-236,6
+240,9
@@
private:
}
};
}
};
+/** @class AudioContentView
+ * @brief Timeline view for VideoContent.
+ */
class VideoContentView : public ContentView
{
public:
class VideoContentView : public ContentView
{
public:
@@
-265,6
+272,9
@@
private:
}
};
}
};
+/** @class AudioContentView
+ * @brief Timeline view for SubtitleContent.
+ */
class SubtitleContentView : public ContentView
{
public:
class SubtitleContentView : public ContentView
{
public:
@@
-394,9
+404,9
@@
private:
};
};
-Timeline::Timeline (wxWindow* parent,
FilmEditor* ed
, shared_ptr<Film> film)
+Timeline::Timeline (wxWindow* parent,
ContentPanel* cp
, shared_ptr<Film> film)
: wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
: wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
- , _
film_editor (ed
)
+ , _
content_panel (cp
)
, _film (film)
, _time_axis_view (new TimeAxisView (*this, 32))
, _tracks (0)
, _film (film)
, _time_axis_view (new TimeAxisView (*this, 32))
, _tracks (0)
@@
-603,7
+613,7
@@
Timeline::left_down (wxMouseEvent& ev)
}
if (view == *i) {
}
if (view == *i) {
- _
film_editor
->set_selection (cv->content ());
+ _
content_panel
->set_selection (cv->content ());
}
}
}
}
@@
-705,7
+715,7
@@
Timeline::set_position_from_event (wxMouseEvent& ev)
DCPTime const d = DCPTime (cv->content()->end() - new_position).abs ();
if (first || d < nearest_distance) {
nearest_distance = d;
DCPTime const d = DCPTime (cv->content()->end() - new_position).abs ();
if (first || d < nearest_distance) {
nearest_distance = d;
- nearest_new_position = cv->content()->end();
+ nearest_new_position = cv->content()->end()
+ DCPTime::delta ()
;
}
}
}
}
@@
-717,7
+727,7
@@
Timeline::set_position_from_event (wxMouseEvent& ev)
if (d < nearest_distance) {
nearest_distance = d;
if (d < nearest_distance) {
nearest_distance = d;
- nearest_new_position = cv->content()->position() - _down_view->content()->length_after_trim ();
+ nearest_new_position = cv->content()->position() - _down_view->content()->length_after_trim ()
- DCPTime::delta()
;
}
}
}
}