home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / MiniExamples / FilterFunctions / DateTFCell.h < prev    next >
Text File  |  1991-09-29  |  1KB  |  36 lines

  1.  
  2. /*
  3.  *      You may freely copy, distribute and reuse the code
  4.  *      in this example.  NeXT disclaims any warranty of
  5.  *      any kind, expressed or implied, as to its fitness
  6.  *      for any particular use.
  7.  *
  8.  *      Written by: Susan Rayl
  9.  *
  10.  *      Created 21-Mar-91
  11.  */
  12.  
  13. #import <appkit/TextFieldCell.h>
  14. #import <appkit/Text.h>
  15.  
  16. @interface DateTFCell:TextFieldCell
  17. {
  18.     NXTextFilterFunc oldTextFilter; /* hold original filter func */
  19. }
  20.  
  21. /* override these methods so that when the user TABs into the TextField or 
  22.  * mouseDowns into the TextField, the filter function of the fieldEditor can be 
  23.  * changed.  These are the two ways that a TextField can be enabled for taking 
  24.  * user input so this is the place to control the user input.
  25.  */
  26. - select:(const NXRect *)aRect inView:controlView editor:textObj delegate:anObject start:(int)selStart length:(int)selLength;
  27. - edit:(const NXRect *)aRect inView:controlView editor:textObj delegate:anObject event:(NXEvent *)theEvent;
  28.  
  29. /* override this method to remove the fieldEditor from the View hierarchy */
  30. - endEditing:anObject;
  31.  
  32. /* the filter function for the DateTFCell and DateTextField */
  33. char *dateFilter(id textObj, char *inputText, int *inputLength, int position);
  34.  
  35. @end
  36.