Updated for change in NSControl's ivar names

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5529 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 1999-12-16 03:07:14 +00:00
parent 04ca2e250d
commit 0fc899c47f
6 changed files with 129 additions and 130 deletions

View file

@ -104,7 +104,7 @@ id _nsbuttonCellClass = nil;
//
- (void) setButtonType: (NSButtonType)aType
{
[cell setButtonType: aType];
[_cell setButtonType: aType];
[self display];
}
@ -128,13 +128,13 @@ id _nsbuttonCellClass = nil;
- (void) setState: (int)value
{
[cell setState: value];
[_cell setState: value];
[self display];
}
- (int) state
{
return [cell state];
return [_cell state];
}
//
@ -143,13 +143,13 @@ id _nsbuttonCellClass = nil;
- (void) getPeriodicDelay: (float *)delay
interval: (float *)interval
{
[cell getPeriodicDelay: delay interval: interval];
[_cell getPeriodicDelay: delay interval: interval];
}
- (void) setPeriodicDelay: (float)delay
interval: (float)interval
{
[cell setPeriodicDelay: delay interval: interval];
[_cell setPeriodicDelay: delay interval: interval];
}
//
@ -157,24 +157,24 @@ id _nsbuttonCellClass = nil;
//
- (NSString *) alternateTitle
{
return [cell alternateTitle];
return [_cell alternateTitle];
}
- (void) setAlternateTitle: (NSString *)aString
{
[cell setAlternateTitle: aString];
[_cell setAlternateTitle: aString];
[self display];
}
- (void) setTitle: (NSString *)aString
{
[cell setTitle: aString];
[_cell setTitle: aString];
[self display];
}
- (NSString *) title
{
return [cell title];
return [_cell title];
}
//
@ -182,45 +182,45 @@ id _nsbuttonCellClass = nil;
//
- (NSImage *) alternateImage
{
return [cell alternateImage];
return [_cell alternateImage];
}
- (NSImage *) image
{
return [cell image];
return [_cell image];
}
- (NSCellImagePosition) imagePosition
{
return [cell imagePosition];
return [_cell imagePosition];
}
- (void) setAlternateImage: (NSImage *)anImage
{
[cell setAlternateImage: anImage];
[_cell setAlternateImage: anImage];
[self display];
}
- (void) setImage: (NSImage *)anImage
{
[cell setImage: anImage];
[_cell setImage: anImage];
[self display];
}
- (void) setImagePosition: (NSCellImagePosition)aPosition
{
[cell setImagePosition: aPosition];
[_cell setImagePosition: aPosition];
[self display];
}
- (void) setAlignment: (NSTextAlignment)mode
{
[cell setAlignment: mode];
[_cell setAlignment: mode];
}
- (NSTextAlignment) alignment
{
return [cell alignment];
return [_cell alignment];
}
//
@ -228,23 +228,23 @@ id _nsbuttonCellClass = nil;
//
- (BOOL) isBordered
{
return [cell isBordered];
return [_cell isBordered];
}
- (BOOL) isTransparent
{
return [cell isTransparent];
return [_cell isTransparent];
}
- (void) setBordered: (BOOL)flag
{
[cell setBordered: flag];
[_cell setBordered: flag];
[self display];
}
- (void) setTransparent: (BOOL)flag
{
[cell setTransparent: flag];
[_cell setTransparent: flag];
[self display];
}
@ -254,7 +254,7 @@ id _nsbuttonCellClass = nil;
- (void) highlight: (BOOL)flag
{
[cell highlight: flag withFrame: bounds inView: self];
[_cell highlight: flag withFrame: bounds inView: self];
}
//
@ -262,22 +262,22 @@ id _nsbuttonCellClass = nil;
//
- (NSString*) keyEquivalent
{
return [cell keyEquivalent];
return [_cell keyEquivalent];
}
- (unsigned int) keyEquivalentModifierMask
{
return [cell keyEquivalentModifierMask];
return [_cell keyEquivalentModifierMask];
}
- (void) setKeyEquivalent: (NSString*)aKeyEquivalent
{
[cell setKeyEquivalent: aKeyEquivalent];
[_cell setKeyEquivalent: aKeyEquivalent];
}
- (void) setKeyEquivalentModifierMask: (unsigned int)mask
{
[cell setKeyEquivalentModifierMask: mask];
[_cell setKeyEquivalentModifierMask: mask];
}
//
@ -285,7 +285,7 @@ id _nsbuttonCellClass = nil;
//
- (BOOL) acceptsFirstResponder
{
return [cell acceptsFirstResponder] || ([self keyEquivalent] != nil);
return [_cell acceptsFirstResponder] || ([self keyEquivalent] != nil);
}
- (void) keyDown: (NSEvent*)theEvent
@ -312,7 +312,7 @@ id _nsbuttonCellClass = nil;
- (void) performClick: (id)sender
{
[cell performClick: sender];
[_cell performClick: sender];
}
- (BOOL) performKeyEquivalent: (NSEvent *)anEvent

View file

@ -59,56 +59,56 @@
- (void) setImage: (NSImage *)image
{
[cell setImage: image];
[self updateCell: cell];
[_cell setImage: image];
[self updateCell: _cell];
}
- (void) setImageAlignment: (NSImageAlignment)align
{
[cell setImageAlignment: align];
[self updateCell: cell];
[_cell setImageAlignment: align];
[self updateCell: _cell];
}
- (void) setImageScaling: (NSImageScaling)scaling
{
[cell setImageScaling: scaling];
[self updateCell: cell];
[_cell setImageScaling: scaling];
[self updateCell: _cell];
}
- (void) setImageFrameStyle: (NSImageFrameStyle)style
{
[cell setImageFrameStyle: style];
[self updateCell: cell];
[_cell setImageFrameStyle: style];
[self updateCell: _cell];
}
- (void) setEditable: (BOOL)flag
{
[cell setEditable: flag];
[_cell setEditable: flag];
}
- (NSImage *) image
{
return [cell image];
return [_cell image];
}
- (NSImageAlignment) imageAlignment
{
return [cell imageAlignment];
return [_cell imageAlignment];
}
- (NSImageScaling) imageScaling
{
return [cell imageScaling];
return [_cell imageScaling];
}
- (NSImageFrameStyle) imageFrameStyle
{
return [cell imageFrameStyle];
return [_cell imageFrameStyle];
}
- (BOOL) isEditable
{
return [cell isEditable];
return [_cell isEditable];
}
@end

View file

@ -97,44 +97,44 @@ Class _nspopupbuttonCellClass = 0;
- (void) setMenu: (NSMenu *)menu
{
[cell setMenu: menu];
[_cell setMenu: menu];
}
- (NSMenu *) menu
{
return [cell menu];
return [_cell menu];
}
- (void) setPullsDown: (BOOL)flag
{
[cell setPullsDown: flag];
[_cell setPullsDown: flag];
}
- (BOOL) pullsDown
{
return [cell pullsDown];
return [_cell pullsDown];
}
- (void) setAutoenablesItems: (BOOL)flag
{
[cell setAutoenablesItems: flag];
[_cell setAutoenablesItems: flag];
}
- (BOOL) autoenablesItems
{
return [cell autoenablesItems];
return [_cell autoenablesItems];
}
- (void) addItemWithTitle: (NSString *)title
{
[cell addItemWithTitle: title];
[_cell addItemWithTitle: title];
[self synchronizeTitleAndSelectedItem];
}
- (void) addItemsWithTitles: (NSArray *)itemTitles
{
[cell addItemsWithTitles: itemTitles];
[_cell addItemsWithTitles: itemTitles];
[self synchronizeTitleAndSelectedItem];
}
@ -142,7 +142,7 @@ Class _nspopupbuttonCellClass = 0;
- (void) insertItemWithTitle: (NSString *)title
atIndex: (int)index
{
[cell insertItemWithTitle: title
[_cell insertItemWithTitle: title
atIndex: index];
[self synchronizeTitleAndSelectedItem];
@ -150,135 +150,134 @@ Class _nspopupbuttonCellClass = 0;
- (void) removeAllItems
{
[cell removeAllItems];
[_cell removeAllItems];
[self synchronizeTitleAndSelectedItem];
}
- (void) removeItemWithTitle: (NSString *)title
{
[cell removeItemWithTitle: title];
[_cell removeItemWithTitle: title];
[self synchronizeTitleAndSelectedItem];
}
- (void) removeItemAtIndex: (int)index
{
[cell removeItemAtIndex: index];
[_cell removeItemAtIndex: index];
[self synchronizeTitleAndSelectedItem];
}
- (id <NSMenuItem>) selectedItem
{
return [cell selectedItem];
return [_cell selectedItem];
}
- (NSString *) titleOfSelectedItem
{
return [cell titleOfSelectedItem];
return [_cell titleOfSelectedItem];
}
- (int) indexOfSelectedItem
{
return [cell indexOfSelectedItem];
return [_cell indexOfSelectedItem];
}
- (void) selectItem: (id <NSMenuItem>)anObject
{
[cell selectItem: anObject];
[_cell selectItem: anObject];
}
- (void) selectItemAtIndex: (int)index
{
[cell selectItemAtIndex: index];
[_cell selectItemAtIndex: index];
}
- (void) selectItemWithTitle: (NSString *)title
{
[cell selectItemWithTitle: title];
[_cell selectItemWithTitle: title];
}
- (int) numberOfItems
{
return [cell numberOfItems];
return [_cell numberOfItems];
}
- (NSArray *) itemArray
{
return [cell itemArray];
return [_cell itemArray];
}
- (id <NSMenuItem>) itemAtIndex: (int)index
{
return [cell itemAtIndex: index];
return [_cell itemAtIndex: index];
}
- (NSString *) itemTitleAtIndex: (int)index
{
return [cell itemTitleAtIndex: index];
return [_cell itemTitleAtIndex: index];
}
- (NSArray *) itemTitles
{
return [cell itemTitles];
return [_cell itemTitles];
}
- (id <NSMenuItem>) itemWithTitle: (NSString *)title
{
return [cell itemWithTitle: title];
return [_cell itemWithTitle: title];
}
- (id <NSMenuItem>) lastItem
{
return [cell lastItem];
return [_cell lastItem];
}
- (int) indexOfItem: (id <NSMenuItem>)anObject
{
return [cell indexOfItem: anObject];
return [_cell indexOfItem: anObject];
}
- (int) indexOfItemWithTag: (int)tag
{
// FIXME: This clashes with an ivar!!
return [cell indexOfItemWithTag: tag];
return [_cell indexOfItemWithTag: tag];
}
- (int) indexOfItemWithTitle: (NSString *)title
{
return [cell indexOfItemWithTitle: title];
return [_cell indexOfItemWithTitle: title];
}
- (int) indexOfItemWithRepresentedObject: (id)anObject
{
return [cell indexOfItemWithRepresentedObject: anObject];
return [_cell indexOfItemWithRepresentedObject: anObject];
}
- (int) indexOfItemWithTarget: (id)target
andAction: (SEL)actionSelector
{
return [cell indexOfItemWithTarget: target andAction: actionSelector];
return [_cell indexOfItemWithTarget: target andAction: actionSelector];
}
- (void) setPreferredEdge: (NSRectEdge)edge
{
[cell setPreferredEdge: edge];
[_cell setPreferredEdge: edge];
}
- (NSRectEdge) preferredEdge
{
return [cell preferredEdge];
return [_cell preferredEdge];
}
- (void) setTitle: (NSString *)aString
{
[cell setTitle: aString];
[_cell setTitle: aString];
}
- (void) synchronizeTitleAndSelectedItem
{
[cell synchronizeTitleAndSelectedItem];
[_cell synchronizeTitleAndSelectedItem];
[self sizeToFit];
@ -294,7 +293,7 @@ Class _nspopupbuttonCellClass = 0;
- (void) mouseDown: (NSEvent *)theEvent
{
NSMenuView *mr = [[cell menu] menuRepresentation];
NSMenuView *mr = [[_cell menu] menuRepresentation];
NSEvent *e;
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
@ -305,7 +304,7 @@ Class _nspopupbuttonCellClass = 0;
object: self];
// Attach the popUp
[cell attachPopUpWithFrame: bounds
[_cell attachPopUpWithFrame: bounds
inView: self];
// Process events; we start menu events processing by converting
@ -327,7 +326,7 @@ Class _nspopupbuttonCellClass = 0;
[self synchronizeTitleAndSelectedItem];
// Dismiss the popUp
[cell dismissPopUp];
[_cell dismissPopUp];
// Send action to target
[super sendAction: [self action]

View file

@ -62,7 +62,7 @@
- (id)initWithFrame:(NSRect)frameRect
{
[super initWithFrame: frameRect];
[cell setEchosBullets:YES];
[_cell setEchosBullets:YES];
return self;
}

View file

@ -73,87 +73,87 @@ static Class cellClass;
- (NSImage *) image
{
return [cell image];
return [_cell image];
}
- (int) isVertical
{
return [cell isVertical];
return [_cell isVertical];
}
- (float) knobThickness
{
return [cell knobThickness];
return [_cell knobThickness];
}
- (void) setImage: (NSImage *)backgroundImage
{
[cell setImage: backgroundImage];
[_cell setImage: backgroundImage];
}
- (void) setKnobThickness: (float)aFloat
{
[cell setKnobThickness: aFloat];
[_cell setKnobThickness: aFloat];
}
- (void) setTitle: (NSString *)aString
{
[cell setTitle: aString];
[_cell setTitle: aString];
}
- (void) setTitleCell: (NSCell *)aCell
{
[cell setTitleCell: aCell];
[_cell setTitleCell: aCell];
}
- (void) setTitleColor: (NSColor *)aColor
{
[cell setTitleColor: aColor];
[_cell setTitleColor: aColor];
}
- (void) setTitleFont: (NSFont *)fontObject
{
[cell setTitleFont: fontObject];
[_cell setTitleFont: fontObject];
}
- (NSString *) title
{
return [cell title];
return [_cell title];
}
- (id) titleCell
{
return [cell titleCell];
return [_cell titleCell];
}
- (NSColor *) titleColor
{
return [cell titleColor];
return [_cell titleColor];
}
- (NSFont *) titleFont
{
return [cell titleFont];
return [_cell titleFont];
}
- (double) maxValue
{
return [cell maxValue];
return [_cell maxValue];
}
- (double) minValue
{
return [cell minValue];
return [_cell minValue];
}
- (void) setMaxValue: (double)aDouble
{
[cell setMaxValue: aDouble];
[_cell setMaxValue: aDouble];
}
- (void) setMinValue: (double)aDouble
{
[cell setMinValue: aDouble];
[_cell setMinValue: aDouble];
}
- (BOOL) acceptsFirstMouse: (NSEvent *)theEvent
@ -163,12 +163,12 @@ static Class cellClass;
- (void) drawRect: (NSRect)rect
{
[cell drawWithFrame: rect inView: self];
[_cell drawWithFrame: rect inView: self];
}
- (float)_floatValueForMousePoint: (NSPoint)point knobRect: (NSRect)knobRect
{
NSSliderCell* theCell = cell;
NSSliderCell* theCell = _cell;
NSRect slotRect = [theCell trackRect];
BOOL isVertical = [theCell isVertical];
float minValue = [theCell minValue];
@ -229,8 +229,8 @@ static Class cellClass;
| NSPeriodicMask;
NSPoint point = [self convertPoint: [theEvent locationInWindow] fromView: nil];
NSEventType eventType = [theEvent type];
BOOL isContinuous = [cell isContinuous];
NSSliderCell* theCell = cell;
BOOL isContinuous = [_cell isContinuous];
NSSliderCell* theCell = _cell;
float oldFloatValue = [theCell floatValue];
id target = [theCell target];
SEL action = [theCell action];
@ -278,7 +278,7 @@ static Class cellClass;
- (void) mouseDown: (NSEvent *)theEvent
{
NSPoint location = [self convertPoint: [theEvent locationInWindow]fromView: nil];
NSSliderCell* theCell = cell;
NSSliderCell* theCell = _cell;
NSRect rect;
rect = [theCell knobRectFlipped: [self isFlipped]];

View file

@ -60,11 +60,11 @@
- (id) initWithFrame: (NSRect)frameRect
{
[super initWithFrame: frameRect];
[cell setState: 1];
[cell setBezeled: YES];
[cell setSelectable: YES];
[cell setEnabled: YES];
[cell setEditable: YES];
[_cell setState: 1];
[_cell setBezeled: YES];
[_cell setSelectable: YES];
[_cell setEnabled: YES];
[_cell setEditable: YES];
[self setDrawsBackground: YES];
_text_object = nil;
@ -88,24 +88,24 @@
//
- (BOOL) isEditable
{
return [cell isEditable];
return [_cell isEditable];
}
- (BOOL) isSelectable
{
return [cell isSelectable];
return [_cell isSelectable];
}
- (void) setEditable: (BOOL)flag
{
[cell setEditable: flag];
[_cell setEditable: flag];
if (_text_object)
[_text_object setEditable: flag];
}
- (void) setSelectable: (BOOL)flag
{
[cell setSelectable: flag];
[_cell setSelectable: flag];
if (_text_object)
[_text_object setSelectable: flag];
}
@ -129,8 +129,8 @@
return;
// [NSCursor hide];
_text_object = [cell setUpFieldEditorAttributes: t];
[cell selectWithFrame: bounds
_text_object = [_cell setUpFieldEditorAttributes: t];
[_cell selectWithFrame: bounds
inView: self
editor: _text_object
delegate: self
@ -195,52 +195,52 @@
//
- (void) setBackgroundColor: (NSColor *)aColor
{
[cell setBackgroundColor: aColor];
[_cell setBackgroundColor: aColor];
}
- (NSColor *) backgroundColor
{
return [cell backgroundColor];
return [_cell backgroundColor];
}
- (BOOL) drawsBackground
{
return [cell drawsBackground];
return [_cell drawsBackground];
}
- (BOOL) isBezeled
{
return [cell isBezeled];
return [_cell isBezeled];
}
- (BOOL) isBordered
{
return [cell isBordered];
return [_cell isBordered];
}
- (void) setBezeled: (BOOL)flag
{
[cell setBezeled: flag];
[_cell setBezeled: flag];
}
- (void) setBordered: (BOOL)flag
{
[cell setBordered: flag];
[_cell setBordered: flag];
}
- (void) setDrawsBackground: (BOOL)flag
{
[cell setDrawsBackground: flag];
[_cell setDrawsBackground: flag];
}
- (void) setTextColor: (NSColor *)aColor
{
[cell setTextColor: aColor];
[_cell setTextColor: aColor];
}
- (NSColor *) textColor
{
return [cell textColor];
return [_cell textColor];
}
//
@ -285,8 +285,8 @@
// [NSCursor hide];
_text_object = [cell setUpFieldEditorAttributes: t];
[cell editWithFrame: bounds
_text_object = [_cell setUpFieldEditorAttributes: t];
[_cell editWithFrame: bounds
inView: self
editor: _text_object
delegate: self
@ -312,7 +312,7 @@
if (_text_object)
{
[_text_object setString: @""];
[cell endEditing: _text_object];
[_cell endEditing: _text_object];
_text_object = nil;
return YES;
}
@ -331,7 +331,7 @@
- (void) validateEditing
{
if (_text_object)
[cell setStringValue: [_text_object text]];
[_cell setStringValue: [_text_object text]];
}
- (void) textDidBeginEditing: (NSNotification *)aNotification
@ -372,7 +372,7 @@
object: self
userInfo: d];
[cell endEditing: [aNotification object]];
[_cell endEditing: [aNotification object]];
textMovement = [[aNotification userInfo] objectForKey: @"NSTextMovement"];
if (textMovement)
@ -408,7 +408,7 @@
- (BOOL) textShouldEndEditing: (NSText *)aTextObject
{
if ([cell isEntryAcceptable: [aTextObject text]] == NO)
if ([_cell isEntryAcceptable: [aTextObject text]] == NO)
{
[self sendAction: _error_action to: [self target]];
return NO;