StrongED tools v0.02 16-Apr-2006 ==================== =========== These four BASIC files provide 'C' programmers with a better way of loading header files than that provided by a default installation of StrongED. They should be placed in "!StrED_cfg.UserPrefs.Tools". All of the tools assume a RISC OS-style directory structure with C and H folders rather than '.c' and '.h' files. LoadApropo If you are in a 'C' file, this will try and load an 'H' file of the same name, and vice versa. Typically, the tool is invoked from a keyboard shortcut such as "Ctrl+H". LoadHdrGbl Given a C-style inclusion (e.g. "Global/Services.h"), this tool transforms the Unix pathname into a RISC OS pathname and attempts to load it through a variety of path variables. The local component directory is searched last. Usually, the tool is bound to a double- click on a line of the form '#include
'. LoadHdrLcl This tool works the same way as LoadHdrGbl, except the local component directory is searched first. Usually, the tool is bound to a double-click on a line of the form '#include "header"'. LoadLib A supporting library containing a few functions used by the other three tools. If you want to use the tools in the manner suggested above, you must modify the 'C' mode file. The easiest way to do this is to load a piece of 'C' code or open a blank text file and change into 'C' mode, open a menu over the document and select the 'C' entry with Shift held down. Look for the 'Search' section. It should have lines for 'include1' and maybe 'include2', or just 'include'. Delete or comment out these lines and add the following: include1 [_spct] '#include' _spct ('"') [_spct] @0 * @9 ('"') include2 [_spct] '#include' _spct ('<') [_spct] @0 * @9 ('>') A little further down is the ClickList section. Again remove or comment out lines related to 'include1', 'include2' or 'include', and add the following: include1 SetTmp(include1, "Tmp$Word") Run(".LoadHdrLcl") include2 SetTmp(include2, "Tmp$Word") Run(".LoadHdrGbl") These two lines set up double-clicks within '#include' lines for files included within double quotes ("include1") or angle brackets ("include2") to try and load a header file using the local directory first (double quotes case) or the local directory last (angle bracket case). Next look for the text "^H" to find an instance of the Ctrl+H key binding. Delete or comment out the existing definition if it is not already either absent or commented out and add the following - a good place is just before the definition for F10: Key ^H Menu Load H.* Icon load Help HCM_ld Select SetTmp() Run(".LoadApropo") This sets up Ctrl+H to load a C or H file of the same leafname as the current text, useful if you want to hop between a related source or header file when creating code. It only looks within the current component directory.