[comp.sys.amiga] intuition windows

pmy@boole.acc.virginia.edu (Pete Yadlowsky) (02/01/88)

Hi all,

I'd like to be able to bring an already existing window to front AND make
it the active window, without having to click in it. Can I simply twiddle
window->Flags without incurring the wrath of Intuition? Or is there
more to it? Thanks for any help.




-- 
Pete Yadlowsky
Academic Computing Center
University of Virginia
e-mail: pmy@vivaldi.acc.virginia.EDU

dpvc@ur-tut.UUCP (Davide P. Cervone) (02/10/88)

In article <405@boole.acc.virginia.edu> pmy@boole.acc.virginia.edu (Pete Yadlowsky) writes:
>I'd like to be able to bring an already existing window to front AND make
>it the active window, without having to click in it.

It takes two calls to intuition:

	WindowToFront(myWindow);
	ActivateWindow(myWindow);

That's all there is to it.


> Can I simply twiddle
>window->Flags without incurring the wrath of Intuition? Or is there
>more to it? Thanks for any help.

It is inadvisable to handle the window flags youself, and yes, there's more 
to it than just the window flags.  You'll note that Screen->FirstWindow and
Window->NextWindow do not track windows from front to back (I think they 
track the windows in the order of creation).  The Layers Library does all
the real work for that.  You would have to mess with the Window->WLayer
and the Screen->LayerInfo in order to move a window "by hand."  It's not
worth it, especially since Intuition provides reasonable calls that do what
you want.

See wKeys (recently posted to comp.sources.amiga) for some samples of how
this can be used.

Davide P. Cervone
dpvc@tut.cc.rochester.edu
dpvc@ur-tut.UUCP
DPVC@UORDBV.BITNET