It may be nice to build a viewport’s contents like this:
Rectangle<int> b;
b.addToRight (500);
for (auto& row : rows)
row.setBounds (b.addToBottom (50));
container.setBounds (b);
Rectangle::removeFromBottom
with a negative value almost does what addToBottom
would do, but the resulting rectangle is incorrect.