1 //
2 // NSAlert+SynchronousSheet.h
3 //
4 // Created by Philipp Mayerhofer on 6/10/11.
5 // Copyright 2011 Incredible Bee Ltd. Released under the New BSD License.
6 //
7 
8 #import <Cocoa/Cocoa.h>
9 
10 /**
11 * Category to allow NSAlert instances to be run synchronously as sheets.
12 */
13 @interface NSAlert (SynchronousSheet)
14 
15 /**
16 * Runs the receiver modally as an alert sheet attached to a specified window
17 * and returns the constant positionally identifying the button clicked.
18 *
19 * \param aWindow The parent window for the sheet
20 *
21 * \return Response to the alert. See "Button Return Values" in Apple's NSAlert
22 * documentation.
23 */
24 -(NSInteger) runModalSheetForWindow:(NSWindow *)aWindow;
25 
26 /**
27 * Runs the receiver modally as an alert sheet attached to the main window
28 * and returns the constant positionally identifying the button clicked.
29 */
30 -(NSInteger) runModalSheet;
31 
32 @end
33 
34