X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline_content_view.cc;h=5877aacbde1bfbc5111459688500dda454737d8f;hb=9fd783bbad870c018dfde5c53de3013b537082a3;hp=ed7e1d3d04ac4c13abd145f881360b861dc55593;hpb=e1ec5b2c81ec2e15d4c1d97cce8252fa34c7116a;p=dcpomatic.git diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc index ed7e1d3d0..5877aacbd 100644 --- a/src/wx/timeline_content_view.cc +++ b/src/wx/timeline_content_view.cc @@ -1,19 +1,20 @@ /* Copyright (C) 2013-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ @@ -24,6 +25,7 @@ #include #include +using std::list; using boost::shared_ptr; TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr c) @@ -91,7 +93,7 @@ TimelineContentView::track () const } void -TimelineContentView::do_paint (wxGraphicsContext* gc) +TimelineContentView::do_paint (wxGraphicsContext* gc, list > overlaps) { DCPOMATIC_ASSERT (_track); @@ -132,6 +134,12 @@ TimelineContentView::do_paint (wxGraphicsContext* gc) gc->StrokePath (path); } + /* Overlaps */ + gc->SetBrush (*wxTheBrushList->FindOrCreateBrush (foreground_colour(), wxBRUSHSTYLE_CROSSDIAG_HATCH)); + for (list >::const_iterator i = overlaps.begin(); i != overlaps.end(); ++i) { + gc->DrawRectangle (i->x, i->y + 4, i->width, i->height - 8); + } + /* Label text */ wxString name = std_to_wx (cont->summary()); wxDouble name_width;