ftp.nice.ch/pub/next/tools/screen/backspace/additions/BMV.0.01.N.bs.tar.gz#/BMV/FooFaraw.m

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

#import "FooFaraw.h"
#import <appkit/NXImage.h>
#import <appkit/Window.h>
#import <appkit/Panel.h>                // for NXRunAlertPanel()
#import <dpsclient/wraps.h>
#import <libc.h>
#import <math.h>

@implementation FooFaraw : View
- (BOOL) advancedCommandSet {return YES;}
- (BOOL) ignoreMouseMovement {return YES;}

- commandKey
{
  bigMode = (bigMode ? NO : YES);
  return self;
}


- initFrame:(NXRect *)frameRect
{
  [super initFrame:frameRect];
  [self newSize];
  winNum=[[self window] windowNum];
  return self;
}

- sizeTo:(NXCoord)width :(NXCoord)height
{
  [super sizeTo:width :height];
  [self newSize];
  return self;
}

- newSize
{
  urx=bounds.size.width;
  ury=bounds.size.height;
  
  midx=urx/2;
  midy=ury/2;

  n = 0;
  t = 0;
  
  // phases of the three points;
  p1=0;
  p2=(4*M_PI)/3;
  p3=(2*M_PI)/3;
  
  // starting angle of each point;
  t1[0]=0;
  t2[0]=p2;
  t3[0]=p3;


  // s1 and s2 should define an oval that takes up middle 75% of the screen
  s1 = midx*0.5; s2 = midy*0.5;
  s3 = midx*0.5; s4 = midy*0.5;

  n=lper;
  p=(lper/3)*2;
  pp=(lper/3);

  return self;
}
@end


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