Notes on Wimp sources --------------------- At the bottom of the Options file, I've set a few of the options to the values that are required for me to test the code on my RISC PC - if you set the switch to false, it'll use the settings that were present when I received the sources - I don't know if those are the settings you need for the NC or not. The debug option is also on, so you may want to turn that off as well. Apart from that, the only other thing you need to do is to add the following message token to the Wimp's message file: BadParent:Sorry, child windows cannot be nested It's probably not worth integrating my changes with yours just yet, since I've about to embark on the next phase of development (nested child windows etc.). Let me know if you have any problems compiling the Wimp with these sources. Summary of test routines ------------------------ The main test program is Test.Nest1, which has a whole bunch of keyboard shortcuts with which you can insert windows inside each other in various nefarious ways. The actual keys are listed in the program. Test.Many is designed to check that braindead panic redraw works with child windows. This is what happens when the Wimp's rectangle arithmetic overflows its rectangle list, thus requiring a more direct approach to redraw the screen (start at the back and redraw everything in turn, without worrying about which bits overlap). Note that the Wimp's new redraw algorithm is much more sophisticated than the old one, as it collects up all Wimp_OpenWindows since the previous Wimp_Poll and performs them together, which allows it to do far more block-copies (rather than redraws) when moving pane windows, and can often move a parent and all its children with a single block-copy. Normally the new algorithm makes better use of the rectangle area than the old one, but since it uses two lists of invalid rectangles, it's possible that under some circumstances it may perform worse than the old one, in which case I'd be interested to know about it. Test.Multi is designed to show off the new multiple-block-copying stuff, in that a series of child windows is being moved in a circle. Where each rectangle overlaps the one after it, the old Wimp has no choice but to redraw all but the first one, whereas the new code is able to block-copy all but one of the rectangles.
"Resources/git@gitlab.riscosopen.org:tbaldwin/Wimp.git" did not exist on "e6cf688edebd6b51d36de9fb418c25e345ffb9f2"
Ben Avison
authored
UTF-8 support from previous version switched in; additional alphabet- conditional support added as follows: * Correctly converts character index returned from Font_FindCaret into byte index into raw string. * Left-arrow, right-arrow, delete-left and delete-right now act as far as the next character boundary, instead of to the next byte. * Menu item text justification works again (it relies on overwriting spaces with hard space characters, which are two-byte characters in UTF-8). * General key handling code has been rewritten. The Wimp now has three internal key input buffers - one each for taking keyboard-generated, task-generated, and function-key-generated strings. Each input buffer is processed in chunks of one character, rather than one byte; malformed UTF-8 characters are rejected, so tasks don't have to worry about them (simplifying their character-handling code). There is also a key output buffer, to ensure that (UTF-8) sequences of Key_Pressed events are not broken up. * As a result of the above, multiple calls to Wimp_ProcessKey are now possible between calls to Wimp_Poll. Previously, this resulted in bytes getting jumbled up - making it useless for input of UTF-8 characters. * Multi-byte characters are inserted into writeable icons in one go, so you don't see a brief flicker of the "malformed character" symbol while the initial bytes are being inserted. * Multi-byte characters that don't entirely fit in a writeable icon buffer are not inserted at all. * A new validation string command ("U") can limit the contents of a writeable by number of characters, instead of bytes. This will hide the character sizes from the user interface. * Allowable characters (validation string command "A") now works on Unicode characters and character ranges. * Various other minor bugs are fixed (Wimp_ProcessKey 13 can activate a writeable menu item, Shift-arrow keys are always consistent in firing off Key_Pressed events, etc.) * Password icons supported: one symbol is displayed for each character (instead of for each byte); the display character (validation string command "D") can be any UTF-8 character; correctly displays the caret after set-caret-by-index calls, even though characters in the processed string are different width to those in the raw string, in password icons. Other changes: * The border around NC-style error boxes is resized when the error window is grown or shrunk. * Messages, CmdHelp and Template files made consistent across resource directories, including support for all Ursula features. * ShrinkableAreas turned back on in System=RCA builds. * User interface features of desktop OS builds standardised. Version 4.06. Tagged as 'Wimp-4_06'