File: gnuviewController.m

package info (click to toggle)
gnuplot 3.5beta6.340-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 4,792 kB
  • ctags: 4,205
  • sloc: ansic: 41,878; asm: 539; makefile: 498; objc: 379; csh: 297; sh: 277; pascal: 194; perl: 138; lisp: 88
file content (92 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download | duplicates (6)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#import "gnuviewController.h"
#import "Controller.h"

@implementation gnuviewController

- window
{
	return window;
}

- gnuView
{
	return gnuView;
}

- windowWillClose:sender
{
	[sender setDelegate: nil];
	[controller termWillClose:self];

	return self;
}

- windowDidBecomeMain:sender
{
	[controller setKeyTerm:self];
	
	return self;
}

- activatePushed:sender
{	
	if ([sender state] == 1) {
		[controller setActiveTerm: self];
		[sender setTitle:"--- ACTIVE ---"];		
	}
	else {
		[controller setActiveTerm:nil];
		[sender setTitle:"Activate"];
	}
		
	return self;
}

- deactivate:sender
{
	[activateButton setState:0];
	[activateButton setTitle:"Activate"];
			
	return self;
}

- GVactivate:sender
{
	[activateButton setState:1];
	[activateButton setTitle:"--- ACTIVE ---"];
			
	return self;
}

- largerPushed:sender
{
	NXRect oldFrame;
	double factor;
	
	[[window contentView] getFrame:&oldFrame];
	
	factor = 1.3;
	
	[window sizeWindow:oldFrame.size.width*factor:oldFrame.size.height*factor];
	[[window contentView] display];

	return self;
}

- smallerPushed:sender
{
	NXRect oldFrame;
	double factor;

	[[window contentView] getFrame:&oldFrame];
	
	factor = 1.3;
	
	[window sizeWindow:oldFrame.size.width/factor:oldFrame.size.height/factor];
	[[window contentView] display];
	return self;
}



@end