|
|
1.1 root 1: /*
2: CommandScroll.m
3: by Joe Freeman
4: Subprocess Example, Release 2.0
5: NeXT Computer, Inc.
6:
7: You may freely copy, distribute and reuse the code in this example.
8: NeXT disclaims any warranty of any kind, expressed or implied, as to
9: its fitness for any particular use.
10: */
11:
12: #import <appkit/ScrollView.h>
13:
14: /*
15: * This object sends its delegate the "userEntered:" message
16: * whenever new text is entered in the text object inside this ScrollView
17: *
18: */
19:
20: @interface CommandScroll:ScrollView
21: {
22: id docView;
23: id delegate;
24: int lastTextCount;
25: // size of the text object the last time this program played with it
26: id machineFont, userFont;
27: // so the user can distinguish what they typed from system output
28: }
29:
30: - appendString:(char *)buffer;
31: // append the buffer to the end of the text object
32:
33: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.