ftp.nice.ch/pub/next/text/etext/eText5-0.93.Source.NIHS.tar.gz#/eText5/Inspectable.h

This is Inspectable.h in view mode; [Download] [Up]

{\rtf0\ansi{\fonttbl\f0\fmodern Courier;\f1\ftech Symbol;\f3\fmodern Ohlfs;}
\margl40
\margr40
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 //ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ\
//
\i 	
\b FILENAME
\b0 :	
\b\i0 Inspectable.h \

\b0 //
\i 	
\b SUMMARY
\b0 :	
\b\i0 Defines a protocol for any inspectable object in eText.
\b0 \
//	
\b\i SUPERCLASS
\b0 :
\i0 	
\b None
\b0 \
//	
\b\i PROTOCOLS
\b0 :
\i0 	
\b <Inspectable, InspectableTarget>
\b0 \
//	
\b\i INTERFACE
\b0 :
\i0 	
\b None
\b0 \
//	
\b\i AUTHOR
\b0 :		
\b\i0 Rohit Khare
\b0 \
//	
\b\i COPYRIGHT
\b0 :	
\f1\i0 Ó
\f0\b 1993,94 California Institure of Technology, eText Project\

\b0 //ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ\
//	
\b\i Description
\b0\i0 \
//		- (const NXAtom *) 
\b types
\b0 ;\
//		- 
\b inspectorForType
\b0 :(const char *) 
\b type
\b0 ;\
//		- 
\b resignInspector
\b0 : (View *) 
\b oldInspector
\b0  
\b ofType
\b0 : (const char *) 
\b type
\b0 ;\
//		- 
\b activateInspector
\b0 :(View *) 
\b newInspector
\b0  
\b ofType
\b0 :(const char *) 
\b type
\b0 ;\
//		- (char *) 
\b inspectorTitle
\b0 ;\
//\
//		This is a protocol outlining the responsibilities of any object\
// 	that wishes to attach itself to the Inspector facility of most\
//	ETF-applications. This protocol defines a standard interface for objects\
//	to advertise actual inspectors, and for the system to notify the \
//	inspectors' owners.\
//\
//		Over time, the system has evolved into a strict MVC model, and the\
//	<Inspectable> object is often a shared interface controller that can\
//	dynamically "contain" the data of many clients (the */*UI pairs in eText).\
//	So, we have a concrete problem with persistent selections, since flipping\
//	back and forth between two documents with selected objects of the same\
//	class causes problems -- the <Inspectable> object is the same, the content\
//	is not. So, we developed the <
\b InspectableTarget
\b0 > extension.\
//\
//		[inspector inspect:foo] will now stop to ask: does foo have an\
//	
\b\i inspectableDelegate
\b0\i0  method? If so, store foo as the current target,\
//	and use the return value ([[fooUI new] setFoo:foo]) as the <Inspectable>.\
// \
// 	NS: The medium for an inspector is a View. For ease of use with Interface\
// 	Builder, we suggest the programmer create a Panel or Box of the needed\
//	size, and then pass in the contentView of these objects.\
//ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ\
//	
\b\i HISTORY\

\b0\i0 //	10/30/94:	
\b Created <InspectorTarget> protocol.
\b0 \
//	09/27/94:	
\b Revamped for eText5
\b0 \
//	08/18/93:	
\b Created. Derived almost wholly from Version 1.0
\b0 \
//	
\i Version 1.0 tracking notes:\

\i0 //	06/29/93:	
\b Added -doc for the purpose of Inspector's -touch
\b0 \
// 	06/27/93:	
\b Created (Rohit Khare)
\b0 \
//ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐ\
//	
\b Imported Interfaces
\b0 \
//\
	#import <appkit/
\b View.h
\b0 >\
	#import <objc/
\b hashtable.h
\b0 >\
	\
// 
\i NS: These are sized in relation to the Workspace Manager's inspector panels.
\i0 \
#define 
\b INSPECTOR_W
\b0  	270.0\
#define 
\b INSPECTOR_H
\b0  	378.0\
\

\i @protocol Inspectable\
\

\i0 - (const char *) 
\b inspectorTitle
\b0 ;\

\i // 
\b General
\b0 : The panel will put "inspectorTitle Inspector" in the window bar.\
// 
\b Note
\b0 : the return value should be less than 240 characters.\

\i0 \
- (const NXAtom *) 
\b types
\b0 ;\

\i // 
\b General
\b0 : Inspectable objects can have several different inspectors.\
// A common set might be "Info, Controls, Contents" Controls would be UI\
// interactors (Play, Pause, etc.) and Contents might include filenames,\
// formats, etc. The first type in the list is the "primary" type, which is the\
// one a user is presented with first.\
// \
// 
\b NS
\b0 : This list is loaded into a popup list, and the first item\
// on the list is the default view.\

\i0 \
\
- 
\b inspectorForType
\b0 :(const char *) 
\b type
\b0 ;\

\i // 
\b General
\b0 : For each type of inspector, the system will automatically request\
// the needed panel on demand. The returned object is an inspector.\
// \
// 
\b NS
\b0 : The offered view will be forcibly resized to the panel's full size.\

\i0 \
- 
\b resignInspector
\b0 : (View *) 
\b oldInspector
\b0  
\b ofType
\b0 : (const char *) 
\b type
\b0 ;\
- 
\b activateInspector
\b0 : (View *) 
\b newInspector
\b0  
\b ofType
\b0 : (const char *) 
\b type
\b0 ;\

\i // 
\b General
\b0 : The object which is being inspected also will be notified of status\
// changes. The inspected object is the implicit delegate of the inspector\
// controller. The arguments are the view and the tag given by the programmer\
// in methods above.\

\i0 \

\i @end\
\
@protocol InspectableTarget\

\i0 	\
- (id <
\b Inspectable
\b0 >) 
\b inspectableDelegate
\b0 ;\
// 
\b\i General
\b0 : This is a "standard" proxy indirection mechanism for separating\

\i0 //
\i  the inspected object from its inspectable interface (foo from fooUI)
\i0 \

\i \
@end
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.