Though text rendering is done through Pango, the current version of Helm doesn't allow us to leverage Pango line-wrapping abilities. Considering that linewrapping is typically not something one want to do manually, it looks like a good feature to add.
The ideal feature would be to set width and height, but current Pango bindings to not provide us with the setHeight function (I've just added an issue to the Gtk2hs repo that maintain Pango about this).
In the meantime, a possible fix is to:
Add an optional line width field (as a Maybe Double) to the Text datatype;
Add two calls on the SDL rendering engine for Text:
Though text rendering is done through Pango, the current version of Helm doesn't allow us to leverage Pango line-wrapping abilities. Considering that linewrapping is typically not something one want to do manually, it looks like a good feature to add.
The ideal feature would be to set width and height, but current Pango bindings to not provide us with the setHeight function (I've just added an issue to the Gtk2hs repo that maintain Pango about this).
In the meantime, a possible fix is to:
Maybe Double
) to theText
datatype;The beauty of it is that a call to setWidth with
Nothing
does... nothing, and wrapWholeWords has no effect without a set lineWidth.I have a small proof of concept and would be happy to push a PR, but I'm troubled by two things:
TextAlignment
with this new system;