mpierce@ewu.UUCP (Mathew W. Pierce) (12/30/90)
Hi all, I am trying to put a boolean gadget into the top border of a window with no success. I have initialized a boolean gadget structure, made the associated image structure with all image data, and set the TOPBORDER and GRELRIGHT flags in the appropriate areas. The problem that I am having is that when I don't set the GZZGADGET flag, the image is drawn in the right place, just left of the front/back gadgets, but I can't activate the gadget (when I try, I get the drag bar). When I do set the GZZGADGET flag, the gadget is drawn somewhere in the middle of the screen. The gadget is not being drawn in a GIMMEZEROZERO window, so I am wondering if that is the problem. What am I doing wrong? The gadget is supposed to be a window shrink/ expand gadget like in WordPerfect. I want to put the gadget in a normal smart_refresh window. Any help would be greatly appreciated Thanks, Matt Pierce
genoa@athena.mit.edu (Jack N Holt) (12/31/90)
In article <1374@ewu.UUCP> mpierce@ewu.UUCP (Mathew W. Pierce) writes: >Hi all, > >I am trying to put a boolean gadget into the top border of a window >with no success. I have initialized a boolean gadget structure, made >the associated image structure with all image data, and set the >TOPBORDER and GRELRIGHT flags in the appropriate areas. The problem >that I am having is that when I don't set the GZZGADGET flag, the image >is drawn in the right place, just left of the front/back gadgets, but I >can't activate the gadget (when I try, I get the drag bar). When I do set >the GZZGADGET flag, the gadget is drawn somewhere in the middle of the >screen. The gadget is not being drawn in a GIMMEZEROZERO window, so I >am wondering if that is the problem. > >What am I doing wrong? The gadget is supposed to be a window shrink/ >expand gadget like in WordPerfect. I want to put the gadget in a normal >smart_refresh window. > >Any help would be greatly appreciated > >Thanks, > >Matt Pierce What's happening is Intuition checks the gadget list in sequential order to see which (if any) gadget a mouse-click falls within. So, if the drag gadget precedes your gadget in the gadget list, Intuition will decide you wanted the drag gadget even though you think you're clicking your gadget. You need to make your gadget come first. AddGadget(win,gad,0) will place Gadget "gad" ahead of all other gadgets in the gadget list of Window "win". However, if you are supplying a gadget list in the NewWindow structure, I'm not sure that you can override the system gadgets. Anybody know a way around this? Anyway, if you can use AddGadget() instead, it should work. +-----------++----------------------++-----------------------------------+ | Jack Holt || genoa@athena.mit.edu || 3 Ames St #93, Cambridge MA 02139 | +-----------++----------------------++-----------------------------------+ And now for something completely different...
jbickers@templar.actrix.gen.nz (John Bickers) (01/01/91)
Quoted from <1990Dec30.180904.19241@athena.mit.edu> by genoa@athena.mit.edu (Jack N Holt): > In article <1374@ewu.UUCP> mpierce@ewu.UUCP (Mathew W. Pierce) writes: > >I am trying to put a boolean gadget into the top border of a window > What's happening is Intuition checks the gadget list in sequential > order to see which (if any) gadget a mouse-click falls within. So, if > the drag gadget precedes your gadget in the gadget list, Intuition One problem I had with trying to do this was based on window activation. When the window was deactivated, my iconify gadget would get "shadowed", and when the window was reactivated the drag bar would be drawn over the gadget altogether. A solution in the end was to detect when the window got (de)activated, and redraw the gadget directly. > | Jack Holt || genoa@athena.mit.edu || 3 Ames St #93, Cambridge MA 02139 | -- *** John Bickers, TAP, NZAmigaUG. jbickers@templar.actrix.gen.nz *** *** "Snake through the chaos with a smooth noodle map" - Devo ***
jesup@cbmvax.commodore.com (Randell Jesup) (01/05/91)
In article <9578.tnews@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes: >> >I am trying to put a boolean gadget into the top border of a window > One problem I had with trying to do this was based on window > activation. When the window was deactivated, my iconify gadget would > get "shadowed", and when the window was reactivated the drag bar would > be drawn over the gadget altogether. > > A solution in the end was to detect when the window got (de)activated, > and redraw the gadget directly. This may not solve all your problems, but you should set TOPBORDER if it's going to live in the top border. There may be other refresh issues to deal with. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)