OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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_COCOA_CHROMIUM_BUTTON_CELL_H_ | 5 #ifndef CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ |
6 #define CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ | 6 #define CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/scoped_nsobject.h" | 10 #include "base/scoped_nsobject.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 }; | 27 }; |
28 typedef NSInteger ButtonType; | 28 typedef NSInteger ButtonType; |
29 | 29 |
30 @interface GradientButtonCell : NSButtonCell { | 30 @interface GradientButtonCell : NSButtonCell { |
31 @private | 31 @private |
32 // Custom drawing means we need to perform our own mouse tracking if | 32 // Custom drawing means we need to perform our own mouse tracking if |
33 // the cell is setShowsBorderOnlyWhileMouseInside:YES. | 33 // the cell is setShowsBorderOnlyWhileMouseInside:YES. |
34 BOOL isMouseInside_; | 34 BOOL isMouseInside_; |
35 scoped_nsobject<NSTrackingArea> trackingArea_; | 35 scoped_nsobject<NSTrackingArea> trackingArea_; |
36 BOOL shouldTheme_; | 36 BOOL shouldTheme_; |
37 | 37 scoped_nsobject<NSGradient> gradient_; |
38 scoped_nsobject<NSImage> underlayImage_; | 38 scoped_nsobject<NSImage> underlayImage_; |
39 } | 39 } |
40 | 40 |
41 // Turn off theming. Temporary work-around. | 41 // Turn off theming. Temporary work-around. |
42 - (void)setShouldTheme:(BOOL)shouldTheme; | 42 - (void)setShouldTheme:(BOOL)shouldTheme; |
43 | 43 |
44 - (void)drawBorderAndFillForTheme:(GTMTheme*)theme | 44 - (void)drawBorderAndFillForTheme:(GTMTheme*)theme |
45 controlView:(NSView*)controlView | 45 controlView:(NSView*)controlView |
46 outerPath:(NSBezierPath*)outerPath | 46 outerPath:(NSBezierPath*)outerPath |
47 innerPath:(NSBezierPath*)innerPath | 47 innerPath:(NSBezierPath*)innerPath |
48 showHighlightGradient:(BOOL)showHighlightGradient | 48 showHighlightGradient:(BOOL)showHighlightGradient |
49 showClickedGradient:(BOOL)showClickedGradient | 49 showClickedGradient:(BOOL)showClickedGradient |
50 active:(BOOL)active | 50 active:(BOOL)active |
51 cellFrame:(NSRect)cellFrame; | 51 cellFrame:(NSRect)cellFrame; |
52 | 52 |
53 // An image to underlay beneath the existing image; not themed. May be nil. | 53 // An image to underlay beneath the existing image; not themed. May be nil. |
54 - (NSImage*)underlayImage; | 54 - (NSImage*)underlayImage; |
55 - (void)setUnderlayImage:(NSImage*)image; | 55 - (void)setUnderlayImage:(NSImage*)image; |
56 | 56 |
57 @end | 57 @end |
58 | 58 |
59 @interface GradientButtonCell(TestingAPI) | 59 @interface GradientButtonCell(TestingAPI) |
60 - (BOOL)isMouseInside; | 60 - (BOOL)isMouseInside; |
61 @end | 61 @end |
62 | 62 |
63 #endif // CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ | 63 #endif // CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ |
OLD | NEW |