Re: how to know a window finishes resizing
Re: how to know a window finishes resizing
- Subject: Re: how to know a window finishes resizing
- From: Jens Alfke <email@hidden>
- Date: Wed, 7 May 2008 09:10:48 -0700
On 7 May '08, at 6:01 AM, Norio wrote:
Would you tell me how to know a window finishes resizing?
NSView has a bunch of accessors to deal with this, because you
sometimes need to customize the way a view redraws to make it not take
too much time during a live resize. If you need to get this info
somewhere else (like in your controller) you could subclass one of the
views in the window to override the notification methods, and have it
call your controller in response.
—Jens
/* Live resize support */
// a view receives viewWillStartLiveResize before the frame is first
changed for a live resize
- (void)viewWillStartLiveResize;
// a view receives viewWillEndLiveResize after the frame is last
changed for a live resize
- (void)viewDidEndLiveResize;
// inLiveResize can be called from drawRect: to decide between cheap
and full drawing
- (BOOL)inLiveResize;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
/* A view that returns YES for -preservesContentDuringLiveResize is
responsible for invalidating its own dirty rects during live resize */
- (BOOL)preservesContentDuringLiveResize;
/* -rectPreservedDuringLiveResize indicates the rect the view
previously occupied, in the current coordinate system of the view */
- (NSRect)rectPreservedDuringLiveResize;
/* On return from -getRectsExposedDuringLiveResize, exposedRects
indicates the parts of the view that are newly exposed (at most 4
rects). *count indicates how many rects are in the exposedRects list */
- (void)getRectsExposedDuringLiveResize:(NSRect[4])exposedRects count:
(NSInteger *)count;
#endif
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden