// // UREF.VDM // Christian Ziemski 10.03.1999 // f. 5.20 (HOME->USER_MACRO) 15.08.2000 // // Built from XREF-C.VDM // // user definable reference window ...... // //---------------------------------------------------------------------- // // After the creation of the reference lists you can toggle between // a line in the cross buffer and the appropriate location in the source // text buffer with F11. // // Additionally you can toggle between source text and reference // without positioning with F10. // // // And // // Shift-F1 toggles a little help window on/off // //---------------------------------------------------------------------- // // Usage: Load the source text into a buffer and then // load/execute the macro UREF.VDM. // //---------------------------------------------------------------------- // // To do: - windows resizing of the reference list // (Awaiting an answer from Ted ...) // //---------------------------------------------------------------------- // // used resources: // --------------- // // buffer[#93] : original text // buffer[#95] : reference // // // T-Reg 90 : // // #93 : buffer number source text // #94 : temp // #95 : buffer number reference list // #99 : temp. // // // Marker 9 // ///////////////////////////////////////////////////////////////////////// #93=Buf_Num // actual buffer with source text File_Open("|(USER_MACRO)\UREF.TMP") #95=Buf_Num Config(S_H_CR_LINE,'HCL',0,ALL) // Buffer-Switch-Event-Macro: // Make the cursor line highlighted in the condensed function list only RS(114,"if(BN==#95){Config(S_H_CR_LINE,'HCL',2)} else {Config(S_H_CR_LINE,'HCL',0)}") // ---------- the cross reference BS(#95,ATTACH) Win_Move(#95,WINX+WINW-FONTW*40,WINY,FONTW*40,WINH) BS(#95, EVENT) // --------- the key assignments: --------------------------- Key_Add("Shft-F1", "[VISUAL EXIT] Call(100,'HELP')",NOCONFIRM) Key_Add("F10", "[VISUAL EXIT] if(BN!=#93){if(BN==#95){BS(#93,EVENT)}Return} BS(#95,EVENT) ",NOCONFIRM) Key_Add("F11", "[VISUAL EXIT] if(BN==#93) {BS(#95,EVENT) Return} BoL Search_Block('|!|W', CP, EoL_Pos, NOERR) if (EM){return} RCB(90,CP,EoL_Pos) BS(#93, EVENT) S('|@(90)', BEGIN+NOERR) SR_Set('|@(90)','') SVL(8) if(EM){U BS(#95,EVENT) alert}",NOCONFIRM) Key_Add("F12", "[VISUAL EXIT] if(BN==#93) {BS(#95,EVENT) Return} BoL Search_Block('|!|W', CP, EoL_Pos, NOERR) if (EM){return} RCB(90,CP,EoL_Pos) BS(#93, EVENT) S('|@(90)', BEGIN+NOERR) SR_Set('|@(90)','') SVL(8) U BS(#95,EVENT)",NOCONFIRM) Visual_Macro(NOMSG) return //---------------------------------------------------------------------------- :HELP: if(Win_Reserved_Bottom_ID != 0) { Win_Delete('H') Return } #99=Win_Num Win_Delete('H') Win_Reserved('H',2,BOTTOM+NOBORDER) Win_Switch('H') Win_Color(15) Win_Clear() M(" SF1 Help F10 toggle without | F11 toggle with positioning | F12 and return") Win_Color(112) WS(#99) return