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) honourhashbang;
14 - (BOOL) debug;
15 - (BOOL) verbose;
16 - (BOOL) inspect;
17 - (BOOL) optimize;
18 - (BOOL) nosite;
19 - (BOOL) tabs;
20 - (NSString *) others;
21 - (BOOL) with_terminal;
22 - (NSString *) scriptargs;
23 @end
24 
25 @interface FileSettings : NSObject <FileSettingsSource>
26 {
27     NSString *interpreter;	// The pathname of the interpreter to use
28     NSArray *interpreters;	// List of known interpreters
29     BOOL honourhashbang;	// #! line overrides interpreter
30     BOOL debug;			// -d option: debug parser
31     BOOL verbose;		// -v option: verbose import
32     BOOL inspect;		// -i option: interactive mode after script
33     BOOL optimize;		// -O option: optimize bytecode
34     BOOL nosite;		// -S option: don't import site.py
35     BOOL tabs;			// -t option: warn about inconsistent tabs
36     NSString *others;		// other options
37     NSString *scriptargs;	// script arguments (not for preferences)
38     BOOL with_terminal;		// Run in terminal window
39 
40     FileSettings *origsource;
41     NSString *prefskey;
42 }
43 
44 + (id)getDefaultsForFileType: (NSString *)filetype;
45 + (id)getFactorySettingsForFileType: (NSString *)filetype;
46 + (id)newSettingsForFileType: (NSString *)filetype;
47 
48 - (id)initForFileType: (NSString *)filetype;
49 - (id)initForFSDefaultFileType: (NSString *)filetype;
50 - (id)initForDefaultFileType: (NSString *)filetype;
51 
52 - (void)updateFromSource: (id <FileSettingsSource>)source;
53 - (NSString *)commandLineForScript: (NSString *)script;
54 
55 - (void)applyValuesFromDict: (NSDictionary *)dict;
56 - (void)reset;
57 - (NSArray *) interpreters;
58 
59 @end
60