Both TermKit and gui.cs relied on "good behavior" from controls in terms of staying within their "frame" when drawing. This is generally doable, but every once in a while, a control escapes that does not take this into account and messes up the display.
More troublesome are user controls that do not want to be bothered with these details, and are a source of problems.
The design proposed for gui.cs should be replicated here: the addCh/addStr methods should not be exposed by the driver, but by the view, and the view should enforce the clipping, as well as a "logical" cursor position
Both TermKit and gui.cs relied on "good behavior" from controls in terms of staying within their "frame" when drawing. This is generally doable, but every once in a while, a control escapes that does not take this into account and messes up the display.
More troublesome are user controls that do not want to be bothered with these details, and are a source of problems.
The design proposed for gui.cs should be replicated here: the addCh/addStr methods should not be exposed by the driver, but by the view, and the view should enforce the clipping, as well as a "logical" cursor position