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

{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f3\fnil Times-Roman;\f2\fmodern Ohlfs;}
\paperw11780
\paperh9540
\margl320
\margr120
{\colortbl;\red0\green0\blue0;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f0\b\i0\ulnone\fs36\fc1\cf1 BusyBox
\f3\b0\fs28\fc0\cf0 \
\

\b BusyBox
\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.  \
\
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!\
\
\
Classes of this application:\

\pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-2060\li2060\fc0\cf0 \

\b Help
\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.  
\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!\
\

\b BusyBoxApp	
\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 
\pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\fc1\cf1 responsibilities
\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.\
\

\b AnimalView
\b0 	 Simple subclass of view to display an NXBitmapImageRep.  Knows how  to flip and rotate itself in response to IB controls.\
\

\b ClockView
\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.  \
\

\b GaugeView
\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.\
\
Other files:\

\pard\tx560\tx1120\tx2640\tx3360\tx3640\tx3740\tx3920\tx4480\tx5040\tx5600\b\fi-2660\li2660\fc1\cf1 BusyBox.nib
\b0 	The main nib file.  Contains the Busy Box window.\

\b InfoPanel.nib
\b0 	The nib module containing the Info Panel (loaded only on demand).\

\b PrefPanel.nib
\b0 	The nib module containing the Preferences Panel (loaded when needed).\

\b Help.nib
\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.\

\b Clock.psw
\b0 	pswraps used by the ClockView to draw and animate the clock faces.\

\b Gauge.psw
\b0 	pswraps used by the GaugeView to draw and animate the analog gauge.\

\b Clock.strings
\b0 	A string file for NXStringTable, contains names of weekdays and months. \

\b Cow.tiff, Duck.tiff,
\b0 	Tiff files for the AnimalView.\

\b Horse.tiff, Jaguar.tiff, Pig.tiff
\b0 \

\b Makefile.preamble, 	
\b0 Additions to the Makefile provided by Interface Builder.\

\b Makefile.postamble
\b0 \

\b IB.proj,
\b0 		These files created by Interface Builder.\

\b Makefile,
\b0 \

\b BusyBox_main.m,
\b0 \

\pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\b\fi-2060\li2060\fc1\cf1 BusyBox.iconheader
\b0  \

\pard\tx560\tx1120\tx1800\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-1800\li1800\fc0\cf0 \
\
Topics of interest from BusyBox:\
\
Overriding sendEvent: to do context-sensitive help (BusyBoxApp)\
Filling and using an NXBrowser (Help)\
Reading rich text files into a scrolling text view (Help)\
Using a timed entry (ClockView)\
Simple pswraps (Clock.psw and Gauge.psw)\
Creating an app wrapper (Makefile.preamble,Makefile.postamble, IB.proj)\
Multiple nib files (BusyBox.nib, InfoPanel.nib, PrefPanel.nib,Help.nib)\
Loading a nib module on demand (BusyBoxApp)\
Scaling and rotating an NXBitmapImageRep (AnimalView)\
Entry validation using text delegate method textWillEnd: (GaugeView) \
Constraining the resizing of a window using delegate methods (Help)\
Storing and accessing strings using an NXStringTable (ClockView)\

}

unix.superglobalmegacorp.com

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