This is xmFormCell.m in view mode; [Download] [Up]
/* Motif WidgetSet category for implementation of FormCell class
*
* Copyright (C) 1994, 1995 The Board of Trustees of
* The Leland Stanford Junior University. All Rights Reserved.
*
* Authors: Scott Francis, Paul Kunz, Imran Qureshi, and Libing Wang
*
* This file is part of an Objective-C class library for X/Motif
*
* xmFormCell.m,v 1.6 1995/04/22 23:12:41 pfkeb Exp
*/
#include "FormCell.h"
#include "xtCell.h"
#include "TextFieldCell.h"
char *
FormCellInstanceName(void)
{
return "FormCell";
}
@implementation FormCell(WidgetSet)
- _getSizeAdjust:(NXSize *)size
{
return [textCell _getSizeAdjust:size];
}
- _setFrame:(const NXRect *)frame inView:(Control *)aView
{
NXRect textrect, titlerect;
NXSize size;
if (!frame){
fprintf(stderr, "FormCell: null frame received\n");
return nil;
}
[textCell _getSizeAdjust:&size];
/* set title frame */
titlerect = *frame;
titlerect.origin.x += (2 * size.width);
titlerect.size.width = [self titleWidth];
[titleCell _setFrame:&titlerect inView:controlView];
/* Set value frame */
textrect = *frame;
textrect.origin.x = titlerect.origin.x + titlerect.size.width;
textrect.size.width -= textrect.origin.x;
[textCell _setFrame:&textrect inView:controlView];
return self;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.