| 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_GRADIENT_BUTTON_CELL_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_GRADIENT_BUTTON_CELL_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_GRADIENT_BUTTON_CELL_H_ | 6 #define CHROME_BROWSER_UI_COCOA_GRADIENT_BUTTON_CELL_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Actually fetches current mouse position and does a hit test. | 107 // Actually fetches current mouse position and does a hit test. |
| 108 - (BOOL)isMouseReallyInside; | 108 - (BOOL)isMouseReallyInside; |
| 109 | 109 |
| 110 // Returns the offset of the start of the text in the cell. | 110 // Returns the offset of the start of the text in the cell. |
| 111 - (CGFloat)textStartXOffset; | 111 - (CGFloat)textStartXOffset; |
| 112 | 112 |
| 113 // Defines the top offset of text within the cell. Used by drawTitle and can | 113 // Defines the top offset of text within the cell. Used by drawTitle and can |
| 114 // be overriden by objects that inherit this class for placement of text. | 114 // be overriden by objects that inherit this class for placement of text. |
| 115 - (int)verticalTextOffset; | 115 - (int)verticalTextOffset; |
| 116 | 116 |
| 117 // The amount by which the gradient button cell should nudge the path used to |
| 118 // draw the hover (and pressed) state background path. |
| 119 - (CGFloat)hoverBackgroundVerticalOffsetInControlView:(NSView*)controlView; |
| 120 |
| 117 @property(assign, nonatomic) CGFloat hoverAlpha; | 121 @property(assign, nonatomic) CGFloat hoverAlpha; |
| 118 | 122 |
| 119 // An image that will be drawn after the normal content of the button cell, | 123 // An image that will be drawn after the normal content of the button cell, |
| 120 // overlaying it. Never themed. | 124 // overlaying it. Never themed. |
| 121 @property(retain, nonatomic) NSImage* overlayImage; | 125 @property(retain, nonatomic) NSImage* overlayImage; |
| 122 | 126 |
| 123 @end | 127 @end |
| 124 | 128 |
| 125 @interface GradientButtonCell(TestingAPI) | 129 @interface GradientButtonCell(TestingAPI) |
| 126 - (BOOL)isMouseInside; | 130 - (BOOL)isMouseInside; |
| 127 - (BOOL)pulsing; | 131 - (BOOL)pulsing; |
| 128 - (gradient_button_cell::PulseState)pulseState; | 132 - (gradient_button_cell::PulseState)pulseState; |
| 129 - (void)setPulseState:(gradient_button_cell::PulseState)pstate; | 133 - (void)setPulseState:(gradient_button_cell::PulseState)pstate; |
| 130 @end | 134 @end |
| 131 | 135 |
| 132 #endif // CHROME_BROWSER_UI_COCOA_GRADIENT_BUTTON_CELL_H_ | 136 #endif // CHROME_BROWSER_UI_COCOA_GRADIENT_BUTTON_CELL_H_ |
| OLD | NEW |