summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/draggable_button.h
blob: 296cc9392ef244f7ced221f3ce403bbad4d9ff83 (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
// Copyright (c) 2011 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.

#ifndef CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_H_
#define CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_H_
#pragma once

#import <Cocoa/Cocoa.h>

#import "base/memory/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/draggable_button_mixin.h"

// Class for buttons that can be drag sources. If the mouse is clicked and moved
// more than a given distance, this class will call |-beginDrag:| instead of
// |-performClick:|. Subclasses should override these two methods.
@interface DraggableButton : NSButton<DraggableButtonMixin> {
 @private
  scoped_nsobject<DraggableButtonImpl> draggableButtonImpl_;
}

@property(readonly, nonatomic) DraggableButtonImpl* draggableButton;

@end

#endif  // CHROME_BROWSER_UI_COCOA_DRAGGABLE_BUTTON_H_