//
//  MyDocument.h
//  TA2 hot
//
//  Created by matthew on Sat Apr 05 2003.
//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
//


#import <Cocoa/Cocoa.h>
#import "MyDocument.h"
#import "myProject.h"

@interface myProject : NSDocument
{
    int rawF, emptyF, exactF;
    int simpleF;
    int uniqueNumber;
    IBOutlet id emptyButton;
    IBOutlet id exactButton;
    IBOutlet id rawButton;
    IBOutlet id simpleButton;
    NSMutableArray *openFiles, *searchFiles;
    MyDocument *codeSource;
    MWFile *initFile;
    IBOutlet id codeListView;
    IBOutlet id codeSourceView;
    IBOutlet id codeSourceBox;
    IBOutlet id fileListView;
    IBOutlet id codeFileName;
    IBOutlet id myWindow;
    IBOutlet id searchListView;
    IBOutlet id searchStringView;
    IBOutlet id windowNameView;
    IBOutlet id coderIDView;
    IBOutlet id initFileName;
    
    IBOutlet id setName;
    IBOutlet id setMenu;
    NSMutableDictionary *codeList;

}

-(int) rawF;
-(int) exactF;
-(int) emptyF;
-(int) simpleF;

-(NSMutableString *) getDefinition: (NSString *) what;
- (void) shoveWindow;
- (void)windowDidUpdate:(NSNotification *)aNotification;
- (BOOL) fileExists: (NSString *) who;
- (BOOL) isInitFile: (MWFile *) who;
-(void) newCode: (NSString *) what definition: (NSString *) info;
- (id)initWithWindowNibName:(NSString *)windowNibName;
- (NSMutableArray *) fileList;
- (NSMutableArray *) searchList;
//protocol for result documents
-(NSString *) theLimitString;
-(NSString *) uniqueString;
-(NSString *) theWindowName; 
- (void)windowDidLoad;
-(void) displaySelData;
-(void) front;
-(void) back;
-(NSArray *) getHotCodeList;
-(NSString *) codersList;
-(NSArray *) hotCodeList;
-(void) openMWFile: (MWFile *) who;
-(BOOL) mwFileExists: (MWFile *) who;
-(MWFile *) getMWFile;
-(MWFile *) searchFileName;

- (IBAction) setInitFile: (id) sender;
- (IBAction)clearSearch:(id)sender;
- (IBAction)doAdd:(id)sender;
- (IBAction)doAddAll:(id)sender;
- (IBAction)doRefresh:(id)sender;
- (IBAction)doRemove:(id)sender;
- (IBAction)doRemoveAll:(id)sender;
- (IBAction)doSearch:(id)sender;
- (IBAction)myAction:(id)sender;

@end
#define FILEOPEN(X) [gWorkBench fileExists: X]
