Skip to content

Commit

Permalink
Stub out CPView inLiveResize.
Browse files Browse the repository at this point in the history
CPWindow should send `viewWillStartLiveResize` and `viewWillEndLiveResize` to make this work.
  • Loading branch information
aljungberg committed Mar 10, 2012
1 parent a32b5ea commit db6a4d7
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions AppKit/CPView.j
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var CPViewFlags = { },
BOOL _postsFrameChangedNotifications;
BOOL _postsBoundsChangedNotifications;
BOOL _inhibitFrameAndBoundsChangedNotifications;
BOOL _inLiveResize;

#if PLATFORM(DOM)
DOMElement _DOMElement;
Expand Down Expand Up @@ -2128,6 +2129,43 @@ setBoundsOrigin:
{
}

/*!
Return yes if the receiver is in a live-resize operation.
*/
- (BOOL)inLiveResize
{
return _inLiveResize;
}

/*!
Not implemented.
A view will be sent this message before a window begins a resize operation. The
receiver might choose to simplify its drawing operations during a live resize
for speed.
Subclasses should call super.
*/
- (void)viewWillStartLiveResize
{
_inLiveResize = YES;
}

/*!
Not implemented.
A view will be sent this message after a window finishes a resize operation. The
receiver which simplified its drawing operations in viewWillStartLiveResize might
stop doing so now. Note the view might no longer be in a window, so use
[self setNeedsDisplay:YES] if a final non-simplified redraw is required.
Subclasses should call super.
*/
- (void)viewDidEndLiveResize
{
_inLiveResize = NO;
}

@end

@implementation CPView (KeyView)
Expand Down

0 comments on commit db6a4d7

Please sign in to comment.