|
|
1.1 root 1: {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f3\fnil Times-Roman;\f2\fmodern Ohlfs;}
2: \paperw11780
3: \paperh9540
4: \margl320
5: \margr120
6: {\colortbl;\red0\green0\blue0;}
7: \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f0\b\i0\ulnone\fs36\fc1\cf1 BusyBox
8: \f3\b0\fs28\fc0\cf0 \
9: \
10:
11: \b BusyBox
12: \b0 is a trivial program which exists to provide on-line guidance about the user interface conventions under NeXTstep. The code is very simple; BusyBox is not much of a programming example. You may want to check out the Help object as a possible schema for implementing help in your program. (Applications written for NeXTSTEP 3.0 can also use the help facilities provided in the Application Kit.) And if you have need for a clock or a gauge, you can look over the ClockView and GaugeView. \
13: \
14: I created BusyBox so you could run it to learn more about the user interface guidelines and hopefully have some fun while you're at it!\
15: \
16: \
17: Classes of this application:\
18:
19: \pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-2060\li2060\fc0\cf0 \
20:
21: \b Help
22: \b0 This class encapsulates all the functionality for a help object which can maintain a list of help topics, display the file for any help topic and respond to requests for context-sensitive help.
23: \fc1\cf1 The help object owns its own nib section "Help.nib" which has a help panel - with an NXBrowser to display the help topics and a scrolling text view to display the help files. The help files are all stored as RTF text files in a directory called Help within the app wrapper. At init time, the Help object loads the browser with names of all the files found in the Help directory. When a name is chosen from the browser, the help object opens a stream on that file and read the rich text into the text object. The help object also responds to request for context-sensitive help, by trying to find an appropriate help file for the view that was moused down in. This object is a useful addition to any program, because all users appreciate help!\
24: \
25:
26: \b BusyBoxApp
27: \b0 Mostly, this subclass of Application exists to override sendEvent:. When it catches a Control-mouseDown going through, it vectors it off to the Help object. Other
28: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc1\cf1 responsibilities
29: \pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-2060\li2060\fc1\cf1 of the BusyBoxApp include loading the Info and Preferences Panels when needed and keeping track of the path to the app wrapper.\
30: \
31:
32: \b AnimalView
33: \b0 Simple subclass of view to display an NXBitmapImageRep. Knows how to flip and rotate itself in response to IB controls.\
34: \
35:
36: \b ClockView
37: \b0 Subclass of view to implement a simple clock. It can draw an analog face, a digital clock or a sundial. You have the option of turning the seconds hand on or off, as well as controlling whether the date is also displayed. \
38: \
39:
40: \b GaugeView
41: \b0 Subclass of view to implement a simple round analog gauge. You can set the minimum, maximum value, start angle, angle range, title, font, and more. It is a pretty generic round gauge view, if you ever have need for one.\
42: \
43: Other files:\
44:
45: \pard\tx560\tx1120\tx2640\tx3360\tx3640\tx3740\tx3920\tx4480\tx5040\tx5600\b\fi-2660\li2660\fc1\cf1 BusyBox.nib
46: \b0 The main nib file. Contains the Busy Box window.\
47:
48: \b InfoPanel.nib
49: \b0 The nib module containing the Info Panel (loaded only on demand).\
50:
51: \b PrefPanel.nib
52: \b0 The nib module containing the Preferences Panel (loaded when needed).\
53:
54: \b Help.nib
55: \b0 The nib module owned by the Help object - has the Help Panel, browser of help topics, and the scrolling text view to display the help files.\
56:
57: \b Clock.psw
58: \b0 pswraps used by the ClockView to draw and animate the clock faces.\
59:
60: \b Gauge.psw
61: \b0 pswraps used by the GaugeView to draw and animate the analog gauge.\
62:
63: \b Clock.strings
64: \b0 A string file for NXStringTable, contains names of weekdays and months. \
65:
66: \b Cow.tiff, Duck.tiff,
67: \b0 Tiff files for the AnimalView.\
68:
69: \b Horse.tiff, Jaguar.tiff, Pig.tiff
70: \b0 \
71:
72: \b Makefile.preamble,
73: \b0 Additions to the Makefile provided by Interface Builder.\
74:
75: \b Makefile.postamble
76: \b0 \
77:
78: \b IB.proj,
79: \b0 These files created by Interface Builder.\
80:
81: \b Makefile,
82: \b0 \
83:
84: \b BusyBox_main.m,
85: \b0 \
86:
87: \pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\b\fi-2060\li2060\fc1\cf1 BusyBox.iconheader
88: \b0 \
89:
90: \pard\tx560\tx1120\tx1800\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-1800\li1800\fc0\cf0 \
91: \
92: Topics of interest from BusyBox:\
93: \
94: Overriding sendEvent: to do context-sensitive help (BusyBoxApp)\
95: Filling and using an NXBrowser (Help)\
96: Reading rich text files into a scrolling text view (Help)\
97: Using a timed entry (ClockView)\
98: Simple pswraps (Clock.psw and Gauge.psw)\
99: Creating an app wrapper (Makefile.preamble,Makefile.postamble, IB.proj)\
100: Multiple nib files (BusyBox.nib, InfoPanel.nib, PrefPanel.nib,Help.nib)\
101: Loading a nib module on demand (BusyBoxApp)\
102: Scaling and rotating an NXBitmapImageRep (AnimalView)\
103: Entry validation using text delegate method textWillEnd: (GaugeView) \
104: Constraining the resizing of a window using delegate methods (Help)\
105: Storing and accessing strings using an NXStringTable (ClockView)\
106:
107: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.