Minor changes to the WoopsiString class. It now reallocs with the necessary size plus 32 chars, which should reduce the number of reallocs required. I’ve fixed an off-by-one bug in the remove() method, and added some more bounds checking in the same place.
The Text class, used by the MultiLineTextBox to store its contents, now inherits from the WoopsiString class. This means all of the string functions are stored in a single class instead of being duplicated in two places, and it also means that the Text class gets all of the new memory management code.
As a result of this, the MultiLineTextBox now has a removeText() method. The keyboard’s backspace key can now be wired up, which I’ve demonstrated in the keyboard example.
Next on the list - finish cursor support in the TextBox. I can either leave the way it works as it is, or follow Jeff’s advice and have multi-character selection in addition to the cursor. In any case, it might be handy if tapping a textbox with the stylus jumped the cursor to the click position.
Once that’s done, I need to add cursor support to the MultiLineTextBox.