- 03 Apr, 2015 1 commit
-
-
Robert Sprowson authored
The txt library part of RISC_OSLib was essentially contrary to everything Acorn was telling its developers, to use the global clipboard. Additionally, support is added for swap case within a selection. txt.h: Add a new charoption type 'txt_READONLY' to inform txt that the buffer is notionally read only, this is used to supress 'Paste' in the selection menu when appropriate. Correct some typos in the comments. txt1.h: Kill off modula 2 dummy structure member. txtar.h: Remove unused function export. txtfile.h: Rename basicimport to be consistent with the text version of the same function. We use 'import' to denote RAM transfers and 'insert' to denote file/scrap transfers throughout. txtmisc.h: Redundant internal functions removed. txtundo.h: Add a new undo operation type 't' for swap case, to avoid polluting the undo buffer with an entire copy of the text where only the case changed. Kill off modula 2 double pointer requirement. txtedit.h: Unused structure member 'selectctl' removed. txt.c: Kill off modula 2 double pointer requirement. txtar.c: Refactor message despatch with a switch statement so the save/load/open operations are explicitly checked for, in case the application enables other messages. txtedit.c: Adopt MOVERWRITE, been enabled since 1988 so is probably good to keep. Dynamically generate the Select menu by first sending a clipboard request, and fading Paste if no reply comes back. Implement changed mouse selection logic. Implement different hotkeys and caret navigation. Implement copy and paste/replace operations. Implement swap case operation. txtfile.c: Type corrections and function rename admin. Implement copy and paste/replace operation for detokenised BASIC. txtmisc.c: Supporting functions for clipboard added, supporting functions for ArcEdit removed. txtscrap.c: Make sure the caret is visible for programmatical zero sized selections. txtundo.c: Allow suspension of undo during known complex operations, such as import via RAM transmit. This was a longstanding bug where the import buffer was grabbed in ~4k chunks (even if only 1 byte was being transferred) which in turn resulted in a +4000 undo insertion and a -3999 removal, which given the default undo buffer is only 5k would result in it failing the reversibility test, so no undo was possible. Now, during a RAM transmit undo is suspended until the total transfer size is known, and only that data is placed in the undo buffer (subject to the same 5k reversibility limit). Add new undo type 't' for swap case operation. rlibdata.s: 4 new ints and 1 new BOOL, so RlibSpace increases by 5. Version 5.85. Tagged as 'RISC_OSLib-5_85'
-
- 31 Jul, 2014 1 commit
-
-
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
-
- 05 Nov, 1996 1 commit
-
-
Neil Turton authored
-