File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / Draw / TextGraphic.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:35 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

@interface TextGraphic : Graphic
{
    char *data;			/* the rich text */
    int length;			/* the length of data */
    Font *font;
    View *editView;
    GraphicView *graphicView;
    Text *fe;			/* the field editor text object      */
    				/* used for editing between edit:in: */
				/* and textDidEnd:endChar:           */
    NXDataLink *link;
    char *name;
}

/* Factory methods overridden from superclass */

+ (BOOL)isEditable;
+ cursor;

/* Initialization method */

+ (BOOL)canInitFromPasteboard:(Pasteboard *)pboard;

- init;
- finishedWithInit;

- initEmpty;

- initFromStream:(NXStream *)stream;
- initFromPasteboard:(Pasteboard *)pboard;

- (NXRect)reinitFromPasteboard:(Pasteboard *)pboard;
- (NXRect)reinitFromStream:(NXStream *)stream;

- initFormEntry:(const char *)name localizable:(BOOL)isLocalizable;

/* Link methods */

- setLink:(NXDataLink *)aLink;
- (NXDataLink *)link;

/* Instance methods overridden from superclass */

- (const char *)title;
- (BOOL)create:(NXEvent *)event in:(GraphicView *)view;
- (BOOL)edit:(NXEvent *)event in:(View *)view;
- draw;
- performTextMethod:(SEL)aSelector with:(void *)anArgument;
- changeFont:sender;
- (Font *)font;
- (BOOL)isOpaque;
- (BOOL)isValid;
- (BOOL)isFormEntry;
- setFormEntry:(int)flag;
- (BOOL)writeFormEntryToStream:(NXStream *)stream;
- (NXColor)lineColor;
- (NXColor)fillColor;
- (NXCoord)baseline;
- moveBaselineTo:(NXCoord *)y;

/* Public methods */

- prepareFieldEditor;
- resignFieldEditor;
- (BOOL)isEmpty;
- (char *)data;
- setData:(char *)newData;
- (int)length;
- setLength:(int)newLength;
- setFont:newFont;

/* Text delegate methods */

- textDidResize:textObject oldBounds:(const NXRect *)oldBounds invalid:(NXRect *)invalidRect;
- textDidEnd:textObject endChar:(unsigned short)endChar;

/* Archiving methods */

- awake;
- read:(NXTypedStream *)stream;
- write:(NXTypedStream *)stream;

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.