float from_top (StringText const & c) const
{
switch (c.v_align()) {
- case dcp::VALIGN_TOP:
+ case dcp::VAlign::TOP:
return c.v_position();
- case dcp::VALIGN_CENTER:
+ case dcp::VAlign::CENTER:
return c.v_position() + 0.5;
- case dcp::VALIGN_BOTTOM:
+ case dcp::VAlign::BOTTOM:
return 1.0 - c.v_position();
}
DCPOMATIC_ASSERT (false);
{
_tracks.clear ();
- BOOST_FOREACH (shared_ptr<Content> i, film->content()) {
- BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
- if (j->use() && j->type() == TEXT_CLOSED_CAPTION && j->dcp_track()) {
+ for (auto i: film->content()) {
+ for (auto j: i->text) {
+ if (j->use() && j->type() == TextType::CLOSED_CAPTION && j->dcp_track()) {
if (find(_tracks.begin(), _tracks.end(), j->dcp_track()) == _tracks.end()) {
_tracks.push_back (*j->dcp_track());
}
}
_track->Clear ();
- BOOST_FOREACH (DCPTextTrack const & i, _tracks) {
+ for (auto const& i: _tracks) {
_track->Append (std_to_wx(String::compose("%1 (%2)", i.name, i.language)));
}