version 1.4, 2006/03/08 04:58:14 |
version 1.7, 2007/09/29 05:49:23 |
Line 245 static NSMenuItem *menuItemPrettyPrint = nil; // pret |
|
Line 245 static NSMenuItem *menuItemPrettyPrint = nil; // pret |
|
NSLog(@"myDocumentSaidTheMessageAboutX=%d\n",myDocumentSaidTheMessageAboutX); |
NSLog(@"myDocumentSaidTheMessageAboutX=%d\n",myDocumentSaidTheMessageAboutX); |
if (!myDocumentSaidTheMessageAboutX) { |
if (!myDocumentSaidTheMessageAboutX) { |
if ([MyEnvironment checkX] != 1) |
if ([MyEnvironment checkX] != 1) |
[self messageDialog: |
// [self messageDialog: |
NSLocalizedString(@"A few commands (plot, ...) cannot be used, because X11 is not running.",nil) with: 0]; |
// NSLocalizedString(@"A few commands (plot, ...) cannot be used, because X11 is not running.",nil) with: 0]; |
|
[self changeOutputCounterFieldWithString: |
|
[NSLocalizedString(@"Output mini-view: ",nil) stringByAppendingString: |
|
NSLocalizedString(@"A few commands (plot, ...) cannot be used, because X11 is not running.",nil)]]; |
myDocumentSaidTheMessageAboutX = 1; |
myDocumentSaidTheMessageAboutX = 1; |
} |
} |
} |
} |
Line 289 static NSMenuItem *menuItemPrettyPrint = nil; // pret |
|
Line 292 static NSMenuItem *menuItemPrettyPrint = nil; // pret |
|
[textViewIn replaceCharactersInRange: NSMakeRange(pos,0) withString: @"\n"]; |
[textViewIn replaceCharactersInRange: NSMakeRange(pos,0) withString: @"\n"]; |
} |
} |
cmd0 = [cmd0 substringWithRange:r ]; |
cmd0 = [cmd0 substringWithRange:r ]; |
} |
} |
|
[self outputBorderLine: [NSColor magentaColor]]; |
|
[self outputString: cmd0]; |
|
if ([cmd0 length] > 0) { |
|
if ([cmd0 characterAtIndex: ([cmd0 length]-1)] != 0xa) [self outputString: @"\n"]; |
|
} |
|
[self outputBorderLine: [NSColor yellowColor]]; |
}else{ |
}else{ |
cmd0 = [textViewIn string]; |
cmd0 = [textViewIn string]; |
MyOutputWindowController *mc; |
MyOutputWindowController *mc; |
Line 408 static NSMenuItem *menuItemPrettyPrint = nil; // pret |
|
Line 417 static NSMenuItem *menuItemPrettyPrint = nil; // pret |
|
else [mc outputStringToOutputWindow: amt]; |
else [mc outputStringToOutputWindow: amt]; |
} |
} |
} |
} |
|
-(void)outputBorderLine: (NSColor *)color { |
|
MyOutputWindowController *mc; |
|
mc = [MyOutputWindowController sharedMyOutputWindowController: self]; |
|
[mc outputStringToOutputWindow: @"----------------------------------------\n" withColor: color]; |
|
} |
- (void) outputErrorString: (NSString *) amt { |
- (void) outputErrorString: (NSString *) amt { |
int oldEnd; |
int oldEnd; |
int newEnd; |
int newEnd; |
Line 1051 int debugInbound = 0; |
|
Line 1065 int debugInbound = 0; |
|
-(void)openGLMeta: (NSString *) cmd to: (int) gid{ |
-(void)openGLMeta: (NSString *) cmd to: (int) gid{ |
MyOpenGLController *oglc; |
MyOpenGLController *oglc; |
oglc = [MyOpenGLController getOglWindow: gid]; |
oglc = [MyOpenGLController getOglWindow: gid]; |
if (!oglc) {[self outputErrorString: [NSString stringWithFormat: @"Invalid gid %d in openGLMeta\n",gid]]; return; } |
if (!oglc) {[self printErrorMessage: |
|
[NSString stringWithFormat: @"Invalid gid %d in openGLMeta command %@\n",gid,cmd]]; return; } |
if ([cmd hasPrefix: @"meta_showListOfOglComm"]) { |
if ([cmd hasPrefix: @"meta_showListOfOglComm"]) { |
[self showListOfOglComm: gid]; return ; |
[self showListOfOglComm: gid]; return ; |
}else if ([cmd hasPrefix: @"meta_removeAllInit"]) { // longer command must come first, because we use prefix. |
}else if ([cmd hasPrefix: @"meta_removeAllInit"]) { // longer command must come first, because we use prefix. |
Line 1063 int debugInbound = 0; |
|
Line 1078 int debugInbound = 0; |
|
}else if ([cmd hasPrefix: @"meta_removeLast"]) { |
}else if ([cmd hasPrefix: @"meta_removeLast"]) { |
[oglc removeLastOfOglComm]; |
[oglc removeLastOfOglComm]; |
}else{ |
}else{ |
[self outputErrorString: [NSString stringWithFormat: @"Unknown OpenGL meta command %@\n",cmd]]; |
[self printErrorMessage: [NSString stringWithFormat: @"Unknown OpenGL meta command %@\n",cmd]]; |
} |
} |
} |
} |
-(void) showListOfOglComm: (int) gid { |
-(void) showListOfOglComm: (int) gid { |
Line 1108 int debugInbound = 0; |
|
Line 1123 int debugInbound = 0; |
|
// NSLog(@"%@",a); |
// NSLog(@"%@",a); |
if ([[a objectAtIndex: 0] hasPrefix: @"notAvailable"]) { |
if ([[a objectAtIndex: 0] hasPrefix: @"notAvailable"]) { |
[self messageDialog: |
[self messageDialog: |
NSLocalizedString(@"Typeset the output by TeX is not available. latex, dvips, and pstoimg must be installed.",nil) with: 0]; |
NSLocalizedString(@"Typeset the output by TeX is not available. latex and dvipng must be installed.",nil) with: 0]; |
prettyPrint = 1; [self setPrettyPrint: nil]; |
prettyPrint = 1; [self setPrettyPrint: nil]; |
return; |
return; |
} else if ([[a objectAtIndex: 0] compare: @"showFile"] == NSOrderedSame) { |
} else if ([[a objectAtIndex: 0] compare: @"showFile"] == NSOrderedSame) { |