#include <wx/grid.h>
#include <wx/graphics.h>
DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
#include <iostream>
using std::cout;
wxCoord label_width;
wxCoord label_height;
int N = 0;
- BOOST_FOREACH (NamedChannel const& i, _output_channels) {
+ for (auto const& i: _output_channels) {
dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height);
dc.DrawText (std_to_wx(i.name), LEFT_WIDTH + GRID_SPACING * N + (GRID_SPACING - label_width) / 2, GRID_SPACING + (GRID_SPACING - label_height) / 2);
++N;
/* Row channel labels */
int N = 0;
- BOOST_FOREACH (NamedChannel const& i, _input_channels) {
+ for (auto const& i: _input_channels) {
dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height);
dc.DrawText (std_to_wx(i.name), GRID_SPACING * 2 + (GRID_SPACING - label_width) / 2, TOP_HEIGHT + GRID_SPACING * N + (GRID_SPACING - label_height) / 2);
++N;
/* Group labels and lines */
int y = TOP_HEIGHT;
- BOOST_FOREACH (Group i, _input_groups) {
+ for (auto i: _input_groups) {
int const height = (i.to - i.from + 1) * GRID_SPACING;
dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height);
if (label_width > height) {
}
int y = (ev.GetY() + _vertical_scroll->GetThumbPosition() - (GRID_SPACING * 2)) / GRID_SPACING;
- BOOST_FOREACH (Group i, _input_groups) {
+ for (auto i: _input_groups) {
if (i.from <= y && y <= i.to) {
return i.name;
}
AudioMappingView::input_channel_name_with_group (NamedChannel const& n) const
{
optional<wxString> group;
- BOOST_FOREACH (Group i, _input_groups) {
+ for (auto i: _input_groups) {
if (i.from <= n.index && n.index <= i.to) {
group = std_to_wx (i.name);
}