git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4010 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-04-01 06:47:43 +00:00
parent f1d8017d18
commit 401f64557e
2 changed files with 39 additions and 40 deletions

View file

@ -173,7 +173,7 @@ id _nsTextfieldCellClass = nil;
// Tell the object that we are the previous text Unless it already is // Tell the object that we are the previous text Unless it already is
next_text = anObject; next_text = anObject;
if ([anObject respondsToSelector: @selector(setPreviousText: )]) if ([anObject respondsToSelector: @selector(setPreviousText:)])
{ {
t = [anObject previousText]; t = [anObject previousText];
if (t != self) if (t != self)
@ -187,7 +187,7 @@ id _nsTextfieldCellClass = nil;
// Tell the object that we are the next text Unless it already knows // Tell the object that we are the next text Unless it already knows
previous_text = anObject; previous_text = anObject;
if ([anObject respondsToSelector: @selector(setNextText: )]) if ([anObject respondsToSelector: @selector(setNextText:)])
{ {
t = [anObject nextText]; t = [anObject nextText];
if (t != self) if (t != self)

View file

@ -46,12 +46,11 @@
// Class methods // Class methods
// //
+ (void)initialize + (void) initialize
{ {
if (self == [NSTextFieldCell class]) if (self == [NSTextFieldCell class])
{ {
// Initial version [self setVersion: 1];
[self setVersion:1];
} }
} }
@ -62,31 +61,31 @@
// //
// Initialization // Initialization
// //
- init - (id) init
{ {
[self initTextCell:@""]; [self initTextCell: @""];
return self; return self;
} }
- initTextCell:(NSString *)aString - (id) initTextCell: (NSString *)aString
{ {
[super initTextCell:aString]; [super initTextCell: aString];
[self setEnabled:YES]; [self setEnabled: YES];
[self setBordered:YES]; [self setBordered: YES];
[self setBezeled:YES]; [self setBezeled: YES];
[self setScrollable:YES]; [self setScrollable: YES];
[self setEditable:YES]; [self setEditable: YES];
[self setAlignment:NSLeftTextAlignment]; [self setAlignment: NSLeftTextAlignment];
[self setBackgroundColor: [NSColor textBackgroundColor]]; [self setBackgroundColor: [NSColor textBackgroundColor]];
[self setTextColor: [NSColor textColor]]; [self setTextColor: [NSColor textColor]];
[self setFont: [NSFont systemFontOfSize:0]]; [self setFont: [NSFont systemFontOfSize: 0]];
draw_background = NO; draw_background = NO;
return self; return self;
} }
- (void)dealloc - (void) dealloc
{ {
[background_color release]; [background_color release];
[text_color release]; [text_color release];
@ -107,7 +106,7 @@
// //
// Determining Component Sizes // Determining Component Sizes
// //
- (NSSize)cellSize - (NSSize) cellSize
{ {
NSFont *f; NSFont *f;
NSSize borderSize, s; NSSize borderSize, s;
@ -138,95 +137,95 @@
// //
// Modifying Graphic Attributes // Modifying Graphic Attributes
// //
- (NSColor *)backgroundColor - (NSColor *) backgroundColor
{ {
return background_color; return background_color;
} }
- (BOOL)drawsBackground - (BOOL) drawsBackground
{ {
return draw_background; return draw_background;
} }
- (void)setBackgroundColor:(NSColor *)aColor - (void) setBackgroundColor: (NSColor *)aColor
{ {
[aColor retain]; [aColor retain];
[background_color release]; [background_color release];
background_color = aColor; background_color = aColor;
} }
- (void)setDrawsBackground:(BOOL)flag - (void) setDrawsBackground: (BOOL)flag
{ {
draw_background = flag; draw_background = flag;
} }
- (void)setTextColor:(NSColor *)aColor - (void) setTextColor: (NSColor *)aColor
{ {
[aColor retain]; [aColor retain];
[text_color release]; [text_color release];
text_color = aColor; text_color = aColor;
} }
- (id)setUpFieldEditorAttributes:(id)textObject - (id) setUpFieldEditorAttributes: (id)textObject
{ {
return nil; return nil;
} }
- (NSColor *)textColor - (NSColor *) textColor
{ {
return text_color; return text_color;
} }
- (void)setFont:(NSFont *)fontObject - (void) setFont: (NSFont *)fontObject
{ {
[super setFont:fontObject]; [super setFont: fontObject];
} }
// //
// Editing Text // Editing Text
// //
- (void)selectText:(id)sender - (void) selectText: (id)sender
{ {
} }
- (double)doubleValue - (double) doubleValue
{ {
return [super doubleValue]; return [super doubleValue];
} }
- (void)setDoubleValue:(double)aDouble - (void) setDoubleValue: (double)aDouble
{ {
[super setDoubleValue:aDouble]; [super setDoubleValue: aDouble];
} }
- (float)floatValue - (float) floatValue
{ {
return [super floatValue]; return [super floatValue];
} }
- (void)setFloatValue:(float)aFloat - (void) setFloatValue: (float)aFloat
{ {
[super setFloatValue:aFloat]; [super setFloatValue: aFloat];
} }
- (int)intValue - (int) intValue
{ {
return [super intValue]; return [super intValue];
} }
- (void)setIntValue:(int)anInt - (void) setIntValue: (int)anInt
{ {
[super setIntValue:anInt]; [super setIntValue: anInt];
} }
- (NSString *)stringValue - (NSString *) stringValue
{ {
return [super stringValue]; return [super stringValue];
} }
- (void)setStringValue:(NSString *)aString - (void) setStringValue: (NSString *)aString
{ {
[super setStringValue:aString]; [super setStringValue: aString];
} }
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView - (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView