OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 11 |
10 // A custom view that draws a 'standard' background gradient. | 12 // A custom view that draws a 'standard' background gradient. |
11 // Base class for other Chromium views. | 13 // Base class for other Chromium views. |
12 @interface BackgroundGradientView : NSView { | 14 @interface BackgroundGradientView : NSView<ThemedWindowDrawing> { |
13 @private | 15 @private |
14 BOOL showsDivider_; | 16 BOOL showsDivider_; |
15 } | 17 } |
16 | 18 |
17 // Controls whether the bar draws a dividing line at the bottom. | 19 // Controls whether the bar draws a dividing line at the bottom. |
18 @property(nonatomic, assign) BOOL showsDivider; | 20 @property(nonatomic, assign) BOOL showsDivider; |
19 | 21 |
20 // The color used for the bottom stroke. Public so subclasses can use. | 22 // The color used for the bottom stroke. Public so subclasses can use. |
21 - (NSColor*)strokeColor; | 23 - (NSColor*)strokeColor; |
22 | 24 |
23 // Draws the background for this view. Make sure that your patternphase | 25 // Draws the background for this view. Make sure that your patternphase |
24 // is set up correctly in your graphics context before calling. | 26 // is set up correctly in your graphics context before calling. |
25 // If |opaque| is true then the background image is forced to be opaque. | 27 // If |opaque| is true then the background image is forced to be opaque. |
26 // Otherwise the background image could be semi-transparent and blend against | 28 // Otherwise the background image could be semi-transparent and blend against |
27 // subviews and sublayers. This is different from -[NSView isOpaque] since | 29 // subviews and sublayers. This is different from -[NSView isOpaque] since |
28 // a view may want a opaque non-rectangular background. The find bar is an | 30 // a view may want a opaque non-rectangular background. The find bar is an |
29 // example of this. | 31 // example of this. |
30 - (void)drawBackgroundWithOpaque:(BOOL)opaque; | 32 - (void)drawBackgroundWithOpaque:(BOOL)opaque; |
31 | 33 |
32 @end | 34 @end |
33 | 35 |
34 #endif // CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ | 36 #endif // CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ |
OLD | NEW |