| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2009 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 CHROME_BROWSER_COCOA_CLICKHOLD_BUTTON_CELL_H_ |
| 6 #define CHROME_BROWSER_COCOA_CLICKHOLD_BUTTON_CELL_H_ |
| 7 |
| 8 #import <Cocoa/Cocoa.h> |
| 9 |
| 10 #include "base/scoped_nsobject.h" |
| 11 #import "chrome/browser/cocoa/gradient_button_cell.h" |
| 12 |
| 13 // A button cell that implements "click hold" behavior after a specified |
| 14 // delay. If -setClickHoldTimeout: is never called, this behaves like a normal |
| 15 // button. |
| 16 |
| 17 @interface ClickHoldButtonCell : GradientButtonCell { |
| 18 @private |
| 19 BOOL enableClickHold_; |
| 20 NSTimeInterval clickHoldTimeout_; |
| 21 id clickHoldTarget_; // Weak. |
| 22 SEL clickHoldAction_; |
| 23 BOOL trackOnlyInRect_; |
| 24 BOOL activateOnDrag_; |
| 25 } |
| 26 |
| 27 // Enable click-hold? |
| 28 @property(assign, nonatomic) BOOL enableClickHold; |
| 29 |
| 30 // Timeout is in seconds (at least 0.01, at most 3600). |
| 31 @property(assign, nonatomic) NSTimeInterval clickHoldTimeout; |
| 32 |
| 33 // Track only in the frame rectangle? |
| 34 @property(assign, nonatomic) BOOL trackOnlyInRect; |
| 35 |
| 36 // Activate (click-hold) immediately on drag? |
| 37 @property(assign, nonatomic) BOOL activateOnDrag; |
| 38 |
| 39 // Defines what to do when click-held (as per usual action/target). |
| 40 @property(assign, nonatomic) id clickHoldTarget; |
| 41 @property(assign, nonatomic) SEL clickHoldAction; |
| 42 |
| 43 @end // @interface ClickHoldButtonCell |
| 44 |
| 45 #endif // CHROME_BROWSER_COCOA_CLICKHOLD_BUTTON_CELL_H_ |
| OLD | NEW |