Short: Build GUI from ReadArgs template Author: Szymon Ulatowski Uploader: szulat@friko6.onet.pl Type: dev/mui Requires: MUI ABOUT Readargsgroup.mcc is used by AmigaMesaRTL's prefs program and Mesa.mcc class. You can use it for free if you find it useful. The entire GUI is described by a single ReadArgs template line so it's the most compact representation in the world... Some special argument names can change GUI element's appearance, eg. "Name" is ordinary string argument, but "_FN_Filename" would have a filename popup because of "_FN_" prefix. See developer documentation for full list of enhancements. INSTALLATION Copy Readargsgroup.mcc from 'libs' to your MUI:libs/mui directory. You can also copy demos/ReadArgsGUI to one of your path locations if you are going to use it in scripts. THE DEMO Supplied ReadArgsGUI is a very simple example of the MUI application using Readargsgroup. It builds a GUI, based on the supplied template. After the user fills in the fields and clicks on 'OK', the arguments string (ReadArgs compatible, of course) is returned to the standard output. 'Cancel' is indicated by return value of 5 (can be easily checked by IF WARN or FAILAT 5). It could be useful in scripts for getting user input. You can even do: (under v39 only) Format `ReadArgsGUI DEVICE=DRIVE/K/A,NAME/K/A,OFS/S,FFS/S,INTL=INTERNATIONAL/S,NOINTL=NOINTERNATIONAL/S,DIRCACHE/S,NODIRCACHE/S,NOICONS/S,QUICK/S` Consequent parameters are parsed with ReadArgs and put into the GUI. For example: ReadArgsGUI Your_Name,Age/N John 22 ...so you can supply the default values (or preserve the previous ones). ============================= Archive contents ============================= Original Packed Ratio Date Time Name -------- ------- ----- --------- -------- ------------- 620 237 61.7% 23-Oct-98 19:37:50 Readargsgroup.info 620 234 62.2% 13-Sep-98 19:30:54 +demos.info 496 228 54.0% 23-Oct-98 19:04:50 +ComplexGUI 476 230 51.6% 23-Oct-98 18:56:26 +ComplexGUI.info 8252 4675 43.3% 23-Oct-98 16:58:54 +ReadArgsGUI 176 137 22.1% 23-Oct-98 19:00:56 +showuserinfo 301 215 28.5% 23-Oct-98 19:58:00 +SimpleGUI 496 248 50.0% 23-Oct-98 18:50:50 +SimpleGUI.info 2418 1128 53.3% 13-Sep-98 12:58:54 +MCC_Readargsgroup.doc 2723 1176 56.8% 23-Oct-98 17:05:34 +ReadArgsGUI.c 325 170 47.6% 09-Sep-98 18:02:18 +Readargsgroup_mcc.h 620 238 61.6% 13-Sep-98 19:30:48 +libs.info 9364 5703 39.0% 13-Sep-98 16:49:46 +Readargsgroup.mcc 1659 936 43.5% 23-Oct-98 19:14:04 +README 831 307 63.0% 13-Sep-98 19:47:54 +README.info -------- ------- ----- --------- -------- 29377 15862 46.0% 25-Oct-98 07:37:14 15 files