OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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 UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_ | |
6 #define UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_ | |
7 | |
8 #import <Cocoa/Cocoa.h> | |
9 | |
10 #include "base/memory/scoped_nsobject.h" | |
11 | |
12 // A custom NSPopUpButtonCell that permits a hover image, and draws only an | |
13 // image in its frame; no border, bezel or drop-down arrow. Use setImage to set | |
14 // the default image, setAlternateImage to set the button shown while the menu | |
15 // is active, and setHoverImage for the mouseover hover image. | |
16 @interface HoverImageMenuButtonCell : NSPopUpButtonCell { | |
17 @private | |
18 scoped_nsobject<NSImage> hoverImage_; | |
19 BOOL hovered_; | |
20 } | |
21 | |
22 @property(assign, nonatomic, getter=isHovered) BOOL hovered; | |
23 | |
24 - (void)setHoverImage:(NSImage*)newImage; | |
sail
2013/05/31 19:07:03
use @property to declare this?
tapted
2013/06/03 12:49:18
Done.
| |
25 - (NSImage*)hoverImage; | |
26 | |
27 // Return the image that would be drawn based on the current state flags. | |
28 - (NSImage*)imageToDraw; | |
29 | |
30 @end | |
31 | |
32 #endif // UI_BASE_COCOA_CONTROLS_HOVER_IMAGE_MENU_BUTTON_CELL_H_ | |
OLD | NEW |