summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/hover_image_button.h
blob: 76a702d018fa19fd517f96478c38e337db22773c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import <Cocoa/Cocoa.h>

#include "base/scoped_nsobject.h"
#include "chrome/browser/ui/cocoa/hover_button.h"

// A button that changes images when you hover over it and click it.
@interface HoverImageButton : HoverButton {
 @private
  float defaultOpacity_;
  float hoverOpacity_;
  float pressedOpacity_;

  scoped_nsobject<NSImage> defaultImage_;
  scoped_nsobject<NSImage> hoverImage_;
  scoped_nsobject<NSImage> pressedImage_;
}

// Sets the default image.
- (void)setDefaultImage:(NSImage*)image;

// Sets the hover image.
- (void)setHoverImage:(NSImage*)image;

// Sets the pressed image.
- (void)setPressedImage:(NSImage*)image;

// Sets the default opacity.
- (void)setDefaultOpacity:(float)opacity;

// Sets the opacity on hover.
- (void)setHoverOpacity:(float)opacity;

// Sets the opacity when pressed.
- (void)setPressedOpacity:(float)opacity;

@end