1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_FAST_RESIZE_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_FAST_RESIZE_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 // A Cocoa view that supports an alternate resizing mode, normally used when
11 // animations are in progress. In normal resizing mode, subviews are sized to
12 // completely fill this view's bounds. In fast resizing mode, the subviews'
13 // size is not changed and the subview is clipped to fit, if necessary. Fast
14 // resize mode is useful when animating a view that normally takes a significant
15 // amount of time to relayout and redraw when its size is changed.
16 @interface FastResizeView
: NSView
{
21 // Turns fast resizing mode on or off, which determines how this view resizes
22 // its subviews. Turning fast resizing mode off has the effect of immediately
23 // resizing subviews to fit; callers do not need to explictly call |setFrame:|
24 // to trigger a resize.
25 - (void)setFastResizeMode
:(BOOL
)fastResizeMode
;
29 #endif // CHROME_BROWSER_UI_COCOA_FAST_RESIZE_VIEW_H_