Skip to content

Commit b5ddc38

Browse files
committed
first svn release of R Cocoa GUI
git-svn-id: https://svn.r-project.org/R-packages/trunk/Mac-GUI@568 694ef91d-65df-0310-b7bb-92e67a308ead
0 parents  commit b5ddc38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+49470
-0
lines changed

DataManager.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* DataManager */
2+
3+
#import <Cocoa/Cocoa.h>
4+
5+
@interface DataManager : NSObject
6+
{
7+
IBOutlet NSTableView *RDataSource;
8+
IBOutlet id dataInfoView;
9+
id DataManagerWindow;
10+
11+
}
12+
13+
- (id) window;
14+
- (IBAction)loadRData:(id)sender;
15+
- (IBAction)showHelp:(id)sender;
16+
17+
+ (void) toggleDataManager;
18+
+ (void) reloadData;
19+
+ (id) getDMController;
20+
@end
21+

DataManager.m

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#import "DataManager.h"
2+
#import "RController.h"
3+
#import "REngine.h"
4+
5+
#import <WebKit/WebKit.h>
6+
#import <WebKit/WebFrame.h>
7+
8+
static id sharedDMController;
9+
extern int NumOfDSets;
10+
11+
extern char **d_name;
12+
extern char **d_pkg;
13+
extern char **d_desc;
14+
extern char **d_url;
15+
16+
@implementation DataManager
17+
18+
- (void)awakeFromNib
19+
{
20+
[RDataSource setDoubleAction:@selector(loadRData:)];
21+
[RDataSource setTarget: sharedDMController];
22+
}
23+
24+
- (id)init
25+
{
26+
27+
self = [super init];
28+
if (self) {
29+
sharedDMController = self;
30+
// Add your subclass-specific initialization here.
31+
// If an error occurs here, send a [self release] message and return nil.
32+
33+
34+
}
35+
36+
return self;
37+
}
38+
39+
- (void)dealloc {
40+
[super dealloc];
41+
}
42+
43+
/* These two routines are needed to update the History TableView */
44+
- (int)numberOfRowsInTableView: (NSTableView *)tableView
45+
{
46+
return NumOfDSets;
47+
}
48+
49+
- (id)tableView: (NSTableView *)tableView
50+
objectValueForTableColumn: (NSTableColumn *)tableColumn
51+
row: (int)row
52+
{
53+
if([[tableColumn identifier] isEqualToString:@"data"])
54+
return [NSString stringWithCString:d_name[row]];
55+
else if([[tableColumn identifier] isEqualToString:@"package"])
56+
return [NSString stringWithCString:d_pkg[row]];
57+
else if([[tableColumn identifier] isEqualToString:@"description"])
58+
return [NSString stringWithCString:d_desc[row]];
59+
else return nil;
60+
61+
}
62+
63+
64+
65+
- (id) window
66+
{
67+
return DataManagerWindow;
68+
}
69+
70+
+ (id) getDMController{
71+
return sharedDMController;
72+
}
73+
74+
75+
- (void) doReloadData
76+
{
77+
[RDataSource reloadData];
78+
}
79+
80+
+ (void) reloadData
81+
{
82+
[[DataManager getDMController] doReloadData];
83+
84+
}
85+
86+
87+
- (IBAction)loadRData:(id)sender
88+
{
89+
int row = [sender selectedRow];
90+
if(row>=0)
91+
// [[RController getRController] sendInput:[NSString stringWithFormat:@"data(%s,package=\"%s\")",d_name[row],d_pkg[row]]];
92+
[[REngine mainEngine] evaluateString:[NSString stringWithFormat:@"data(%s,package=\"%s\")",d_name[row],d_pkg[row]]];
93+
94+
}
95+
96+
- (IBAction)showHelp:(id)sender
97+
{
98+
int row = [sender selectedRow];
99+
if(row<0) return;
100+
NSString *urlText = [NSString stringWithFormat:@"file://%@",[NSString stringWithCString:d_url[row]]];
101+
[[dataInfoView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlText]]];
102+
}
103+
104+
+ (void)toggleDataManager
105+
{
106+
[DataManager reloadData];
107+
[[[DataManager getDMController] window] orderFront:self];
108+
}
109+
110+
@end

English.lproj/Credits.rtf

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{\rtf1\mac\ansicpg10000\cocoartf102
2+
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
3+
{\colortbl;\red255\green255\blue255;}
4+
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
5+
6+
\f0\b\fs24 \cf0 R for Mac OS X Aqua GUI written by:
7+
\f1\b0 \
8+
Stefano M. Iacus\
9+
Simon Urbanek\
10+
\
11+
12+
\f0\b R: Copyright \'a9 2004\
13+
14+
\f1\b0 The R Foundation \
15+
for Statistical Computing\
16+
http://www.R-project.org\
17+
18+
\f0\b \
19+
Acknowledgments:\
20+
21+
\f1\b0 Cocoa Quartz device derived \
22+
from a Byron Ellis' work\
23+
\
24+
25+
\f0\b This version:
26+
\f1\b0 \
27+
October 10 2004\
28+
\
29+
30+
\f0\b Requires:
31+
\f1\b0 \
32+
R 2.0.0\
33+
Framework Version\
34+
\
35+
36+
\f0\b Please send feedback to:
37+
\f1\b0 \
38+
39+
40+
\
41+
}

English.lproj/InfoPlist.strings

752 Bytes
Binary file not shown.

English.lproj/MainMenu.nib/classes.nib

Lines changed: 170 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

English.lproj/MainMenu.nib/info.nib

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)