aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMFadeTruncatingTextFieldCell.h
diff options
context:
space:
mode:
Diffstat (limited to 'AppKit/GTMFadeTruncatingTextFieldCell.h')
-rw-r--r--AppKit/GTMFadeTruncatingTextFieldCell.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/AppKit/GTMFadeTruncatingTextFieldCell.h b/AppKit/GTMFadeTruncatingTextFieldCell.h
index 76e7b1c..267d4b8 100644
--- a/AppKit/GTMFadeTruncatingTextFieldCell.h
+++ b/AppKit/GTMFadeTruncatingTextFieldCell.h
@@ -21,8 +21,26 @@
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
-// A simple text field cell that truncates the right hand edge using a gradient
-@interface GTMFadeTruncatingTextFieldCell : NSTextFieldCell
+typedef enum {
+ GTMFadeTruncatingTail,
+ GTMFadeTruncatingHead,
+ GTMFadeTruncatingHeadAndTail,
+} GTMFadeTruncateMode;
+
+// A simple text field cell that can truncate at the beginning or the end
+// using a gradient. By default it truncates the end.
+@interface GTMFadeTruncatingTextFieldCell : NSTextFieldCell {
+ @private
+ NSUInteger desiredCharactersToTruncateFromHead_;
+ GTMFadeTruncateMode truncateMode_;
+}
+
+@property (nonatomic) GTMFadeTruncateMode truncateMode;
+
+// When truncating the head this specifies the maximum number of characters
+// that can be truncated. Setting this to 0 means that there is no maximum.
+@property (nonatomic) NSUInteger desiredCharactersToTruncateFromHead;
+
@end
#endif