blob: 80c11f1e5274738d982c4d0d1c14646573747a77 [file] [log] [blame]
Jack Jansen3bbb6172002-07-29 21:36:35 +00001//
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
Jack Jansenf044e092002-12-26 22:10:53 +000026 NSArray *interpreters; // List of known interpreters
Jack Jansen3bbb6172002-07-29 21:36:35 +000027 BOOL debug; // -d option: debug parser
28 BOOL verbose; // -v option: verbose import
29 BOOL inspect; // -i option: interactive mode after script
30 BOOL optimize; // -O option: optimize bytecode
31 BOOL nosite; // -S option: don't import site.py
32 BOOL tabs; // -t option: warn about inconsistent tabs
33 NSString *others; // other options
34 BOOL with_terminal; // Run in terminal window
35
36 FileSettings *origsource;
37 NSString *prefskey;
38}
39
40+ (id)getDefaultsForFileType: (NSString *)filetype;
Jack Jansen2095c062002-11-25 13:11:06 +000041+ (id)getFactorySettingsForFileType: (NSString *)filetype;
Jack Jansen3bbb6172002-07-29 21:36:35 +000042+ (id)newSettingsForFileType: (NSString *)filetype;
43
Jack Jansen2095c062002-11-25 13:11:06 +000044//- (id)init;
45- (id)initForFileType: (NSString *)filetype;
46- (id)initForFSDefaultFileType: (NSString *)filetype;
47- (id)initForDefaultFileType: (NSString *)filetype;
48//- (id)initWithFileSettings: (FileSettings *)source;
Jack Jansen3bbb6172002-07-29 21:36:35 +000049
50- (void)updateFromSource: (id <FileSettingsSource>)source;
51- (NSString *)commandLineForScript: (NSString *)script;
52
Jack Jansen2095c062002-11-25 13:11:06 +000053//- (void)applyFactorySettingsForFileType: (NSString *)filetype;
54//- (void)saveDefaults;
55//- (void)applyUserDefaults: (NSString *)filetype;
56- (void)applyValuesFromDict: (NSDictionary *)dict;
57- (void)reset;
Jack Jansenf044e092002-12-26 22:10:53 +000058- (NSArray *) interpreters;
Jack Jansen3bbb6172002-07-29 21:36:35 +000059
60@end