Revision 2, 1.1 KB
(checked in by jon, 16 years ago)
|
Initial commit of skeletal project.
|
Line | |
---|
1 | // |
---|
2 | // AITextViewWithPlaceholder.h |
---|
3 | // Adium |
---|
4 | // |
---|
5 | // Created by Evan Schoenberg on Fri Dec 26 2003. |
---|
6 | // Copyright (c) 2003-2005 The Adium Team. All rights reserved. |
---|
7 | // |
---|
8 | |
---|
9 | /*! |
---|
10 | * @class AITextViewWithPlaceholder |
---|
11 | * @brief TextView with placeholder support in 10.2 and above |
---|
12 | * |
---|
13 | * <tt>NSTextView</tt> sublcass which supports placeholders, text which is displayed but greyed out when the text view is empty and unselected, even on 10.2; this is a feature which was added in 10.3. |
---|
14 | */ |
---|
15 | |
---|
16 | @interface AITextViewWithPlaceholder : NSTextView { |
---|
17 | NSAttributedString *placeholder; |
---|
18 | BOOL placeholderHasOwnAttributes; |
---|
19 | } |
---|
20 | |
---|
21 | /* |
---|
22 | * @brief Set the placeholder string |
---|
23 | * |
---|
24 | * Set the placeholder string, which is text which is displayed but greyed out when the text view is empty and unselected. |
---|
25 | * @param inPlaceholder An <tt>NSString</tt> to display as the placeholder |
---|
26 | */ |
---|
27 | -(void)setPlaceholderString:(NSString *)inPlaceholder; |
---|
28 | |
---|
29 | - (void)setPlaceholder:(NSAttributedString *)inPlaceholder; |
---|
30 | |
---|
31 | /* |
---|
32 | * @brief Returns the current placeholder string |
---|
33 | * |
---|
34 | * Returns the current placeholder string |
---|
35 | * @return An <tt>NSAttributedString</tt> |
---|
36 | */ |
---|
37 | -(NSAttributedString *)placeholder; |
---|
38 | |
---|
39 | @end |
---|