home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / dbkit / DBEditableFormatter.h < prev    next >
Text File  |  1992-09-08  |  2KB  |  88 lines

  1. /*
  2. **      DBEditableFormatter.h
  3. **      Database Kit, Release 3.0
  4. **      Copyright (c) 1992, NeXT Computer, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <objc/Object.h>
  8. #import <appkit/appkit.h>        /* for NXCoord, NXSize */
  9.  
  10. #import <dbkit/DBFormatter.h>
  11. #import <dbkit/tableProtocols.h>
  12.  
  13.  
  14. @interface DBEditableFormatter : DBFormatter
  15. {
  16. @private
  17.     unsigned int    _efReserved[2];
  18.  
  19.     id        rowAttrs;
  20.     id        columnAttrs;
  21.     int        editRow;
  22.     int        editColumn;
  23.  
  24.     /* NB: we don't have to swap these because they're not archived... */
  25.     BOOL        isEditing:1,    /* is column handling a cell edit? */
  26.             isModified:1,    /* is cell known to be modified? */
  27.             useRowPos:1,    /* use row position or identifier */
  28.             useColumnPos:1,    /* ditto for columns */
  29.             delWill1:1,    /* methods delegate responds to */
  30.             delWill2:1,
  31.             delDid:1,
  32.             delWillStatic1:1,
  33.             delWillStatic2:1,
  34.             delDidStatic:1;
  35.  
  36. @protected
  37.     id        font;        /* font with which to draw */
  38.     id        editView;    /* view we're currently editing in */
  39.     id        drawCell;    /* one cell for drawing */
  40. }
  41.  
  42.  
  43. - init;
  44. - free;
  45.  
  46. - font;
  47. - setFont:aFont;
  48.  
  49. - setDelegate:newDelegate;
  50.  
  51. - drawFieldAt:(unsigned int) row :(unsigned int) column
  52.     inside:(NXRect *) frame inView:view
  53.     withAttributes:(id <DBTableVectors>) rowAttrs
  54.               :(id <DBTableVectors>) columnAttrs
  55.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos;
  56.  
  57. - (BOOL) editFieldAt:(unsigned int) row :(unsigned int) column
  58.     inside:(NXRect *) frame inView:view
  59.     withAttributes:(id <DBTableVectors>) rowAttributes
  60.               :(id <DBTableVectors>) columnAttributes
  61.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos
  62.     onEvent:(NXEvent *) theEvent;
  63.  
  64. - abortEditing;
  65. - (BOOL) endEditing;
  66.  
  67. - write:(NXTypedStream *) stream;
  68. - read:(NXTypedStream *) stream;
  69.  
  70. @end
  71.  
  72.  
  73. @interface Object(DBFormatterValidation)
  74. - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position sender:sender;
  75. - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  76. - formatterDidChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  77.  
  78. - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier sender:sender;
  79. - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  80. - formatterDidChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  81. @end
  82.  
  83.  
  84. @protocol DBFormatterViewEditing
  85. - (BOOL) formatterDidEndEditing:sender endChar:(unsigned short)whyEnd;
  86. @end
  87.  
  88.