1 //
2 //  PXBackgroundController.h
3 //  Pixen-XCode
4 //
5 //  Created by Joe Osborn on Sun Oct 26 2003.
6 //  Copyright (c) 2003 Open Sword Group. All rights reserved.
7 //
8 #import <Foundation/NSObject.h>
9 #import <AppKit/NSNibDeclarations.h>
10 
11 @class NSButton;
12 @class NSPanel;
13 @class NSPopUpButton;
14 @class NSView;
15 
16 @interface PXBackgroundController : NSObject
17 {
18   id delegate;
19   id mainBackground;
20   id alternateBackground;
21   IBOutlet NSPopUpButton *mainMenu;
22   IBOutlet NSPopUpButton *alternateMenu;
23   IBOutlet NSView * mainConfigurator;
24   IBOutlet NSView * alternateConfigurator;
25   IBOutlet NSButton * alternateCheckbox;
26   IBOutlet NSPanel *panel;
27   BOOL usesAlternateBackground;
28   id namePrompter;
29 }
30 + backgroundNamed:aName;
31 - (void)useBackgroundsOf:(id)aCanvas;
32 - (void)setDelegate:(id)anObject;
33 
34 //Actions methods
35 - (IBAction)useCurrentBackgroundsAsDefaults:(id)sender;
36 - (IBAction)useAlternateBackgroundCheckboxClicked:(id)sender;
37 - (IBAction)selectMainBackground:(id)sender;
38 - (IBAction)selectAlternateBackground:(id)sender;
39 
40 //Accessor
41 -(NSPanel *) backgroundPanel;
42 
43 @end
44 
45 //PXNamePrompter delegate methods
46 @interface PXBackgroundController ( NamePrompterDelegate )
47 - (void)prompter:aPrompter didFinishWithName:name context:contextObject;
48 - (void)prompter:aPrompter didCancelWithContext:contextObject;
49 @end
50 
51 
52 
53 
54 @interface NSObject(PXBackgroundControllerDelegate)
55 - (void)setMainBackground:aBackground;
56 - (void)setAlternateBackground:aBackground;
57 - (void)backgroundChanged:aNotification;
58 @end
59