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_IMAGE_BUTTON_CELL_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_ |
6 #define CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_ | 6 #define CHROME_BROWSER_UI_COCOA_IMAGE_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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 - (void)setImageID:(NSInteger)imageID | 57 - (void)setImageID:(NSInteger)imageID |
58 forButtonState:(image_button_cell::ButtonState)state; | 58 forButtonState:(image_button_cell::ButtonState)state; |
59 | 59 |
60 // Sets the image for the given button state using an image. | 60 // Sets the image for the given button state using an image. |
61 - (void)setImage:(NSImage*)image | 61 - (void)setImage:(NSImage*)image |
62 forButtonState:(image_button_cell::ButtonState)state; | 62 forButtonState:(image_button_cell::ButtonState)state; |
63 | 63 |
64 // Gets the alpha to use to draw the button for the current window focus state. | 64 // Gets the alpha to use to draw the button for the current window focus state. |
65 - (CGFloat)imageAlphaForWindowState:(NSWindow*)window; | 65 - (CGFloat)imageAlphaForWindowState:(NSWindow*)window; |
66 | 66 |
| 67 // Draws the cell's image within |cellFrame|. |
| 68 - (void)drawImageWithFrame:(NSRect)cellFrame inView:(NSView*)controlView; |
| 69 |
67 // If |controlView| is a first responder then draws a blue focus ring. | 70 // If |controlView| is a first responder then draws a blue focus ring. |
68 - (void)drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView*)controlView; | 71 - (void)drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView*)controlView; |
69 | 72 |
70 @end | 73 @end |
71 | 74 |
72 #endif // CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_ | 75 #endif // CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_ |
OLD | NEW |