diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-12-13 23:44:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-12 00:43:51 +0100 |
| commit | 5d53e906d6f73ad9f9ae85a423a18f5814904bdb (patch) | |
| tree | 368dad6e07c5d6cdb04f691f3842d1e4cccf647e /src/wx/content_timeline_view.cc | |
| parent | 50931fab031d9dcdba131cb07ddd13e3528ab697 (diff) | |
Split out TimelineView from ContentTimelineView.
Diffstat (limited to 'src/wx/content_timeline_view.cc')
| -rw-r--r-- | src/wx/content_timeline_view.cc | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/wx/content_timeline_view.cc b/src/wx/content_timeline_view.cc index 05922d558..127e440fa 100644 --- a/src/wx/content_timeline_view.cc +++ b/src/wx/content_timeline_view.cc @@ -27,39 +27,12 @@ using std::list; using namespace dcpomatic; -/** @class ContentContentTimelineView - * @brief Parent class for components of the content timeline (e.g. a piece of content or an axis). - */ -ContentTimelineView::ContentTimelineView(ContentTimeline& t) - : _timeline (t) +ContentTimelineView::ContentTimelineView(ContentTimeline& timeline) + : TimelineView(timeline) { } - -void -ContentTimelineView::paint(wxGraphicsContext* g, list<dcpomatic::Rect<int>> overlaps) -{ - _last_paint_bbox = bbox (); - do_paint (g, overlaps); -} - - -void -ContentTimelineView::force_redraw() -{ - _timeline.force_redraw (_last_paint_bbox.extended(4)); - _timeline.force_redraw (bbox().extended(4)); -} - - -int -ContentTimelineView::time_x(DCPTime t) const -{ - return t.seconds() * _timeline.pixels_per_second().get_value_or(0); -} - - int ContentTimelineView::y_pos(int t) const { |
