- (IBAction)printGraphDocument:(id)sender;
+- (void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)URL;
+
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
- (void)dealloc;
NSWindow *window = [self window];
if (![window isZoomed])
[window zoom:self];
+
+ [documentView setDelegate:self];
}
- (void)graphDocumentDidChange:(NSNotification*)notification
[documentView printWithInfo:[[self document] printInfo] autoRotate:NO];
}
+- (void)PDFViewWillClickOnLink:(PDFView *)sender withURL:(NSURL *)URL
+{
+ NSURL* baseURL = [[self document] fileURL];
+ NSURL* targetURL = [NSURL URLWithString:[URL absoluteString] relativeToURL:baseURL];
+ [[NSWorkspace sharedWorkspace] openURL:targetURL];
+}
+
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem
{
/* validate toolbar or menu items */