
#import "ControlPanel.h"

@implementation ControlPanel

- (id) initWithContentRect: (NSRect) contentRect
                 styleMask: (NSUInteger) windowStyle
                   backing: (NSBackingStoreType) bufferingType
                     defer: (BOOL) deferCreation
{
    #ifdef DEBUG
        GeneralMessage ("Entering ControlPanel layout initialization function");
    #endif

    [super initWithContentRect: contentRect     styleMask: windowStyle
                       backing: bufferingType       defer: deferCreation];

    [self setContentSize: contentRect.size];





    /* set up views to place objects */
    [mainPanelView initWithFrame: contentRect];

    rawArray = [NSArray arrayWithObjects: @"Simulate", @"Spinwarp 2D", nil];

    rawButtonRect.origin.x = contentRect.origin.x +  45.0;
    rawButtonRect.origin.y = contentRect.origin.y + 135.0;

    rawButtonRect.size.width  = 180.0;
    rawButtonRect.size.height =  45.0;

    [rawTextField initWithFrame: rawButtonRect];
    [rawTextField setEditable:   YES];
    [rawTextField setBezeled:    YES];
    [rawTextField setBezelStyle:    NSTextFieldSquareBezel];
    [rawTextField setBackgroundColor: [NSColor blackColor]];
    [rawTextField setTextColor:       [NSColor whiteColor]];
    [rawTextField setDrawsBackground: NO];

    [mainPanelView setSubviews: [NSArray arrayWithObjects: rawTextField, nil]];

    [rawTextField drawRect: rawButtonRect];




    [self setContentView: mainPanelView];
    [self setContentSize: contentRect.size];
    [self setTitle:@"Select initial parameters."];
    [self orderFront:nil];

    #ifdef DEBUG
        GeneralMessage ("Leaving ControlPanel layout initialization function");
    #endif

    return (nil);
}

- (void) dealloc
{
    [super dealloc];
}

@end

