File: ipanelobj.m

package info (click to toggle)
pgplot5 5.2.2-19.3
  • links: PTS
  • area: non-free
  • in suites: buster, stretch
  • size: 7,136 kB
  • ctags: 6,763
  • sloc: fortran: 39,792; ansic: 22,549; objc: 1,534; sh: 1,298; makefile: 385; perl: 234; pascal: 233; tcl: 190; awk: 51; csh: 25
file content (50 lines) | stat: -rw-r--r-- 1,341 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// ipanel creates and displays the pgview info panel.
//
// 1999-Feb-20 - [AFT]
//---
#import "ipanelobj.h"

@implementation ipanelobj

- showit
{
      static NSRect aRect = {{160.0, 500.0},{330.0,120.0}};
      NSWindow *aPanel;

      aPanel = [[NSWindow alloc] initWithContentRect:aRect
         styleMask:NSTitledWindowMask|NSClosableWindowMask
         backing:NSBackingStoreBuffered
         defer:NO];
      [aPanel setContentView:self];
      [aPanel setBackgroundColor:[NSColor whiteColor]];
      [aPanel setReleasedWhenClosed:YES];
      [aPanel setTitle:@"Info"];
      [aPanel display];
      [aPanel orderFront:self];
      return self;
}

- (void)drawRect:(NSRect)rects
{
      NSImage *myicon;
      static NSPoint iloc = {20.0, 45.0};

      PSmoveto(100.0, 80.0);
      PSselectfont("Times-Roman",24.0);
      PSshow("PGPLOT Viewer");
      PSmoveto(120.0,  50.0);
      PSselectfont("Times-Roman",16.0);
      PSshow("by Allyn Tennant");
      PSsetgray(0.25);
      PSmoveto(20.0,  9.0);
      PSselectfont("Times-Roman",10.0);
      PSshow("1999-Feb-20   X-ray Astronomy Group, Marshall Space Flight Center");
      PSmoveto(0.0, 25.0);
      PSlineto(350.0, 25.0);
      PSstroke();
      myicon=[NSApp applicationIconImage];
      [myicon compositeToPoint:iloc operation:NSCompositeSourceOver];
      return;
}

@end