home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 (1993) / nebula.bin / SourceCode / MiniExamples / FilterFunctions / FilterTextCell.h < prev    next >
Encoding:
Text File  |  1991-09-29  |  978 b   |  33 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 FilterTextCell:TextFieldCell
  17. {
  18.     NXTextFilterFunc oldTextFilter; /* hold the original filter func */
  19.     NXTextFilterFunc newTextFilter; /* hold the current filter func */
  20. }
  21.  
  22. /* set the instance variables */
  23. - init;
  24.  
  25. /* override to get the original filter function and reset with the new */
  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. /* after the user has entered a value, reset the filter func to the original */
  30. - endEditing:anObject;
  31.  
  32. @end
  33.