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 // Initialize the NSTextView properties for this subclass. |
| 12 - (void)configureTextView; |
| 13 |
| 14 // Change the current IBeamCursor to an arrowCursor. |
| 15 - (void)fixupCursor; |
| 16 |
| 17 // Convenience function that sets the |HyperlinkTextView| contents to the |
| 18 // specified |message| with a hypertext style |link| inserted at |linkOffset|. |
| 19 // Uses the supplied |font|, |messageColor|, and |linkColor|. |
| 20 - (void)setMessageAndLink:(NSString*)message |
| 21 withLink:(NSString*)link |
| 22 atOffset:(NSUInteger)linkOffset |
| 23 font:(NSFont*)font |
| 24 messageColor:(NSColor*)messageColor |
| 25 linkColor:(NSColor*)linkColor; |
| 26 @end |
OLD | NEW |