2004-07-12 04:16:09 +00:00
|
|
|
/* All Rights reserved */
|
|
|
|
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
|
|
|
|
@interface GormFilePrefsManager : NSObject <NSCoding>
|
|
|
|
{
|
|
|
|
id showIncompatibilities;
|
|
|
|
id targetVersion;
|
|
|
|
id gormAppVersion;
|
|
|
|
id archiveType;
|
|
|
|
id iwindow;
|
|
|
|
id itable;
|
2006-10-04 04:16:47 +00:00
|
|
|
id fileType;
|
|
|
|
|
2004-07-12 04:16:09 +00:00
|
|
|
// encoded ivars...
|
|
|
|
int version;
|
|
|
|
NSString *targetVersionName;
|
|
|
|
NSString *archiveTypeName;
|
|
|
|
|
|
|
|
// version profiles...
|
|
|
|
NSDictionary *versionProfiles;
|
|
|
|
NSDictionary *currentProfile;
|
|
|
|
}
|
2005-07-30 08:21:57 +00:00
|
|
|
/**
|
|
|
|
* Show incompatibilities in the panel.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (void) showIncompatibilities: (id)sender;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Action called when the target version pulldown is selected.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (void) selectTargetVersion: (id)sender;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Action called when the archive type pulldown is selected.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (void) selectArchiveType: (id)sender;
|
|
|
|
|
2006-06-05 02:12:00 +00:00
|
|
|
/**
|
|
|
|
* Loads the encoded file info.
|
|
|
|
*/
|
|
|
|
- (BOOL) loadFromData: (NSData *)data;
|
|
|
|
|
2005-07-30 08:21:57 +00:00
|
|
|
/**
|
|
|
|
* Loads the encoded file info.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (BOOL) loadFromFile: (NSString *)path;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
2006-06-05 02:12:00 +00:00
|
|
|
/**
|
|
|
|
* Saves the encoded file info.
|
|
|
|
*/
|
|
|
|
- (NSData *) data;
|
|
|
|
|
2006-08-01 04:16:34 +00:00
|
|
|
/**
|
|
|
|
* Saves the encoded file info.
|
|
|
|
*/
|
2006-08-15 06:18:50 +00:00
|
|
|
- (NSData *) nibDataWithOpenItems: (NSArray *)openItems;
|
2006-08-01 04:16:34 +00:00
|
|
|
|
2005-07-30 08:21:57 +00:00
|
|
|
/**
|
|
|
|
* Saves the encoded file info.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (BOOL) saveToFile: (NSString *)path;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Loads the profile.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (void) loadProfile: (NSString *)version;
|
|
|
|
|
|
|
|
// accessors...
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gorm Version of the current archive.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (int) version;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Which version of the gui library, by name.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (NSString *)targetVersionName;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Which achive type, by name.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (NSString *)archiveTypeName;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Are we set to the latest version? Returns YES, if so.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (BOOL) isLatest;
|
|
|
|
|
|
|
|
// set class versions
|
2005-07-30 08:21:57 +00:00
|
|
|
/**
|
|
|
|
* Sets the version of the classes.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (void) setClassVersions;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Restores the versions to the most current.
|
|
|
|
*/
|
2004-07-12 04:16:09 +00:00
|
|
|
- (void) restoreClassVersions;
|
2005-07-30 08:21:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the version of the class in the current profile.
|
|
|
|
*/
|
2005-07-30 08:10:01 +00:00
|
|
|
- (int) versionOfClass: (NSString *)className;
|
2004-11-04 02:49:23 +00:00
|
|
|
|
2006-10-04 04:16:47 +00:00
|
|
|
// file type...
|
|
|
|
/**
|
|
|
|
* File type name...
|
|
|
|
*/
|
|
|
|
- (void) setFileTypeName: (NSString *)ft;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* return file type.
|
|
|
|
*/
|
|
|
|
- (NSString *) fileTypeName;
|
|
|
|
|
2005-07-30 08:21:57 +00:00
|
|
|
/**
|
|
|
|
* The current Gorm version.
|
|
|
|
*/
|
2004-11-04 02:49:23 +00:00
|
|
|
+ (int) currentVersion;
|
2004-07-12 04:16:09 +00:00
|
|
|
@end
|