chiark / gitweb /
Revise menu width handling via a new trait.
authorSimon Tatham <anakin@pobox.com>
Thu, 11 Jan 2024 17:56:26 +0000 (17:56 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 12 Jan 2024 12:52:04 +0000 (12:52 +0000)
commitcd7da63796704843da96b9cdc9f7e14501b0cbfd
tree79d02aa29f0b0f7be2dfd32772084a2e449136ab
parent9b22210139d8fe96c71ce005eccfbe3c8b4e4267
Revise menu width handling via a new trait.

get_widths has become check_widths, which subsumes the processing done
at every call site, and will be easier to extend to the next thing I
have in mind.

Also, the three width-aligning methods for menu lines are now part of
the MenuKeypressLineGeneral trait. That only has one implementing type
right now, but another one will be along shortly.
src/menu.rs
src/posting.rs
src/text.rs