Path: utzoo!mnetor!uunet!husc6!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!cisunx!jgh2 From: jgh2@cisunx.UUCP (John G. Hardie) Newsgroups: comp.sys.amiga.tech Subject: Re: Gadgets and requesters: trying to get started Message-ID: <8829@cisunx.UUCP> Date: 20 Apr 88 01:50:30 GMT References: <27194@cca.CCA.COM> Reply-To: jgh2@unix.cis.pittsburgh.edu.UUCP (John G. Hardie) Organization: Nuclear Physics Lab, Univ. of Pittsburgh Lines: 72 In article <27194@cca.CCA.COM> jack@cca.CCA.COM (Jack Orenstein) writes: > >I'm trying to learn about requesters and gadgets with the help of Peck's >book and I'm having some trouble. The information in chapter 5 seems >incomplete. In particular, I can't find any discussion of how to attach >a requester to a window. The paint program in chapter 5 doesn't seem to >do it, and the topic isn't discussed in the text. Yet the window data The easiest way, if you just want to put up simple requesters is to use the intuition function AutoRequest. This is called as follows: AutoRequest(wi,bt,pt,nt,pf,nf,w,h) where: wi -> pointer to window struct. bt -> pointer to intuitext structure that contains the main text of the requester. pt -> pointer to intuitext struct that contains the text for the positive hit box nt -> pointer to intuitext...negative hit box pf -> IDCMP flags that you want set for the positive text. nf -> same for negative text w -> width of requester h -> height of requester. This routine will build and display a simple requester (similar to the 'insert disk' type of requester), and it's fairly easy to use. If you want more details on this call, or more info on more flexible requesters, get the Addison Wesley Intuition Reference Manual. >structure in intuition.h has a FirstRequest field, a DMRequest field >(what does the DM stand for?), and a ReqCount field. I've tried filling ^^ Double Menu... This type of requester is attached ( in a sense ) to a double click of the mouse menu button. If you define one of these requesters and double click the menu button while in the active region of the window, the requester will appear like magic. (see intuition man. for more details) >in the FirstRequest field and the ReqCount field, but the requester does >not appear. Also, how do the sizes of the requester and any attached >gadgets relate? Are gadget coordinates relative to the requester or to >the window containing the requester? - if a gadget is attached to a requester, the coordinates are relative (usually) to the top left corner of the requester. The size of the requester relative to the window is set by you, usually the gadgets are placed absolutely relative to the requester, but you don't have to do it this way (e.g. GRELBOTTOM, GRELWIDTH and others of that ilk - sorry, these are flags that you can set in the gadget structure that will make the gadget position and size relative to the size of the requester - again, see intuition manual for details) > >Are there other fields (in the requester or window) that have to be set? >Are there commands for displaying and clearing requesters? Are there any >books with more complete information? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ guess what??? Intuition Manual.... :-) > >Jack Orenstein Hope this helps, John -- John Hardie - Physics Dept U. Of Pittsburgh Pittsburgh, Pa 15260 jgh2@cisunx.UUCP, jgh2@{unix or vms}.Cis.Pittsburgh.Edu, jgh2@PITTVMS.BITNET An Ounce Of Inaccuracy Saves A Pound Of Explanation