hover_image_button.h revision 21d179b334e59e9a3bfcaed4c4430bef1bc5759d
1// Copyright (c) 2010 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#import <Cocoa/Cocoa.h>
6
7#include "base/scoped_nsobject.h"
8#include "chrome/browser/ui/cocoa/hover_button.h"
9
10// A button that changes images when you hover over it and click it.
11@interface HoverImageButton : HoverButton {
12 @private
13  float defaultOpacity_;
14  float hoverOpacity_;
15  float pressedOpacity_;
16
17  scoped_nsobject<NSImage> defaultImage_;
18  scoped_nsobject<NSImage> hoverImage_;
19  scoped_nsobject<NSImage> pressedImage_;
20}
21
22// Sets the default image.
23- (void)setDefaultImage:(NSImage*)image;
24
25// Sets the hover image.
26- (void)setHoverImage:(NSImage*)image;
27
28// Sets the pressed image.
29- (void)setPressedImage:(NSImage*)image;
30
31// Sets the default opacity.
32- (void)setDefaultOpacity:(float)opacity;
33
34// Sets the opacity on hover.
35- (void)setHoverOpacity:(float)opacity;
36
37// Sets the opacity when pressed.
38- (void)setPressedOpacity:(float)opacity;
39
40@end
41