A few more things sorted out today.
(Rummages around for the changelog.)
I’ve fixed the scroll limit and drawing problems in the TextViewer. It now works as well as it ever did (ie. still no clipping). The bugs were all caused by the off-by-one problem in the TextWriter.
The Gadget class no longer has a _deleteQueueActive variable - this info is extracted from the size of the deletion queue. Much more sensible. The erase() function now calls the rect cache invalidation routines - previously, closing a window didn’t redraw lower gadgets properly. Some more of the gadgets now use the GraphicsPort, notably the TextBox (and therefore the Button class, and any others that inherit from the TextBox but don’t override its draw() method).
Gadgets are set to invisible by default when created, and are only made visible when they are added to a parent object (except the Woopsi class, which is visible by default). This prevents the gadgets from being drawn before they can get their parent’s co-ordinates, so there isn’t a mess of gadgets visible in the top-left of the bottom screen when the system initialises.
One point I should make a note of regarding the invisible flag - children do not check their ancestors’ visibility before drawing themselves. This is bad.
For some reason, the Woopsi class was set as a decoration. I’ve removed that line.
Destructors are now virtual when appropriate. Previously, none of them were virtual, despite the classes containing virtual methods. I’m told this is a bad move, which makes sense.
Think that’s it for today. Lastly, SourceForge is back up again, and the SVN code is all up to date.
Oops, put the width decrement in the wrong place in the horiz line function and broke everything. Now fixed. Also removed logo.c, as it used up 100K in the demo ROM and wasn’t being used.