Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!ihnp4!homxb!antique!cjp From: cjp@antique.UUCP (Charles Poirier) Newsgroups: comp.sys.amiga Subject: Need help rendering Gadgets Message-ID: <1980@antique.UUCP> Date: Fri, 20-Nov-87 04:07:06 EST Article-I.D.: antique.1980 Posted: Fri Nov 20 04:07:06 1987 Date-Received: Tue, 24-Nov-87 07:03:05 EST Organization: AT&T Bell Labs, Holmdel, NJ Lines: 53 Summary: Can you erase these puppies? I need some help using Intuition's Boolean Gadgets. I'm using V1.2. These are basically rendering problems. Case one: Boolean gadgets, in a window (not a requester), GADGHCOMP, TOGGLESELECT | RELVERIFY, NULL GadgetRender, and GadgetText using the default font. For this case, I am not using GADGDISABLED. I find that, after installing these gadgets, I can't erase them. I do RemoveGadget() for all of them, followed by one RefreshGadgets(). Neither the IntuiText, nor the complemented box (for the selected gadgets) is erased. I could perhaps understand the text remaining, as it is documented as "printed after the gadget is rendered". I'd be willing to re-draw the text in the background pen before removing, if necessary. But shouldn't RemoveGadget at least re-flip the HCOMP box? It kind of looks like RemoveGadget does nothing but unlink it from the window, which if true, is a bit disappointing. Case two: Again, Window, Boolean Gadgets, null GadgetRender, with IntuiText, but now GADGHBOX | GADGDISABLED and RELVERIFY without toggleselect. The Gadgets come up ghosted as they should. But when I try to enable the gadgets, the ghosting remains. They do become enabled, i.e. selectable; the outline box comes on while select-down is held, as expected; but the ghosting seems stuck on. I tried OnGadget, tried following it with RefreshGadgets; tried gad->Flags &= ~GADGDISABLED then RefreshGadgets; tried RemoveGadget then gad->Flags &= ~GADGDISABLED then AddGadget then RefreshGadgets. Tried substituting RefreshGList for RefreshGadgets in some of the above cases. Still ghosted. None of these match my reading of the documented behavior of OnGadget: "When a Gadget is enabled, ... its imagery is displayed normally (not ghosted)." Is there some weird problem due to having IText but no GadgetRender? In case it matters, my screen is SCREENQUIET, my window idcmp is MOUSEBUTTONS | GADGETUP, the window is RMBTRAP | SMART_REFRESH | BORDERLESS. I guess Requester Gadgets would probably erase cleanly by ending the requester, but at least for the unghosting problem, requesters shouldn't be necessary, should they? Also, I'm concerned about having to "satisfy" requesters in the reverse order of invoking them. Is this a requirement even with NOISYREQ requesters? I want to be able to add and subtract gadgets at will. Some I want to just disable/enable, but some I want to be completely removed and erased. They must be essentially random-access for the user and the program. I'd prefer to avoid having to fake up my own brand of gadgets using Bobs, paperclips, and rubber bands. So please: Is there an Intuition function to erase a Gadget? And how do I accomplish Gadget unghosting during the current Phase of the Moon? Thank you. Charles Poirier (ihnp4, ucbvax)!vax135!cjp