1#import <AppKit/NSWindowController.h> 2#import <AppKit/NSNibDeclarations.h> 3#import <Foundation/NSGeometry.h> 4 5@class NSView; 6@protocol JVInspection; 7 8@protocol JVInspector <NSObject> 9- (NSView *) view; 10- (NSSize) minSize; 11- (NSString *) title; 12- (NSString *) type; 13@end 14 15@interface NSObject (JVInspectorOptional) 16- (void) willLoad; 17- (void) didLoad; 18 19- (BOOL) shouldUnload; 20- (void) didUnload; 21@end 22 23@protocol JVInspection <NSObject> 24- (id <JVInspector>) inspector; 25@end 26 27@interface NSObject (JVInspectionOptional) 28- (void) willBeInspected; 29@end 30 31@protocol JVInspectionDelegator <NSObject> 32- (id <JVInspection>) objectToInspect; 33- (IBAction) getInfo:(id) sender; 34@end 35 36@interface JVInspectorController : NSWindowController { 37 BOOL _locked; 38 id <JVInspection> _object; 39 id <JVInspector> _inspector; 40} 41+ (JVInspectorController *) sharedInspector; 42+ (IBAction) showInspector:(id) sender; 43+ (JVInspectorController *) inspectorOfObject:(id <JVInspection>) object; 44 45- (id) initWithObject:(id <JVInspection>) object lockedOn:(BOOL) locked; 46 47- (IBAction) show:(id) sender; 48- (BOOL) locked; 49 50- (void) inspectObject:(id <JVInspection>) object; 51 52- (id <JVInspection>) inspectedObject; 53- (id <JVInspector>) inspector; 54@end 55