Jack Jansen | 3bbb617 | 2002-07-29 21:36:35 +0000 | [diff] [blame^] | 1 | // |
| 2 | // FileSettings.h |
| 3 | // PythonLauncher |
| 4 | // |
| 5 | // Created by Jack Jansen on Sun Jul 21 2002. |
| 6 | // Copyright (c) 2002 __MyCompanyName__. All rights reserved. |
| 7 | // |
| 8 | |
| 9 | #import <Foundation/Foundation.h> |
| 10 | |
| 11 | @protocol FileSettingsSource |
| 12 | - (NSString *) interpreter; |
| 13 | - (BOOL) debug; |
| 14 | - (BOOL) verbose; |
| 15 | - (BOOL) inspect; |
| 16 | - (BOOL) optimize; |
| 17 | - (BOOL) nosite; |
| 18 | - (BOOL) tabs; |
| 19 | - (NSString *) others; |
| 20 | - (BOOL) with_terminal; |
| 21 | @end |
| 22 | |
| 23 | @interface FileSettings : NSObject <FileSettingsSource> |
| 24 | { |
| 25 | NSString *interpreter; // The pathname of the interpreter to use |
| 26 | BOOL debug; // -d option: debug parser |
| 27 | BOOL verbose; // -v option: verbose import |
| 28 | BOOL inspect; // -i option: interactive mode after script |
| 29 | BOOL optimize; // -O option: optimize bytecode |
| 30 | BOOL nosite; // -S option: don't import site.py |
| 31 | BOOL tabs; // -t option: warn about inconsistent tabs |
| 32 | NSString *others; // other options |
| 33 | BOOL with_terminal; // Run in terminal window |
| 34 | |
| 35 | FileSettings *origsource; |
| 36 | NSString *prefskey; |
| 37 | } |
| 38 | |
| 39 | + (id)getDefaultsForFileType: (NSString *)filetype; |
| 40 | + (id)newSettingsForFileType: (NSString *)filetype; |
| 41 | |
| 42 | - (id)init; |
| 43 | - (id)initWithFileSettings: (FileSettings *)source; |
| 44 | |
| 45 | - (void)updateFromSource: (id <FileSettingsSource>)source; |
| 46 | - (NSString *)commandLineForScript: (NSString *)script; |
| 47 | |
| 48 | - (id)factorySettingsForFileType: (NSString *)filetype; |
| 49 | - (void)saveDefaults; |
| 50 | - (void)updateFromUserDefaults: (NSString *)filetype; |
| 51 | |
| 52 | |
| 53 | @end |