diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-04-21 21:34:50 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-21 23:48:16 +0200 |
| commit | 313319ba2d8544bc25524e02e634804a503b54f1 (patch) | |
| tree | bbaacfbd1ce80d5141680a87fe533c9a8dd16a3b /src/wx/timeline_content_view.cc | |
| parent | e7e4af869f7144fa9a265ccf1e15c7b2f182ac2c (diff) | |
Tidying.
Diffstat (limited to 'src/wx/timeline_content_view.cc')
| -rw-r--r-- | src/wx/timeline_content_view.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc index 481e8100d..926ca3258 100644 --- a/src/wx/timeline_content_view.cc +++ b/src/wx/timeline_content_view.cc @@ -18,12 +18,14 @@ */ -#include "timeline_content_view.h" + #include "timeline.h" +#include "timeline_content_view.h" #include "wx_util.h" #include "lib/content.h" #include <wx/graphics.h> + using std::list; using std::shared_ptr; using namespace dcpomatic; @@ -31,6 +33,7 @@ using namespace dcpomatic; using namespace boost::placeholders; #endif + TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr<Content> c) : TimelineView (tl) , _content (c) @@ -38,6 +41,7 @@ TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr<Content> c) _content_connection = c->Change.connect (bind (&TimelineContentView::content_change, this, _1, _3)); } + dcpomatic::Rect<int> TimelineContentView::bbox () const { @@ -57,6 +61,7 @@ TimelineContentView::bbox () const ); } + void TimelineContentView::set_selected (bool s) { @@ -64,36 +69,42 @@ TimelineContentView::set_selected (bool s) force_redraw (); } + bool TimelineContentView::selected () const { return _selected; } + shared_ptr<Content> TimelineContentView::content () const { return _content.lock (); } + void TimelineContentView::set_track (int t) { _track = t; } + void TimelineContentView::unset_track () { _track = boost::optional<int>(); } + boost::optional<int> TimelineContentView::track () const { return _track; } + void TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>> overlaps) { @@ -156,12 +167,14 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>> gc->PopState (); } + int TimelineContentView::y_pos (int t) const { return t * _timeline.pixels_per_track() + _timeline.tracks_y_offset(); } + void TimelineContentView::content_change (ChangeType type, int p) { @@ -176,6 +189,7 @@ TimelineContentView::content_change (ChangeType type, int p) } } + wxString TimelineContentView::label () const { |
