| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  | //
 | 
					
						
							|  |  |  | //  FileSettings.h
 | 
					
						
							|  |  |  | //  PythonLauncher
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | //  Created by Jack Jansen on Sun Jul 21 2002.
 | 
					
						
							|  |  |  | //  Copyright (c) 2002 __MyCompanyName__. All rights reserved.
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #import <Foundation/Foundation.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @protocol FileSettingsSource | 
					
						
							|  |  |  | - (NSString *) interpreter; | 
					
						
							| 
									
										
										
										
											2003-02-17 15:40:00 +00:00
										 |  |  | - (BOOL) honourhashbang; | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  | - (BOOL) debug; | 
					
						
							|  |  |  | - (BOOL) verbose; | 
					
						
							|  |  |  | - (BOOL) inspect; | 
					
						
							|  |  |  | - (BOOL) optimize; | 
					
						
							|  |  |  | - (BOOL) nosite; | 
					
						
							|  |  |  | - (BOOL) tabs; | 
					
						
							|  |  |  | - (NSString *) others; | 
					
						
							|  |  |  | - (BOOL) with_terminal; | 
					
						
							| 
									
										
										
										
											2003-06-20 22:21:03 +00:00
										 |  |  | - (NSString *) scriptargs; | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  | @end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @interface FileSettings : NSObject <FileSettingsSource> | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     NSString *interpreter;	// The pathname of the interpreter to use
 | 
					
						
							| 
									
										
										
										
											2002-12-26 22:10:53 +00:00
										 |  |  |     NSArray *interpreters;	// List of known interpreters
 | 
					
						
							| 
									
										
										
										
											2003-02-17 15:40:00 +00:00
										 |  |  |     BOOL honourhashbang;	// #! line overrides interpreter
 | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  |     BOOL debug;			// -d option: debug parser
 | 
					
						
							|  |  |  |     BOOL verbose;		// -v option: verbose import
 | 
					
						
							|  |  |  |     BOOL inspect;		// -i option: interactive mode after script
 | 
					
						
							|  |  |  |     BOOL optimize;		// -O option: optimize bytecode
 | 
					
						
							|  |  |  |     BOOL nosite;		// -S option: don't import site.py
 | 
					
						
							|  |  |  |     BOOL tabs;			// -t option: warn about inconsistent tabs
 | 
					
						
							|  |  |  |     NSString *others;		// other options
 | 
					
						
							| 
									
										
										
										
											2003-06-20 22:21:03 +00:00
										 |  |  |     NSString *scriptargs;	// script arguments (not for preferences)
 | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  |     BOOL with_terminal;		// Run in terminal window
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     FileSettings *origsource; | 
					
						
							|  |  |  |     NSString *prefskey; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | + (id)getDefaultsForFileType: (NSString *)filetype; | 
					
						
							| 
									
										
										
										
											2002-11-25 13:11:06 +00:00
										 |  |  | + (id)getFactorySettingsForFileType: (NSString *)filetype; | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  | + (id)newSettingsForFileType: (NSString *)filetype; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-11-25 13:11:06 +00:00
										 |  |  | //- (id)init;
 | 
					
						
							|  |  |  | - (id)initForFileType: (NSString *)filetype; | 
					
						
							|  |  |  | - (id)initForFSDefaultFileType: (NSString *)filetype; | 
					
						
							|  |  |  | - (id)initForDefaultFileType: (NSString *)filetype; | 
					
						
							|  |  |  | //- (id)initWithFileSettings: (FileSettings *)source;
 | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | - (void)updateFromSource: (id <FileSettingsSource>)source; | 
					
						
							|  |  |  | - (NSString *)commandLineForScript: (NSString *)script; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-11-25 13:11:06 +00:00
										 |  |  | //- (void)applyFactorySettingsForFileType: (NSString *)filetype;
 | 
					
						
							|  |  |  | //- (void)saveDefaults;
 | 
					
						
							|  |  |  | //- (void)applyUserDefaults: (NSString *)filetype;
 | 
					
						
							|  |  |  | - (void)applyValuesFromDict: (NSDictionary *)dict; | 
					
						
							|  |  |  | - (void)reset; | 
					
						
							| 
									
										
										
										
											2002-12-26 22:10:53 +00:00
										 |  |  | - (NSArray *) interpreters; | 
					
						
							| 
									
										
										
										
											2002-07-29 21:36:35 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | @end |