discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Jumpy "Windows" menu


From: Willem Rein Oudshoorn
Subject: Re: Jumpy "Windows" menu
Date: 15 Mar 2003 19:08:29 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Richard Frith-Macdonald <richard@brainstorm.co.uk> writes:

> On Saturday, March 15, 2003, at 04:20  pm, Willem Rein Oudshoorn wrote:
> 
> > Yes, I noticed.  But I wonder, is this a bug in NSWindow?
> > I would expect that changing the window size would leave the upper
> > left corner in place.  So how does this behave on OpenStep MacOSX?
> 
> Changing the window size should move the upper left corner.
> This is because the window origin is defined as the lower left corner
> of the window.
> That's how it works on NeXTstep, OPENSTEP, MacOS-X

Good, I never did any intensive GUI programming on OpenStep and this
shows it again :-).

To be nitpicking, you change the contentsize and the apple documentation
does not specifiy in which direction it resizes.  This of course
implies the origin stays the same and supports your point.

But because it did not say anything and I expect that in most
circumstances, from a user perspective, you expect the window to grow
downards I thought I would ask.

> As that would break compatibility with OPENSTEP/MacOS-X, and conflict
> with
> all the documentation about the reference frame for windows (and for
> drawing
> in OpenStep except in flipped views), I don't think it would be a good
> idea.

Ok Ok, I get the idea.
But this leads to another question:  
How would you normally change the content size and keep the TopLeft corner
at the same place?

oldPosition = [window get the old upper left corner posisition];
[window setContentSize: newSize];
[window setFrameTopLeftCorner: oldPosition];

Will work but will lead to visual distraction because setContentSize
will trigger redisplaying the window.

The other option is to not use the setContentSize but just work with
the window frames, but this basically lead to reimplementing the
setContentSize: but now without the redrawing.

This I do not like either.  
I guess the immediate redisplaying in setContentSize: is also already
the case in OpenStep/MacOSX ...?


Wim Oudshoorn.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]