This is ScoreGoal.m in view mode; [Download] [Up]
// ScoreGoal.m // Project: Cribbage // Stephan Wacker // 93-09-27 #import "ScoreGoal.h" #import "Cribbage.h" #import "Preferences.h" @implementation ScoreGoal - initFrame: (const NXRect *) frameRect { [super initFrame: frameRect]; [self setOpaque: NO]; return self; } - (int) limit { id preferences = [[NXApp delegate] preferences]; if( preferences ) { return [preferences limit]; } else { return [Preferences defaultLimit]; } } - (NXPoint) pegCoords // // Return center of the view. // { NXPoint result; result.x = NX_MIDX(&bounds); result.y = NX_MIDY(&bounds); return result; } @end // ScoreGoal
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.