OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import <Cocoa/Cocoa.h> |
| 6 |
| 7 // HyperlinkTextView is an NSTextView subclass for unselectable, linkable text. |
| 8 // This subclass doesn't show the text caret or IBeamCursor, whereas the base |
| 9 // class NSTextView displays both with full keyboard accessibility enabled. |
| 10 @interface HyperlinkTextView : NSTextView |
| 11 // Convenience function that sets the |HyperlinkTextView| contents to the |
| 12 // specified |message| with a hypertext style |link| inserted at |linkOffset|. |
| 13 // Uses the supplied |font|, |messageColor|, and |linkColor|. |
| 14 - (void)setMessageAndLink:(NSString*)message |
| 15 withLink:(NSString*)link |
| 16 atOffset:(NSUInteger)linkOffset |
| 17 font:(NSFont*)font |
| 18 messageColor:(NSColor*)messageColor |
| 19 linkColor:(NSColor*)linkColor; |
| 20 @end |
OLD | NEW |