shoes/shoes4 — pull request #708 by jasonrclark (2014-05-17 05:46:12+00:00)
Title: TextBlock dimensioning/absolute work

This PR covers #671 and part of #590.

#671 asks to extract the weirdness around dimensions for `TextBlock` to its own subclass. The new `TextBlockDimensions` class does just that, keeping the odd setters and a few calculations we need to keep the text wrapping happy.

Along the way, I also tackled part of #590 which noted we weren't setting the width/heights back to the `TextBlock` at fitting time. I also renamed and simplified in that neighborhood that sets absolutes dimensions back to the DSL after we're fitted.

I had hoped to get the logic for setting absolutes out of `Shoes::Swt::TextBlock`, but I'm not sure where would make better sense. `Shoes::TextBlock` and `Shoes::TextBlockDimensions` can't know about the `FittedTextLayout` since that's an implementation detail of the SWT backend. `Shoes::Swt::TextBlockFitter` could take it, but that class is already long and complicated enough, and presently it just generates the `FittedTextLayout` instances but doesn't modify DSL state, which is kind of a nice property.

I guess it's between the `Shoes::Swt::TextBlockFitter` and `Shoes::Swt::TextBlock` when it comes down to it... @PragTob or @wasnotrice any opinions there?