PageRenderTime 17ms CodeModel.GetById 10ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/core/externals/google-toolbox-for-mac/AppKit/GTMFadeTruncatingTextFieldCell.h

http://macfuse.googlecode.com/
C++ Header | 46 lines | 16 code | 9 blank | 21 comment | 0 complexity | 7ae3ed97d61c651147f00c884c76370a MD5 | raw file
 1//
 2//  GTMFadeTruncatingTextFieldCell.h
 3//
 4//  Copyright 2009 Google Inc.
 5//
 6//  Licensed under the Apache License, Version 2.0 (the "License"); you may not
 7//  use this file except in compliance with the License.  You may obtain a copy
 8//  of the License at
 9// 
10//  http://www.apache.org/licenses/LICENSE-2.0
11// 
12//  Unless required by applicable law or agreed to in writing, software
13//  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14//  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
15//  License for the specific language governing permissions and limitations under
16//  the License.
17//
18
19#import <Cocoa/Cocoa.h>
20
21
22#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
23
24typedef enum {
25  GTMFadeTruncatingTail,
26  GTMFadeTruncatingHead,
27  GTMFadeTruncatingHeadAndTail,
28} GTMFadeTruncateMode;
29
30// A simple text field cell that can truncate at the beginning or the end
31// using a gradient. By default it truncates the end.
32@interface GTMFadeTruncatingTextFieldCell : NSTextFieldCell {
33 @private
34  NSUInteger desiredCharactersToTruncateFromHead_;
35  GTMFadeTruncateMode truncateMode_;
36}
37
38@property (nonatomic) GTMFadeTruncateMode truncateMode;
39
40// When truncating the head this specifies the maximum number of characters
41// that can be truncated. Setting this to 0 means that there is no maximum.
42@property (nonatomic) NSUInteger desiredCharactersToTruncateFromHead;
43
44@end
45
46#endif