Add in HorizontalLegend.

Lists entries side-by-side in the available width, after which the
entries wrap onto the next row. If an entry is too wide it is
truncated. If there are too many entries some rows will not be shown.

Close #755.
Somewhat same as above...

Unless, this is done to lower the clutter in the leading code, but then we introduce 2 lines of code that don't really do anything.  I would remove these reference variables unless the lines really get too long