home *** CD-ROM | disk | FTP | other *** search
- { Invoke a system requester using AutoRequest().
-
- Date: 13th January 1993 }
-
- #include <intuition.h>
-
- SUB fill_intuitext(textaddr&,left%,top%,msgaddr&)
- declare struct IntuiText *txt
-
- txt = textaddr&
-
- txt->FrontPen = 0
- txt->BackPen = 1
- txt->DrawMode = JAM1
- txt->LeftEdge = left%
- txt->TopEdge = top%
- txt->ITextFont = NULL
- txt->IText = msgaddr&
- txt->NextText = NULL
- END SUB
-
- SUB system_request(body$,positive$,negative$)
- declare function AutoRequest% library intuition
- declare struct IntuiText main
- declare struct IntuiText pprompt
- declare struct IntuiText nprompt
-
- '..width of requester
- '..(assumes topaz)
- req.x% = len(body$)*8 + 20
-
- '..create main message and two option messages
- fill_intuitext(main,req.x%\2+10,25,@body$)
- fill_intuitext(pprompt,5,5,@positive$)
- fill_intuitext(nprompt,5,5,@negative$)
-
- library intuition
-
- res% = AutoRequest(window(7),main,pprompt,nprompt,NULL,NULL,req.x%,50)
-
- library close intuition
-
- system_request=res%
- END SUB
-