/*

 Owner: Stefan Neumärker <stefan@boinx.com>
 Company: Boinx Software Ltd., Germany
 Projects: BXAppKit

 Abstract: Draws an BXPopOverWindow at an attached point into a view.

 Related: BXPopOverWindow (BalloonController in BoinxTV, PhotoPresenter and FotoMagico)

 Documentation: 

 */


#import "BXPopOverWindow.h"


#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5

#define PopOverWillDisplayNotification @"PopOverWillDisplayNotification"
#define PopOverDidDisplayNotification @"PopOverDidDisplayNotification"
#define PopOverWillHideNotification @"PopOverWillHideNotification"
#define PopOverDidHideNotification @"PopOverDidHideNotification"



@interface BXPopOverWindowController : NSWindowController <NSWindowDelegate>
{
	BXPopOverWindow *_PopOverWindow;
	BOOL _mouseOutside;
	NSTimeInterval _outsideSince;
	id _popOverIdentifier;
	id _popOverDelegate;
	
	BOOL _makeKeyWindow;
}

@property (assign) BOOL makeKeyWindow;

+ (id)sharedController;

- (BOOL)displayPopOver:(NSView *)inPopOverView attachedToPoint:(NSPoint)inPoint inView:(NSView *)inView identifier:(id <NSCopying>)inIdentifier delegate:(id)inDelegate autoHide:(BOOL)inHide;
- (BOOL)displayPopOver:(NSView *)inPopOverView attachedToPoint:(NSPoint)inPoint inView:(NSView *)inView onSide:(MAWindowPosition)inSide identifier:(id <NSCopying>)inIdentifier delegate:(id)inDelegate autoHide:(BOOL)inHide;
- (void)hidePopOver;
- (void)hidePopOverWindow:(BXPopOverWindow *)inPopOverWindow;

@end

@interface NSObject (BXPopOverControllerDelegate)

- (void)popOverDidEnd:(id)inPopOverIdentifier;

@end

#endif