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. 4 5 #ifndef CHROME_BROWSER_UI_COCOA_FAST_RESIZE_VIEW_H_ 6 #define CHROME_BROWSER_UI_COCOA_FAST_RESIZE_VIEW_H_ 7 #pragma once 8 9 #import <Cocoa/Cocoa.h> 10 11 // A Cocoa view that supports an alternate resizing mode, normally used when 12 // animations are in progress. In normal resizing mode, subviews are sized to 13 // completely fill this view's bounds. In fast resizing mode, the subviews' 14 // size is not changed and the subview is clipped to fit, if necessary. Fast 15 // resize mode is useful when animating a view that normally takes a significant 16 // amount of time to relayout and redraw when its size is changed. 17 @interface FastResizeView : NSView { 18 @private 19 BOOL fastResizeMode_; 20 } 21 22 // Turns fast resizing mode on or off, which determines how this view resizes 23 // its subviews. Turning fast resizing mode off has the effect of immediately 24 // resizing subviews to fit; callers do not need to explictly call |setFrame:| 25 // to trigger a resize. 26 - (void)setFastResizeMode:(BOOL)fastResizeMode; 27 @end 28 29 #endif // CHROME_BROWSER_UI_COCOA_FAST_RESIZE_VIEW_H_ 30