home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 (1993) / nebula.bin / SourceCode / TextORama / TurboTFCell.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-19  |  1.4 KB  |  47 lines

  1. /* TurboTFCell.h
  2.  *
  3.  *   TurboTFCell is a subclass of TextFieldCell which supports
  4.  *        a) length-watching on a string -- maxLength  [length of 0
  5.  *            indicates that length-watching is not active]
  6.  *        b) auto-jumping to nextText if the maximum is reached
  7.  *        c) acceptsReturn will cause the Return character to be
  8.  *            interpreted literally rather than as a signal to end editing
  9.  * 
  10.  *
  11.  * You may freely copy, distribute, and reuse the code in this example.
  12.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  13.  * fitness for any particular use.
  14.  *
  15.  * Written by:  Sharon Zakhour 
  16.  * Created:  Oct/91
  17.  */
  18.  
  19. #import <appkit/TextFieldCell.h>
  20. #import <appkit/Text.h>
  21.  
  22. @interface TurboTFCell:TextFieldCell
  23. {
  24.     NXTextFilterFunc customTextFilter;
  25.     int        maxLength;
  26.     BOOL    autoJump;
  27.     BOOL    acceptsReturn;
  28.     char     *originalText;
  29. }
  30.  
  31. char *lengthFilter(id textObj, char *inputText, int *inputLength, int position);
  32. unsigned short autoJumpCharFilter(unsigned short charCode, int flags, unsigned short charSet);
  33.  
  34. - setMaxLength: (int) length;
  35. - (int) maxLength;
  36. - setAutoJump: (BOOL) flag forLength: (int)length;
  37. - (BOOL) autoJump;
  38. - setAcceptsReturn: (BOOL) flag;
  39. - (BOOL) acceptsReturn;
  40. - setOriginalText: (char *)aString;
  41. - (char *)originalText;
  42. - setCustomFilter: (NXTextFilterFunc)aFilter;
  43. - (NXTextFilterFunc) customTextFilter;
  44. - (BOOL)checkString: (char *)aString;
  45.  
  46. @end
  47.