User I/O
The following is documentation on the functionality in qkw systems that should be replaced by qkPopUp.
The 3 key functions are AskYN, CHoose and SHow.
These functions accept text or other data and captions as the right argument
and they use the left argument for handling instructions.
- CHoose used to display a list of choices for the user to choose from.
- AskYN used to present a yes/no question (e.g. 'Okay to accept these changes?').
- SHow used to provide information to the user which does not require a response
- dU123 used to interpret: LA[2] of SHow, LA[3] of AskYN, or LA[4] of CHoose
- CHoose LA[5] =(0-5)= can have value (0-5) to invoke user attention,5=SYSTEM ERROR ALARM
- AskYN LA[2] =(0-5)= can have value (0-5) to invoke user attention (not yet implemented)
- SHow LA[1] =(0-5)= can have value (0-5) to invoke user attention,5=SYSTEM ERROR ALARM ° 6 SHow [1] SHOW[3]
- CHoose LA[2] =?= default choice if response is "Enter" or OK, initially highlighted (¯1 shld mean cancel is default)
- AskYN LA[1] =1= default choice © 0(No), 1(Yes), ¯1(Cancel) to tell which button to highlight (for Enter).
- CHoose LA[6] =?= timer (timeout) -- expressed in seconds
- AskYN LA[4] =1= timer, or n means return default answer after waiting 120 (or n) seconds. (not implemented)
- CHoose LA[4] =1= "RunFast" allowed, take default answer if U[1]=1 (tentatively implemented !!) not used til 4/13/02
- AskYN LA[3] =1= "RunFast" allowed, must query for RA: =0=allow "RunFast" by taking default answer if U[1]=1
- SHow LA[2] "RunSilent", whether to show message, per dU123. (2=not if U[2]=1)(always= 1) ° 4 SHow [2] SHOW[1]
- CHoose LA[1] =0= allow more than one choice, =1=allow only 1 choice
- CHoose LA[3] =1= enables E for Cancel button)
- AskYN LA[?] =0= default for Escape=No, 1 means default for Escape=Yes
- AskYN LA cancel button is included if ¯1¹RA in AskYN
- AskYN in AskYN, "escape" should be same as "N", in CHoose, "N" should be same as "escape"
- AskYN Result is 0, 1, or ¯1 depending on button pressed.
- AskYN Note: question may contain TCNLs and TCHTs.
- AskYN Can we add an optional button that will say "yes to all" (U[1]←1 will be handler), see AddF10
- AskYN R = any one of "1 0 ¯1" (Yes No Cancel), does not allow for: Memory Failure, OK, Abort, Retry or Ignore
- AskYN wcall function = "MessageBox", arguments are below
- AskYN Control codes:
- AskYN 0 MB_OK 16 MB_ICONSTOP - Critical message
- AskYN 1 MB_OKCANCEL 32 MB_ICONQUESTION - Warning query
- AskYN 2 MB_ABORTRETRYIGNORE 48 MB_ICONEXCLAMATION - Warning message
- AskYN 3 MB_YESNOCANCEL 64 MB_ICONINFORMATION - Informational message
- AskYN 4 MB_YESNO
- AskYN 5 MB_RETRYCANCEL 0 MB_DEFBUTTON1
- AskYN 256 MB_DEFBUTTON2
- AskYN 0 MB_SYSTEMMODAL 512 MB_DEFBUTTON3
- AskYN ? MB_APPMODAL
- AskYN 8192 MB_TASKMODAL (inhibits all windows owned by application)
- AskYN 32768 ? (don't give focus to message box)
- AskYN Result code:
- AskYN 0=memory failure 2=CANCEL* 4=RETRY 6=YES*
- AskYN 1=OK 3=ABORT 5=IGNORE 7=NO *
- SHow cancel button may have no meaning in SHow
- SHow the following colors have been selected to provide emphasis
- SHow [0] black, normal , none
- SHow [1] teal , normal , none
- SHow [2] blue , italic , none
- SHow [3] green, underline, none
- SHow [4] red , bold , none
- SHow [5] red , bold , bullet, larger font
- dU123 Y←U[(² 2 2 2 RA)/¼3] © this is forgiving like: X←^/0ĀU... (see use in SHow)
- dU123 X←^/Y
- dU123 RA X U[1] U[2] U[3] Means
- dU123 1 0 Always show
- dU123 0 1 * ShowþAsk unless U[1] ("fast", Runfast, fST)
- dU123 2 2 * ShowþAsk unless U[2] ("silent", sIL) (only needed messages)
- dU123 3 3 * * ShowþAsk unless ^/U[1 2]
- dU123 4 4 * ShowþAsk unless U[3] ("very silent", no file I/O, vSIL)
- dU123 5 5 * * ShowþAsk unless U[1 3]
- dU123 6 6 * * ShowþAsk unless ^/U[2 3]
- dU123 7 7 * * * ShowþAsk unless ^/U[1 2 3]
- COMPAREVARS and delta-POUTQ should also be replaced by qkPopUp