OT: View/subview setup [Was: Re: (got it) lower-right origin on NSView?]
OT: View/subview setup [Was: Re: (got it) lower-right origin on NSView?]
- Subject: OT: View/subview setup [Was: Re: (got it) lower-right origin on NSView?]
- From: Michael Gersten <email@hidden>
- Date: Sat, 27 Jul 2002 18:57:15 -0700
Is it just me, or is the current view/subview setup less than ideal?
Right now,
A subview knows it's offset in the parent
A view only knows the array of subviews.
The ideal seems to me to be:
A subview knows itself.
A view knows the subviews and offset
At the very least, that would allow a subview to be in the parent view two or more times, at different offsets/locations (just like cells in a matrix); it would make overlaps entirely the function of the containing (parent) view. If the subviews are considered an ordered array (instead of an unordered set), then the ordering would also give a definate answer to the question of how overlapping views are handled.
j o a r wrote:
>
>
If you'd like to keep it tucked in the lower right corner of it's superview that would be:
>
>
[myView setAutoResizingMask: (NSViewMinXMargin | NSViewMaxYMargin)];
>
>
As you might have found out from the docs this has nothing to do with the origin of the coordinate systems for the frame and bounds rectangles of the the views in question.
>
This method set a bitmask in a view that it's superview can access when it (the superview) is resized, to find out how to resize and / or reposition it's contained subviews.
>
The superview needs to have "autoresizesSubviews" enabled (and it is by default) for this functionality to be activated.
>
>
j o a r
>
>
On Thursday, Jul 25, 2002, at 05:40 Europe/Stockholm, Philip George wrote:
>
>
> Not sure what Mask should be set to yet, but that shouldn't take too much effort to figure out.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
--
I am a Mac OS X-Cocoa/WOF/EOF developer, and I'm available for hire. Please contact me at michael-job @ stb.nccom.com if interested. Resume at
http://resumes.dice.com/keybounce
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.