home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Examples / AppKit / Draw / TextGraphic.h < prev    next >
Text File  |  1992-07-18  |  2KB  |  80 lines

  1. @interface TextGraphic : Graphic
  2. {
  3.     char *data;            /* the rich text */
  4.     int length;            /* the length of data */
  5.     Font *font;
  6.     View *editView;
  7.     GraphicView *graphicView;
  8.     Text *fe;            /* the field editor text object      */
  9.                     /* used for editing between edit:in: */
  10.                 /* and textDidEnd:endChar:           */
  11.     NXDataLink *link;
  12.     char *name;
  13. }
  14.  
  15. /* Factory methods overridden from superclass */
  16.  
  17. + (BOOL)isEditable;
  18. + cursor;
  19.  
  20. /* Initialization method */
  21.  
  22. + (BOOL)canInitFromPasteboard:(Pasteboard *)pboard;
  23.  
  24. - init;
  25. - initFormEntry:(const char *)name localizable:(BOOL)isLocalizable;
  26.  
  27. - initFromStream:(NXStream *)stream;
  28. - initFromPasteboard:(Pasteboard *)pboard;
  29.  
  30. - (NXRect)reinitFromPasteboard:(Pasteboard *)pboard;
  31. - (NXRect)reinitFromStream:(NXStream *)stream;
  32.  
  33. /* Link methods */
  34.  
  35. - setLink:(NXDataLink *)aLink;
  36. - (NXDataLink *)link;
  37.  
  38. /* Instance methods overridden from superclass */
  39.  
  40. - (const char *)title;
  41. - (BOOL)create:(NXEvent *)event in:(GraphicView *)view;
  42. - (BOOL)edit:(NXEvent *)event in:(View *)view;
  43. - draw;
  44. - performTextMethod:(SEL)aSelector with:(void *)anArgument;
  45. - chRW&Font:sender;
  46. - (Font *)font;
  47. - (BOOL)isOpaque;
  48. - (BOOL)isValid;
  49. - (BOOL)isFormEntry;
  50. - setFormEntry:(int)flag;
  51. - (BOOL)writeFormEntryToStream:(NXStream *)stream;
  52. - (NXColor)lineColor;
  53. - (NXColor)fillColor;
  54. - (NXCoord)baseline;
  55. - moveBaselineTo:(NXCoord *)y;
  56.  
  57. /* Public methods */
  58.  
  59. - prepareFieldEditor;
  60. - resignFieldEditor;
  61. - (BOOL)isEmpty;
  62. - (char *)data;
  63. - setData:(char *)newData;
  64. - (int)length;
  65. - setLength:(int)newLength;
  66. - setFont:newFont;
  67.  
  68. /* Text delegate methods */
  69.  
  70. - textDidResize:textObject oldBounds:(const NXRect *)oldBounds invalid:(NXRect *)invalidRect;
  71. - textDidEnd:textObject endChar:(unsigned short)endChar;
  72.  
  73. /* Archiving methods */
  74.  
  75. - awake;
  76. - read:(NXTypedStream *)stream;
  77. - write:(NXTypedStream *)stream;
  78.  
  79. @end
  80.