1// ipanel creates and displays the pgview info panel.
2//
3// 1999-Feb-20 - [AFT]
4//---
5#import "ipanelobj.h"
6
7@implementation ipanelobj
8
9- showit
10{
11      static NSRect aRect = {{160.0, 500.0},{330.0,120.0}};
12      NSWindow *aPanel;
13
14      aPanel = [[NSWindow alloc] initWithContentRect:aRect
15         styleMask:NSTitledWindowMask|NSClosableWindowMask
16         backing:NSBackingStoreBuffered
17         defer:NO];
18      [aPanel setContentView:self];
19      [aPanel setBackgroundColor:[NSColor whiteColor]];
20      [aPanel setReleasedWhenClosed:YES];
21      [aPanel setTitle:@"Info"];
22      [aPanel display];
23      [aPanel orderFront:self];
24      return self;
25}
26
27- (void)drawRect:(NSRect)rects
28{
29      NSImage *myicon;
30      static NSPoint iloc = {20.0, 45.0};
31
32      PSmoveto(100.0, 80.0);
33      PSselectfont("Times-Roman",24.0);
34      PSshow("PGPLOT Viewer");
35      PSmoveto(120.0,  50.0);
36      PSselectfont("Times-Roman",16.0);
37      PSshow("by Allyn Tennant");
38      PSsetgray(0.25);
39      PSmoveto(20.0,  9.0);
40      PSselectfont("Times-Roman",10.0);
41      PSshow("1999-Feb-20   X-ray Astronomy Group, Marshall Space Flight Center");
42      PSmoveto(0.0, 25.0);
43      PSlineto(350.0, 25.0);
44      PSstroke();
45      myicon=[NSApp applicationIconImage];
46      [myicon compositeToPoint:iloc operation:NSCompositeSourceOver];
47      return;
48}
49
50@end
51