Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OT: View/subview setup [Was: Re: (got it) lower-right origin on NSView?]



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.

References: 
 >Re: (got it) lower-right origin on NSView? (From: j o a r <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.