-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.r-project.org/R-packages/trunk/Mac-GUI@568 694ef91d-65df-0310-b7bb-92e67a308ead
- Loading branch information
0 parents
commit b5ddc38
Showing
98 changed files
with
49,470 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* DataManager */ | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface DataManager : NSObject | ||
{ | ||
IBOutlet NSTableView *RDataSource; | ||
IBOutlet id dataInfoView; | ||
id DataManagerWindow; | ||
|
||
} | ||
|
||
- (id) window; | ||
- (IBAction)loadRData:(id)sender; | ||
- (IBAction)showHelp:(id)sender; | ||
|
||
+ (void) toggleDataManager; | ||
+ (void) reloadData; | ||
+ (id) getDMController; | ||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#import "DataManager.h" | ||
#import "RController.h" | ||
#import "REngine.h" | ||
|
||
#import <WebKit/WebKit.h> | ||
#import <WebKit/WebFrame.h> | ||
|
||
static id sharedDMController; | ||
extern int NumOfDSets; | ||
|
||
extern char **d_name; | ||
extern char **d_pkg; | ||
extern char **d_desc; | ||
extern char **d_url; | ||
|
||
@implementation DataManager | ||
|
||
- (void)awakeFromNib | ||
{ | ||
[RDataSource setDoubleAction:@selector(loadRData:)]; | ||
[RDataSource setTarget: sharedDMController]; | ||
} | ||
|
||
- (id)init | ||
{ | ||
|
||
self = [super init]; | ||
if (self) { | ||
sharedDMController = self; | ||
// Add your subclass-specific initialization here. | ||
// If an error occurs here, send a [self release] message and return nil. | ||
|
||
|
||
} | ||
|
||
return self; | ||
} | ||
|
||
- (void)dealloc { | ||
[super dealloc]; | ||
} | ||
|
||
/* These two routines are needed to update the History TableView */ | ||
- (int)numberOfRowsInTableView: (NSTableView *)tableView | ||
{ | ||
return NumOfDSets; | ||
} | ||
|
||
- (id)tableView: (NSTableView *)tableView | ||
objectValueForTableColumn: (NSTableColumn *)tableColumn | ||
row: (int)row | ||
{ | ||
if([[tableColumn identifier] isEqualToString:@"data"]) | ||
return [NSString stringWithCString:d_name[row]]; | ||
else if([[tableColumn identifier] isEqualToString:@"package"]) | ||
return [NSString stringWithCString:d_pkg[row]]; | ||
else if([[tableColumn identifier] isEqualToString:@"description"]) | ||
return [NSString stringWithCString:d_desc[row]]; | ||
else return nil; | ||
|
||
} | ||
|
||
|
||
|
||
- (id) window | ||
{ | ||
return DataManagerWindow; | ||
} | ||
|
||
+ (id) getDMController{ | ||
return sharedDMController; | ||
} | ||
|
||
|
||
- (void) doReloadData | ||
{ | ||
[RDataSource reloadData]; | ||
} | ||
|
||
+ (void) reloadData | ||
{ | ||
[[DataManager getDMController] doReloadData]; | ||
|
||
} | ||
|
||
|
||
- (IBAction)loadRData:(id)sender | ||
{ | ||
int row = [sender selectedRow]; | ||
if(row>=0) | ||
// [[RController getRController] sendInput:[NSString stringWithFormat:@"data(%s,package=\"%s\")",d_name[row],d_pkg[row]]]; | ||
[[REngine mainEngine] evaluateString:[NSString stringWithFormat:@"data(%s,package=\"%s\")",d_name[row],d_pkg[row]]]; | ||
|
||
} | ||
|
||
- (IBAction)showHelp:(id)sender | ||
{ | ||
int row = [sender selectedRow]; | ||
if(row<0) return; | ||
NSString *urlText = [NSString stringWithFormat:@"file://%@",[NSString stringWithCString:d_url[row]]]; | ||
[[dataInfoView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlText]]]; | ||
} | ||
|
||
+ (void)toggleDataManager | ||
{ | ||
[DataManager reloadData]; | ||
[[[DataManager getDMController] window] orderFront:self]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{\rtf1\mac\ansicpg10000\cocoartf102 | ||
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} | ||
{\colortbl;\red255\green255\blue255;} | ||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural | ||
|
||
\f0\b\fs24 \cf0 R for Mac OS X Aqua GUI written by: | ||
\f1\b0 \ | ||
Stefano M. Iacus\ | ||
Simon Urbanek\ | ||
\ | ||
|
||
\f0\b R: Copyright \'a9 2004\ | ||
\f1\b0 The R Foundation \ | ||
for Statistical Computing\ | ||
http://www.R-project.org\ | ||
|
||
\f0\b \ | ||
Acknowledgments:\ | ||
\f1\b0 Cocoa Quartz device derived \ | ||
from a Byron Ellis' work\ | ||
\ | ||
|
||
\f0\b This version: | ||
\f1\b0 \ | ||
October 10 2004\ | ||
\ | ||
|
||
\f0\b Requires: | ||
\f1\b0 \ | ||
R 2.0.0\ | ||
Framework Version\ | ||
\ | ||
|
||
\f0\b Please send feedback to: | ||
\f1\b0 \ | ||
[email protected]\ | ||
[email protected]\ | ||
\ | ||
} |
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.