home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextDeveloper / Examples / AppKit / Draw / TextGraphic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-05  |  1.8 KB  |  84 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. - finishedWithInit;
  26.  
  27. - initEmpty;
  28.  
  29. - initFromStream:(NXStream *)stream;
  30. - initFromPasteboard:(Pasteboard *)pboard;
  31.  
  32. - (NXRect)reinitFromPasteboard:(Pasteboard *)pboard;
  33. - (NXRect)reinitFromStream:(NXStream *)stream;
  34.  
  35. - initFormEntry:(const char *)name localizable:(BOOL)isLocalizable;
  36.  
  37. /* Link methods */
  38.  
  39. - setLink:(NXDataLink *)aLink;
  40. - (NXDataLink *)link;
  41.  
  42. /* Instance methods overridden from superclass */
  43.  
  44. - (const char *)title;
  45. - (BOOL)create:(NXEvent *)event in:(GraphicView *)view;
  46. - (BOOL)edit:(NXEvent *)event in:(View *)view;
  47. - draw;
  48. - performTextMethod:(SEL)aSelector with:(void *)anArgument;
  49. - changeFont:sender;
  50. - (Font *)font;
  51. - (BOOL)isOpaque;
  52. - (BOOL)isValid;
  53. - (BOOL)isFormEntry;
  54. - setFormEntry:(int)flag;
  55. - (BOOL)writeFormEntryToStream:(NXStream *)stream;
  56. - (NXColor)lineColor;
  57. - (NXColor)fillColor;
  58. - (NXCoord)baseline;
  59. - moveBaselineTo:(NXCoord *)y;
  60.  
  61. /* Public methods */
  62.  
  63. - prepareFieldEditor;
  64. - resignFieldEditor;
  65. - (BOOL)isEmpty;
  66. - (char *)data;
  67. - setData:(char *)newData;
  68. - (int)length;
  69. - setLength:(int)newLength;
  70. - setFont:newFont;
  71.  
  72. /* Text delegate methods */
  73.  
  74. - textDidResize:textObject oldBounds:(const NXRect *)oldBounds invalid:(NXRect *)invalidRect;
  75. - textDidEnd:textObject endChar:(unsigned short)endChar;
  76.  
  77. /* Archiving methods */
  78.  
  79. - awake;
  80. - read:(NXTypedStream *)stream;
  81. - write:(NXTypedStream *)stream;
  82.  
  83. @end
  84.