OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_ |
| 6 #define UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_ |
| 7 |
| 8 #import <AppKit/AppKit.h> |
| 9 |
| 10 #import "ui/base/cocoa/base_view.h" |
| 11 |
| 12 // An NSiew that allows tooltip text to be set at the current mouse location. It |
| 13 // can take effect immediately, but won't appear unless the tooltip delay has |
| 14 // elapsed. |
| 15 UI_BASE_EXPORT |
| 16 @interface ToolTipBaseView : BaseView { |
| 17 @private |
| 18 // These are part of the magic tooltip code from WebKit's WebHTMLView: |
| 19 id trackingRectOwner_; // (not retained) |
| 20 void* trackingRectUserData_; |
| 21 NSTrackingRectTag lastToolTipTag_; |
| 22 base::scoped_nsobject<NSString> toolTip_; |
| 23 } |
| 24 |
| 25 // Set the current tooltip. It is the responsibility of the caller to set a nil |
| 26 // tooltip when the mouse cursor leaves the appropriate region. |
| 27 - (void)setToolTipAtMousePoint:(NSString*)string; |
| 28 |
| 29 @end |
| 30 |
| 31 #endif // UI_BASE_COCOA_TOOL_TIP_BASE_VIEW_H_ |
OLD | NEW |