Re: Unclear on NSView's isOpaque concept (and optimization in general)
Re: Unclear on NSView's isOpaque concept (and optimization in general)
- Subject: Re: Unclear on NSView's isOpaque concept (and optimization in general)
- From: lbland <email@hidden>
- Date: Thu, 6 Nov 2003 08:51:15 -0500
On Thursday, November 6, 2003, at 08:05 AM, Clark Cox wrote:
The order in which sibling views are drawn is completely undefined.
You have no way of knowing which of two overlapping views will be drawn
first, and which will be drawn second.
you may be interested in these methods:
NSWindow:
- (void) useOptimizedDrawing: (BOOL) flag
Informs the receiver whether to optimize focusing and drawing when
displaying its NSViews. The optimizations may prevent sibling subviews
from being displayed in the correct order-which matters only if the
subviews overlap. You should always set flag to YES if there are no
overlapping subviews within the NSWindow. The default is NO .
NSView:
addSubview:positioned:relativeTo:
- (void) addSubview: (NSView *) aView positioned:
(NSWindowOrderingMode) place relativeTo: (NSView *) otherView
Inserts aView among the receiver's subviews so it's displayed
immediately above or below otherView according to whether place is
NSWindowAbove or NSWindowBelow . If otherView is nil (or isn't a
subview of the receiver), aView is added above or below all of its new
siblings. Also sets the receiver as aView 's next responder.
... now, admittedly, there are some bugs in the AppKit that make this
functionality somewhat obtuse.
Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
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.