home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula
/
nebula.bin
/
SourceCode
/
xView
/
xView.m
< prev
next >
Wrap
Text File
|
1993-01-19
|
1KB
|
57 lines
/* Generated by Interface Builder */
#import "xView.h"
#import "theX.h"
#import <appkit/graphics.h>
#import <appkit/Scroller.h>
#import <appkit/color.h>
#import <appkit/NXColorWell.h>
#import <appkit/NXColorPanel.h>
@implementation xView
-changeMade:sender;
{
[self display];
return self;
}
-appWillInit:sender;
{
id theColorPanel;
[xColorWell setColor:NX_COLORYELLOW];
[backColorWell setColor:NX_COLORPURPLE];
[widthScroller setFloatValue:5];
theColorPanel = [NXColorPanel newColorMask: NX_ALLMODESMASK];
[theColorPanel setContinuous:YES];
[theColorPanel setShowAlpha:NO];
[self display];
return self;
}
- drawSelf:(NXRect *)rects :(int)count
{
NXRect theRect;
float penWidth;
float backRed,backGreen,backBlue;
float xRed,xGreen,xBlue;
static int x=0;
[self getFrame:&theRect];
penWidth = [widthScroller floatValue];
NXConvertColorToRGBA ([backColorWell color], &backRed,&backGreen,&backBlue, NULL);
NXConvertColorToRGBA ([xColorWell color], &xRed,&xGreen,&xBlue, NULL);
drawX(theRect.size.width, theRect.size.height,
penWidth ,
backRed,backGreen,backBlue,
xRed,xGreen,xBlue);
printf("drawSelf %d \n",x++);
return self;
}
@end