home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / dbkit / DBEditableFormatter.h < prev    next >
Text File  |  1992-07-07  |  2KB  |  86 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.     BOOL        isEditing:1,    /* is column handling a cell edit? */
  25.             isModified:1,    /* is cell known to be modified? */
  26.             useRowPos:1,    /* use row position or identifier */
  27.             useColumnPos:1,    /* ditto for columns */
  28.             delWill1:1,    /* methods delegate responds to */
  29.             delWill2:1,
  30.             delDid:1,
  31.             delWillStatic1:1,
  32.             delWillStatic2:1,
  33.             delDidStatic:1;
  34.  
  35. @protected
  36.     id        font;        /* font with which to draw */
  37.     id        editView;    /* view we're currently editing in */
  38.     id        drawCell;    /* one cell for drawing */
  39. }
  40.  
  41.  
  42. - init;
  43. - free;
  44.  
  45. - font;
  46. - setFont:aFont;
  47.  
  48. - setDelegate:newDelegate;
  49.  
  50. - drawFieldAt:(unsigned int) row :(unsigned int) column
  51.     inside:(NXRect *) frame inView:vie$    cithAttributes:(id <DBTableVectors>) rowAttrs
  52.               :(id <DBTableVectors>) columnAttrs
  53.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos;
  54.  
  55. - (BOOL) editFieldAt:(unsigned int) row :(unsigned int) column
  56.     inside:(NXRect *) frame inView:view
  57.     withAttributes:(id <DBTableVectors>) rowAttributes
  58.               :(id <DBTableVectors>) columnAttributes
  59.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos
  60.     onEvent:(NXEvent *) theEvent;
  61.  
  62. - abortEditing;
  63. - (BOOL) endEditing;
  64.  
  65. - write:(NXTypedStream *) stream;
  66. - read:(NXTypedStream *) stream;
  67.  
  68. @end
  69.  
  70.  
  71. @interface Object(DBFormatterValidation)
  72. - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position sender:sender;
  73. - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  74. - formatterDidChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  75.  
  76. - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier sender:sender;
  77. - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  78. - formatterDidChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  79. @end
  80.  
  81.  
  82. @protocol DBFormatterViewEditing
  83. - (BOOL) formatterDidEndEditing:sender endChar:(unsigned short)whyEnd;
  84. @end
  85.  
  86.