// BWBorkPadPrefController.h -- the controller for BorkPad preferences.  Basically
//				a stripped-down font picker

// Copyright (C) 2003 Borkware
// We use the BSD License.  Check out http://borkware.com/license

#import <Cocoa/Cocoa.h>


/*
 * ----- random constants
 */

// notification that is broadcast when the user picks a new font or size
// These notifications happen in real-time, so that the user can see
// the effect of the font-change.  Cancelling or closing the preference
// window will restore the original font and size settings

extern NSString *BWBorkPadPrefControllerFontChangeNotification;


// the user_info of the notification is an NSDictionary with these
// keys (and values).  The 'permanent' is to tell the receiver that
// the user has commited to a long-term relationship with this font,
// and so the proper defaults should be recorded for posterity.

extern NSString *BWBorkPadPrefFontKey; // an NSFont
extern NSString *BWBorkPadPrefPermanentKey; // an NSNumber with a BOOL



@interface BWBorkPadPrefController : NSObject
{
    // we need to manipulate these guys
    IBOutlet NSPopUpButton	*fontMenuButton;
    IBOutlet NSPopUpButton	*sizeMenuButton; // point size is in the menuitem tag

    // so we can attach context help
    IBOutlet NSButton		*cancelButton;
    IBOutlet NSButton		*okButton;

    IBOutlet NSWindow		*window;

    NSFont *originalFont; // for restoring the font on a cancel
    NSFont *font;	  // the currently selected font / size
}

- (void) showWindow: (id) sender;

- (void) setFont: (NSFont *) font;

- (IBAction) cancelAction: (id) sender;
- (IBAction) applyAction: (id) sender;
- (IBAction) okAction: (id) sender;

@end // BWBorkPadPrefController


/* $Id: BWBorkPadPrefController.h,v 1.4 2003/01/02 21:29:20 markd Exp $ */
