ftp.nice.ch/Attic/openStep/implementation/gnustep/sources/objcX-0.87.tgz#/objcX-0.87/appkit/TextFieldCell.m

This is TextFieldCell.m in view mode; [Download] [Up]

/* Implementation of TextFieldCell class
 *
 * Copyright (C)  1993  The Board of Trustees of  
 * The Leland Stanford Junior University.  All Rights Reserved.
 *
 * Authors: Scott Francis, Paul Kunz, and Libing Wang
 *
 * This file is part of an Objective-C class library for a window system
 *
 * TextFieldCell.m,v 1.37 1995/12/13 22:33:23 fedor Exp
 */
 
#include "TextFieldCell.h"

extern char *TextFieldCellInstanceName(void); /* in widget set category */

@implementation TextFieldCell:ActionCell

- init
{
    [super init];
    instancename = TextFieldCellInstanceName();
    [self _init];
    _isLabel = NO;
    return self;
}

- initTextCell:(const char *)aString
{
  return [super initTextCell: aString];
}

- copyFromZone:(NSZone *)zone
{
    TextFieldCell	*newCell;
    
    newCell = [super copyFromZone:zone];
    if ( _isLabel ) {
        [newCell _initAsLabel];
    }
    return newCell;
}

- (BOOL)isOpaque
{
  return [super isOpaque];
}

- (float)backgroundGray
{
  [self notImplemented:_cmd];
  return 0;
}

- setBezeled:(BOOL)flag
{
  return [super setBezeled: flag];
}

- setBackgroundGray:(float)value
{
  [self notImplemented:_cmd];
  return 0;
}

- (float)textGray
{
  [self notImplemented:_cmd];
  return 0;
}

- setTextGray:(float)value
{
 /*
  * Only used in HippoDraw to obscure text by setting it same color as
  * background.   We can work around not having it 
  */
    return self;
}

- setBackgroundColor:(NXColor)color
{
  [self notImplemented:_cmd];
  return 0;
}

- (NXColor)backgroundColor
{
  NXColor color;
  [self notImplemented:_cmd];
  return color;
}

- setBackgroundTransparent:(BOOL)flag
{
  [self notImplemented:_cmd];
  return 0;
}

- (BOOL)isBackgroundTransparent
{
  [self notImplemented:_cmd];
  return 0;
}

- setTextColor:(NXColor)color
{
  [self notImplemented:_cmd];
  return 0;
}

- (NXColor)textColor
{
  NXColor color;
  [self notImplemented:_cmd];
  return color;
}

- drawSelf:(const NXRect *)cellFrame inView:controlView
{
  return self;
}

- drawInside:(const NXRect *)cellFrame inView:controlView
{
  [self notImplemented:_cmd];
  return 0;
}

- setTextAttributes:textObj
{
  [self notImplemented:_cmd];
  return 0;
}

- (BOOL)trackMouse:(NXEvent *)event inRect:(const NXRect *)aRect ofView:controlView
{
  [self notImplemented:_cmd];
  return 0;
}


/* Archiving methods */
- read:(NXTypedStream *)stream
{
  [super read:stream];
  return self;
}

- awake
{
    [super awake];

    instancename = TextFieldCellInstanceName();
    if ( _isLabel ) {
        [self _initAsLabel];
    } else {
	[self _init];
    }
    return self;
}

- write:(TypedStream*)typedStream
{
  [super write:typedStream];
  return self;
}

- setStringValue:(const char *)aString
{

 /* Over-ride super class so we can set the widget's contents */
    [super setStringValue:aString];
    [self _setStringValue];
    return self;
}
- (const char *)stringValue
{
    return [self _stringValue];
}

//- setState
//{
//    [super setState:0];
//    return self;
//}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.