/* AdderWindowManager.m created by todd on Tue 16-Apr-1996 */

#import <AppKit/AppKit.h>

#import "AdderNibManager.h"
#import "AdderWindowManager.h"


@implementation AdderWindowManager

//-------------------------------------------------------------------
// 	New adder window managers
//-------------------------------------------------------------------

+ (AdderWindowManager*) newAdderWindowManager
/*"
   Use our AdderNibManager to load and return a new adder window manager.
   Returns nil if there was a problem creating the new window manager. This
   functionality might be moved to the base window manager one of these
   days.
"*/
{
    AdderNibManager* adderNibManager = [[AdderNibManager alloc] init];

    // If our adder nib manager doesn't have an adder window manager after
    // creation we should probably say so and free the nib manager.
    
    return [adderNibManager adderWindowManager];
}


//-------------------------------------------------------------------
// 	Initialization/deallocation
//-------------------------------------------------------------------

- (id) init
{
    BOOL error = ([super init] == nil);

    if (!error) {
        // When our window is closed we don't need to hang around.
        [self setReleasedWhenWindowClosed:YES];

        if (error) {
            [self autorelease];
        }
    }

    return error ? nil : self;
}


- (void) dealloc
{
    NSLog(@"Adder window manager is deallocing.");
    [super dealloc];
}
	
@end
