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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "ui/base/ui_base_export.h" | 7 #include "ui/base/ui_base_export.h" |
8 | 8 |
9 @class NSColor; | 9 @class NSColor; |
10 | 10 |
11 // HyperlinkTextView is an NSTextView subclass for unselectable, linkable text. | 11 // HyperlinkTextView is an NSTextView subclass for unselectable, linkable text. |
12 // This subclass doesn't show the text caret or IBeamCursor, whereas the base | 12 // This subclass doesn't show the text caret or IBeamCursor, whereas the base |
13 // class NSTextView displays both with full keyboard accessibility enabled. | 13 // class NSTextView displays both with full keyboard accessibility enabled. |
14 UI_BASE_EXPORT | 14 UI_BASE_EXPORT |
15 @interface HyperlinkTextView : NSTextView { | 15 @interface HyperlinkTextView : NSTextView { |
16 @private | 16 @private |
17 BOOL refusesFirstResponder_; | 17 BOOL refusesFirstResponder_; |
18 BOOL drawsBackgroundUsingSuperview_; | 18 BOOL drawsBackgroundUsingSuperview_; |
19 } | 19 } |
20 | 20 |
21 @property(nonatomic, assign) BOOL drawsBackgroundUsingSuperview; | 21 @property(nonatomic, assign) BOOL drawsBackgroundUsingSuperview; |
22 | 22 |
23 // Set the |message| displayed by the HyperlinkTextView, using |font| and | 23 // Set the |message| displayed by the HyperlinkTextView, using |font| and |
24 // |messageColor|. | 24 // |messageColor|. |
25 - (void)setMessage:(NSString*)message | 25 - (void)setMessage:(NSString*)message |
26 withFont:(NSFont*)font | 26 withFont:(NSFont*)font |
27 messageColor:(NSColor*)messageColor; | 27 messageColor:(NSColor*)messageColor; |
28 | 28 |
29 // Marks a |range| within the given message as link, associating it with | 29 // Marks a |range| within the given message as link. |
30 // a |name| that is passed to the delegate's textView:clickedOnLink:atIndex:. | |
31 - (void)addLinkRange:(NSRange)range | 30 - (void)addLinkRange:(NSRange)range |
32 withName:(id)name | 31 withURL:(NSString*)url |
noyau (Ping after 24h)
2015/09/24 07:54:05
Driving by: Is there a reason why this is a string
Avi (use Gerrit)
2015/09/24 14:24:57
This is a core Cocoa UI class, and everything else
| |
33 linkColor:(NSColor*)linkColor; | 32 linkColor:(NSColor*)linkColor; |
34 | 33 |
35 // This is NO (by default) if the view rejects first responder status. | 34 // This is NO (by default) if the view rejects first responder status. |
36 - (void)setRefusesFirstResponder:(BOOL)refusesFirstResponder; | 35 - (void)setRefusesFirstResponder:(BOOL)refusesFirstResponder; |
37 | 36 |
38 @end | 37 @end |
OLD | NEW |