• Robert Sprowson's avatar
    Some RISC_OSLib rlib enhancements · 5b7cef10
    Robert Sprowson authored
    menu.c/menu.h:
    Add a new menu_setcolours() function to allow the fore/background colour bits to be set on a menu entry.
    colourmenu.c:
    Use the new menu_setcolours() function instead of making assumptions about menu's internal structure layout.
    dbox.c/dbox.h:
    New functions dbox_hidefield and dbox_unhidefield added to complement the fade/unfade ones.
    As dbox_findicon/findiconbefore are only ever used to find writables, rename them as such. Also, make them find writable (type 15) AND writable draggable (type 14) icons.
    Allow navigation by tab/shift tab through icons like the Style Guide chapter 16 says we should. In fact it's a little odd that dbox is emulating 'Ktar' validation itself manually when the Wimp has done this since version 2.92, but maintaining it is less effort than going and checking all the templates.
    Fix bug when looking for leading capital letter matches to complete a dbox, the previous code was looking at the cached copy of the icon flags in d->window rather than the ones the Wimp is actually showing on screen (as might have been modified by dbox_fadefield() for example), so it was possible to complete a dbox for an icon which wasn't visible or selectable.
    Fix bug when looking for leading capital letter matches when the icon doesn't have any text - the template file format is defined as being 0x0D terminated. This would then lead to 'R' and 'S' being accepted as matches having run off the end of the text buffer and into the validation string (which usually contains an 'R' or 'S' validation first). Changed to accept any control terminator.
    event.c:
    When force closing the current menu, don't forget to set the two state variables back to 0.
    fileicon.c/resspr.c/txt1.c/txtundo.c/wimp.c:
    Use existing pointer type definitions.
    flex.c:
    Treat bools as bools and pointers as pointers.
    Say something useful in an error box if flex fails its internal consistency check, rather than just data aborting.
    font.c:
    Remove ROM conditionals from around font_readdef() function, always include the function.
    fontselect.c:
    Use font_readdef() rather than local copies of the exact same function.
    txtedit.c/txtfile.c/txtfind.c/txtedit.h:
    Remove redundant 'deletepending' state variable, and confusion over 'selectrecent' being a bool.
    Call os_byte directly rather than passing to os_cli("*FX").
    Other minor tidy ups.
    wimpt.c:
    Mark messages list as a constant.
    xferrecv.c:
    Also preserve the size member while recycling the xferrecv_ack message block, rather than corrupting it as 256.
    xfersend.c/xfersend.h:
    Take out the leaf name formulator as a common function for the two places to use it. This also allows the function to return the length of the leaf name so the correct message block size can be used. Inspection with MsgMon/!Reporter was showing that all xfersend initiated saves were passing the leaf name padded to 256 with garbage.
    Reindent a few functions.
    Make the draggable sprite replacement follow the same validation string rules as the Wimp, previously only ";s" was accepted, so upper case 'S' and validation strings that start with the sprite validation didn't work.
    xfersend_pipe() function prototype changed to match xfersend() more closely - not being able to respond to the context of a wimp_eventstr made this function practically unusable.
    akbd.h:
    Windows logo and menu keys defined.
    flex.h/help.h/wimpt.h
    Some typos in comments.
    wimp.h:
    Missing wimp message action codes and structure defs added for completeness.
    
    
    Version 5.83. Not tagged
    5b7cef10
VersionNum 811 Bytes