summaryrefslogtreecommitdiff
path: root/src/wx/content_timeline_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/content_timeline_view.h')
-rw-r--r--src/wx/content_timeline_view.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/wx/content_timeline_view.h b/src/wx/content_timeline_view.h
index 0f6eeae51..450d19df4 100644
--- a/src/wx/content_timeline_view.h
+++ b/src/wx/content_timeline_view.h
@@ -23,6 +23,7 @@
#define DCPOMATIC_CONTENT_TIMELINE_VIEW_H
+#include "timeline_view.h"
#include "lib/rect.h"
#include "lib/dcpomatic_time.h"
@@ -34,30 +35,22 @@ class ContentTimeline;
/** @class ContentTimelineView
* @brief Parent class for components of the content timeline (e.g. a piece of content or an axis).
*/
-class ContentTimelineView
+class ContentTimelineView : public TimelineView<ContentTimeline>
{
public:
explicit ContentTimelineView(ContentTimeline& t);
virtual ~ContentTimelineView () = default;
- ContentTimelineView(ContentTimelineView const&) = delete;
- ContentTimelineView& operator=(ContentTimelineView const&) = delete;
-
- void paint (wxGraphicsContext* g, std::list<dcpomatic::Rect<int>> overlaps);
- void force_redraw ();
-
- virtual dcpomatic::Rect<int> bbox () const = 0;
+ void paint(wxGraphicsContext* gc, std::list<dcpomatic::Rect<int>> overlaps)
+ {
+ _last_paint_bbox = bbox();
+ do_paint(gc, overlaps);
+ }
protected:
- virtual void do_paint (wxGraphicsContext *, std::list<dcpomatic::Rect<int>> overlaps) = 0;
+ virtual void do_paint(wxGraphicsContext *, std::list<dcpomatic::Rect<int>> overlaps) = 0;
- int time_x (dcpomatic::DCPTime t) const;
int y_pos(int t) const;
-
- ContentTimeline& _timeline;
-
-private:
- dcpomatic::Rect<int> _last_paint_bbox;
};