Wouldn’t it be great if Woopsi supported double-clicks? No? Well, that’s just too bad.
Double-clicks are sent through the hierarchy as single clicks. When a gadget receives a click, it checks to see where and when the last click occurred. If it occurred within a reasonable proximity to the current click (within a 20 pixel bounding box and within the last 15 frames) it is processed as a double-click. Note that the first click is still processed as a single click, so if you want to delay processing the first click in anticipation of a second, your gadgets will need to do some more work.
I’ve added double-click support so that the new ListBox gadget I’ve added can perform a different function when an item within it is double-clicked. I’m thinking of a file requester in which double-clicking an entry automatically selects the entry and closes the requester. It would have been possible to have supported this without system-wide double-click support, but it’s a lot of work to have to repeat it for every time it’s needed.
The ListBox itself isn’t finished yet, but it’s mostly working. All I need to sort out is scrolling, which I’ll probably achieve by inheriting from the ScrollingPanel. List items can be selected (single click), unselected (click again) and double-clicked.
I’ve gone for a very simple list box class, more like the ContextMenu than Jeff’s List/ListSource classes. I don’t think I need anything too complex in this case as it has a specific purpose (showing a list of text-based options).
Other changes include the removal of the WiFi icon, which can apparently cause problems - as it’s a stock PALib icon I’m happy to see it go - and moving the ROM icon to a different directory to prevent it being bundled into the ROM twice.