// OATextField:TextField
// 
// COPYRIGHT 1994 BY M. ONYSCHUK AND ASSOCIATES INC.
// ALL RIGHTS RESERVED.

#import "OATextField.h"
#import "OATextFieldCell.h"
#import "OATextFieldFormatter.h"

#import <appkit/publicWraps.h>

#include <stdlib.h>

@implementation OATextField

// Factory methods
+ initialize
{
    [super initialize];
    [OATextField setCellClass:[OATextFieldCell class]];
    return self;
}


// Instance methods
- textDidEnd:anObject endChar:(unsigned short)whyEnd
// Overrides to call endEditing: on [self cell]. Don't know if
// this is necessary...
{
    [[self cell] endEditing:anObject];

    return[super textDidEnd:anObject endChar:whyEnd];
}


- (OATextFieldFormatter *)textFieldFormatter
{
    return [[self cell] textFieldFormatter];
}
- setTextFieldFormatter:(OATextFieldFormatter *)aValue
{
    return [[self cell] setTextFieldFormatter:aValue];
}


- (OACaseMapping)caseMapping
{
    return[[self cell] caseMapping];
}
- setCaseMapping:(OACaseMapping)aValue
{
    return [[self cell] setCaseMapping:aValue];
    return self;
}


- (OACharacterFiltering)characterFiltering
{
    return[[self cell] characterFiltering];
}
- setCharacterFiltering:(OACharacterFiltering)aValue
{
    return [[self cell] setCharacterFiltering:aValue];
    return self;
}


- (const char *)filteringExceptions
{
    return [[self cell] filteringExceptions];
}
- setFilteringExceptions:(const char *)aValue
{
    return [[self cell] setFilteringExceptions:aValue];
}


- (BOOL)doesRemoveLeadingWhitespace
{
    return [[self cell] doesRemoveLeadingWhitespace];
}

- setRemovesLeadingWhitespace:(BOOL)aValue
{
    return [[self cell] setRemovesLeadingWhitespace:aValue];
}


- (BOOL)doesRemoveTrailingWhitespace
{
    return [[self cell] doesRemoveTrailingWhitespace];
}

- setRemovesTrailingWhitespace:(BOOL)aValue
{
    return [[self cell] setRemovesTrailingWhitespace:aValue];
}


- (int)minimumLength
{
    return[[self cell] minimumLength];
}

- setMinimumLength:(int)aValue
{
    return[[self cell] setMinimumLength:aValue];
}

- (BOOL)doesCheckMinimumLength
{
    return[[self cell] doesCheckMinimumLength];
}

- setChecksMinimumLength:(BOOL)aValue
{
    return[[self cell] setChecksMinimumLength:aValue];
}

- (int)maximumLength
{
    return[[self cell] maximumLength];
}

- setMaximumLength:(int)aValue
{
    return[[self cell] setMaximumLength:aValue];
}


- (BOOL)doesCheckMaximumLength
{
    return[[self cell] doesCheckMaximumLength];
}

- setChecksMaximumLength:(BOOL)aValue
{
    return[[self cell] setChecksMaximumLength:aValue];
}


- (int)minimumValue
{
    return[[self cell] minimumValue];
}

- setMinimumValue:(int)aValue
{
    return[[self cell] setMinimumValue:aValue];
}

- (BOOL)doesCheckMinimumValue
{
    return[[self cell] doesCheckMinimumValue];
}

- setChecksMinimumValue:(BOOL)aValue
{
    return[[self cell] setChecksMinimumValue:aValue];
}

- (int)maximumValue
{
    return[[self cell] maximumValue];
}

- setMaximumValue:(int)aValue
{
    return[[self cell] setMaximumValue:aValue];
}

- (BOOL)doesCheckMaximumValue
{
    return[[self cell] doesCheckMaximumValue];
}

- setChecksMaximumValue:(BOOL)aValue
{
    return[[self cell] setChecksMaximumValue:aValue];
}


- (BOOL)isNullable
{
     return[[self cell] isNullable];
}

- setNullable:(BOOL)aValue
{
    return [[self cell] setNullable:aValue];
}

- (BOOL)isMandatory
{
     return[[self cell] isMandatory];
}

- setMandatory:(BOOL)aValue
{
    return [[self cell] setMandatory:aValue];
}

@end
