This is xtCell.m in view mode; [Download] [Up]
/* X ToolKit category implementation of Cell class
*
* Copyright (C) 1995 The Board of Trustees of
* The Leland Stanford Junior University. All Rights Reserved.
*
* Authors: Scott Francis, Fred Harris, Paul Kunz,
* Imran Qureshi, and Libing Wang
* At: Stanford Linear Accelerator Center, Stanford University and
* University of Hawaii
*
* This file is part of an Objective-C class library for X-Windows
*
* xtCell.m,v 1.3 1995/06/26 23:03:13 fedor Exp
*/
#include "Cell.h"
#include "xtCell.h"
char *xtCellInstanceName(void)
{
return "Cell";
}
@implementation Cell(ToolKit)
- _addArg:(const char *)name :(XtArgVal)value
{
Arg *args = arglist;
if (++numargs > allocedargs ) {
allocedargs = (allocedargs) ? 2*allocedargs : 10;
/* XtRealloc handles error checking and calling malloc if args
is NULL */
args = arglist = XtRealloc(arglist, (allocedargs)*sizeof(Arg));
}
XtSetArg(args[numargs-1], (char *)name, value);
return self;
}
- _setArg:(const char*)name to:(XtArgVal)value
{
if (widgetid) {
XtVaSetValues(widgetid, name, value, NULL);
} else {
[self _addArg:name :value];
}
return self;
}
- _getArg:(const char*)name into:(XtArgVal *)value
{
if (widgetid) {
XtVaGetValues(widgetid, name, value, NULL);
} else {
fprintf(stderr,"What? no id? in Cell\n");
}
return self;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.