#import "MyWindowObject.h"

@implementation MyWindowObject

	NSRect frame;
	int temp_x, temp_y;


- (void)windowDidMove:(NSNotification *)notification;
{

    	frame = [MyWindow frame];

    	[Hori_Location setIntValue:NSMinX(frame)];
   	[Verti_Location setIntValue:NSMinY(frame)];

        [Done_Action setStringValue:@"windowDidMove"];
}

- (void)windowDidResignKey:(NSNotification *)notification;
{
        [Done_Action setStringValue:@"windowDidResignKey"];
}


- (void)windowDidResize:(NSNotification *)notification;
{

    	frame = [MyWindow frame];

    	[Hori_Size setIntValue:NSWidth(frame)];
    	[Vert_Size setIntValue:NSHeight(frame)];

        if ((temp_x < NSWidth(frame)) || (temp_y < NSWidth(frame)))
            [Done_Action setStringValue:@"windowDidResize (Bigger)"];

        if ((temp_x > NSWidth(frame)) || (temp_y > NSHeight(frame)))
            [Done_Action setStringValue:@"windowDidResize (Smaller)"];

        temp_x = NSWidth(frame);
        temp_y = NSHeight(frame);

}

- (void)windowDidBecomeKey:(NSNotification *)notification;
{

    	[Done_Action setStringValue:@"windowDidBecomeKey"];

}

- (void)MoreInfo:(id)sender
{

    [NSBundle loadNibNamed:@"MoreInfo.nib" owner:self]; // load nib

}

@end
