/*
    IBPlugin.h
    Interface Builder Kit
    Copyright 2006-2009 Apple Inc.
    All rights reserved.

The IBPlugin class provides the basic functionality required by all Interface Builder plug-ins. The methods of this class provide hooks for you to configure your plug-in when it is loaded by Interface Builder.
*/

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5

#import <Cocoa/Cocoa.h>

@class IBDocument;

@interface IBPlugin : NSObject {
    @private;
    IBOutlet NSView *preferencesView;
    void *reserved[8];
}
/* A shared instance of the plugin */
+ (id)sharedInstance;

/* The label (for display purposes) and the optional view for preferences for any items. */
- (NSString *)label; 
- (NSView *)preferencesView; 

/* Hooks for setting up or tearing down the plugin.  The default implementations do nothing. */
- (void)didLoad;
- (void)willUnload;

/* A collection of names of NIB files in the resources for the plugin which contain items to be loaded into the Library. */
- (NSArray *)libraryNibNames;

/* List of bundle instances for frameworks to link i.e. Cocoa.framework, MyViews.framework. Used for simulator and project linking. */
- (NSArray *)requiredFrameworks; 

/* Returns the objects from the pasteboard for the specified view from the Library.  Plugins can override this method to provide customized or alternate objects to be added to the document, rather than the exact items from the library template.)  The returned objects will be placed on the pasteboard -- the items actually added to the document will be copies.)
*/
- (NSArray *)pasteboardObjectsForDraggedLibraryView:(NSView *)view;

- (void)document:(IBDocument *)document didAddDraggedObjects:(NSArray *)roots fromDraggedLibraryView:(NSView *)view;

@end

#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 */
