This is TurboTFCell.h in view mode; [Download] [Up]
/* TurboTFCell.h
*
* TurboTFCell is a subclass of TextFieldCell which supports
* a) length-watching on a string -- maxLength [length of 0
* indicates that length-watching is not active]
* b) auto-jumping to nextText if the maximum is reached
* c) acceptsReturn will cause the Return character to be
* interpreted literally rather than as a signal to end editing
*
*
* You may freely copy, distribute, and reuse the code in this example.
* NeXT disclaims any warranty of any kind, expressed or implied, as to its
* fitness for any particular use.
*
* Written by: Sharon Zakhour
* Created: Oct/91
*/
#import <appkit/appkit.h>
@interface TurboTFCell:TextFieldCell
{
NXTextFilterFunc customTextFilter;
int maxLength;
BOOL autoJump;
BOOL acceptsReturn;
char *originalText;
}
char *lengthFilter(id textObj, char *inputText, int *inputLength, int position);
unsigned short autoJumpCharFilter(unsigned short charCode, int flags, unsigned short charSet);
- setMaxLength: (int) length;
- (int) maxLength;
- setAutoJump: (BOOL) flag forLength: (int)length;
- (BOOL) autoJump;
- setAcceptsReturn: (BOOL) flag;
- (BOOL) acceptsReturn;
- setOriginalText: (char *)aString;
- (char *)originalText;
- setCustomFilter: (NXTextFilterFunc)aFilter;
- (NXTextFilterFunc) customTextFilter;
- (BOOL)checkString: (char *)aString;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.