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_CLICKHOLD_BUTTON_CELL_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CLICKHOLD_BUTTON_CELL_H_ |
6 #define CHROME_BROWSER_UI_COCOA_CLICKHOLD_BUTTON_CELL_H_ | 6 #define CHROME_BROWSER_UI_COCOA_CLICKHOLD_BUTTON_CELL_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #import "chrome/browser/ui/cocoa/image_button_cell.h" | 11 #import "chrome/browser/ui/cocoa/image_button_cell.h" |
12 | 12 |
13 // A button cell that implements "click hold" behavior after a specified delay | 13 // A button cell that implements "click hold" behavior after a specified delay |
14 // or after dragging. If click-hold is never enabled (e.g., if | 14 // or after dragging. If click-hold is never enabled (e.g., if |
15 // |-setEnableClickHold:| is never called), this behaves like a normal button. | 15 // |-setEnableClickHold:| is never called), this behaves like a normal button. |
16 @interface ClickHoldButtonCell : ImageButtonCell { | 16 @interface ClickHoldButtonCell : ImageButtonCell { |
17 @private | 17 @private |
18 BOOL enableClickHold_; | 18 BOOL enableClickHold_; |
19 NSTimeInterval clickHoldTimeout_; | 19 NSTimeInterval clickHoldTimeout_; |
20 id clickHoldTarget_; // Weak. | 20 id clickHoldTarget_; // Weak. |
(...skipping 17 matching lines...) Expand all Loading... |
38 // always wait for timeout)? Default: YES. | 38 // always wait for timeout)? Default: YES. |
39 @property(assign, nonatomic) BOOL activateOnDrag; | 39 @property(assign, nonatomic) BOOL activateOnDrag; |
40 | 40 |
41 // Defines what to do when click-held (as per usual action/target). | 41 // Defines what to do when click-held (as per usual action/target). |
42 @property(assign, nonatomic) id clickHoldTarget; | 42 @property(assign, nonatomic) id clickHoldTarget; |
43 @property(assign, nonatomic) SEL clickHoldAction; | 43 @property(assign, nonatomic) SEL clickHoldAction; |
44 | 44 |
45 @end // @interface ClickHoldButtonCell | 45 @end // @interface ClickHoldButtonCell |
46 | 46 |
47 #endif // CHROME_BROWSER_UI_COCOA_CLICKHOLD_BUTTON_CELL_H_ | 47 #endif // CHROME_BROWSER_UI_COCOA_CLICKHOLD_BUTTON_CELL_H_ |
OLD | NEW |