<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Mensaje</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>Hi Trygve,
</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004> <FONT face=Arial
size=2>It was a long time ago but I think the rationale was this.
The DiagramBrowser SystemWindow is composed of 3 panels. The two on
the left and the one on the right where the Diagrams appear.
</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004> <FONT face=Arial
size=2>This last one isn't a Diagram but a simple Morph acting as a
container because if it wasn't in that way then the SystemWindow would
change the Diagram's color to match the one of the window. </FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>
Another reason in using SystemWindows in this way is that I found it
more convenient for adding and removing submorphs. Here you just add and remove
submorphs from the container and you forget about the SystemWindow. Without the
container you would have to be careful on how you add and remove the morphs
to not mest up the LayoutFrames and resizeability (does exists that word?) of
the SystemWindow panels.</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004> <FONT face=Arial
size=2>Inside Diagram what we have is:</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004>- a TwoWayScrollablePanel</SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>- a
TransformMorph</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>- an
HJPasteUpMorph</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>
To reduce one level of composition we could make Diagram to be a subclass of
TwoWayScrollablePane, but I did it in this way because a Diagram do not only
holds the TwoWayScrollablePane but also an extra annotation panel which is not
visible by default (right click on the diagram and select: 'shows annotations
panel'). </FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>
The TransformMorph is part of the TwoWayScrollablePanel so we cannot get rid of
it. The last level is the PasteUpMorph which holds the shapes, and thats
it. Those were the six level.</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial size=2>Hope it
helps.</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004><FONT face=Arial
size=2>Hernán</FONT></SPAN></DIV>
<DIV><SPAN class=656243917-16082004></SPAN><SPAN class=656243917-16082004><FONT
face=Arial size=2></FONT></SPAN><SPAN class=656243917-16082004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=es dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
squeak-dev-bounces@lists.squeakfoundation.org
[mailto:squeak-dev-bounces@lists.squeakfoundation.org] <B>On Behalf Of
</B>Trygve Reenskaug<BR><B>Sent:</B> Monday, August 16, 2004 2:23
PM<BR><B>To:</B> The general-purpose Squeak developers list<BR><B>Subject:</B>
RE: Widow activation<BR><BR></FONT></DIV><FONT size=3>Hernán,<BR>Many thanks
for your quick reply.<BR><BR>The problem was that
TwoWayScrollPane>>handlesMouseDown: returned true and the event did not
reach up to the SystemWindow.<BR>Changing it to false solved the
problem.<BR><BR>Jacaranda was my starting point for the present programs, but
I have tried to simplify the morph structure. Corresponding to my three
levels, I find 6 levels in Jacaranda:<BR><BR>a SystemWindow<BR>a Morph (Morph
default)<BR>a Diagram (handlesMouseDown: returns evt yellowButtonPressed,
i.e., false)<BR>a TwoWayScrollPane (handlesMouseDown: returns true)<BR>a
TransformMorph (Morph default)<BR>a HJPasteUpMorph (handlesMouseDown: returns
true)<BR><BR>I haven't quite penetrated the rationale behind the many layers
in Jacaranda, but it seems as if I could have introduced a dummy layer below
the SystemWindow for the purposes of returning false. My solution is to use my
own sco of TwoWayScollPane that returns true. This may be a hack since I there
may be a deep reason for ScrollPanes to return true.<BR><BR>Problem resolved.
Many thanks for putting me on the right
track<BR>--Trygve<BR><BR>-----------------------------------------------<BR>At
16.08.2004 11:34, Hernán wrote:<BR><BR>
<BLOCKQUOTE class=cite cite="" type="cite">Hi Trygve,
<BR><X-TAB> </X-TAB><BR><X-TAB> </X-TAB>You
should check DiagramBrowser. In there I have the same<BR>structure than you
(SystemWindow, TwoWayScrollPane and PasteUpMorph) but<BR>without the problem
you are
describing.<BR><BR><X-TAB> </X-TAB>How
are you handling the events? With #on:send:to: or
overriding<BR>#handlesMouseDown: and #mouseDown: ? Because If you return
false in<BR>#handlesMouseDown: I am pretty sure that the event should reach
the<BR>SystemWindow and get it
activated.<BR><BR><X-TAB> </X-TAB>BTW,
you can always from the event handler send the #activate<BR>message to the
SystemWindow yourself.<BR><BR>> -----Original Message-----<BR>> From:
Trygve<BR>> <BR>> I have a SystemWindow<BR>>
containing a TwoWayScrollPane<BR>>
containing a PasteUpMorph<BR>> <BR>> The window is activated (moved to
the top) if I click the <BR>> SystemWindow header.<BR>> It is not
activated if I click in a visible corner of the <BR>>
PasteUpMorph.<BR>> <BR>> I have tried making the PasteUpMorph keep the
event <BR>> WasHandeled at =false,<BR>> but it doesn't help.<BR>>
<BR>> Any ideas?<BR>> Cheers<BR>> --Trygve</BLOCKQUOTE><BR><X-SIGSEP>
<P></X-SIGSEP>-- <BR><BR>Trygve Reenskaug
mailto: trygver <at> ifi.uio.no<BR>Morgedalsvn.
5A <A
href="http://heim.ifi.uio.no/~trygver"
eudora="autourl">http://heim.ifi.uio.no/~trygver</A><BR>N-0378
Oslo Tel: (+47) 22
49 57 27<BR>Norway<BR></FONT><BR></P></BLOCKQUOTE></BODY></HTML>