| 1 |
/* |
| 2 |
* Copyright (c) 2004-2005 The Lupin Project. All rights reserved. |
| 3 |
* |
| 4 |
* Redistribution and use in source and binary forms, with or without modification, are permitted |
| 5 |
* provided that the following conditions are met: |
| 6 |
* |
| 7 |
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions |
| 8 |
* and the following disclaimer. |
| 9 |
* |
| 10 |
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of |
| 11 |
* conditions and the following disclaimer in the documentation and/or other materials provided |
| 12 |
* with the distribution. |
| 13 |
* |
| 14 |
* THIS SOFTWARE IS PROVIDED BY THE LUPIN PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, |
| 15 |
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LUPIN PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 17 |
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 18 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 19 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 20 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 21 |
* POSSIBILITY OF SUCH DAMAGE. |
| 22 |
*/ |
| 23 |
|
| 24 |
//! 0������������������������������������������������������������������������������ |
| 25 |
|
| 26 |
typedef enum { |
| 27 |
LPDialogYES = -1, |
| 28 |
LPDialogCancel = -2, |
| 29 |
LPDialogNO = -3 |
| 30 |
} LPDialogResult; |
| 31 |
|
| 32 |
typedef enum { |
| 33 |
LPProcessBuildInfoMode = 1, |
| 34 |
LPProcessCompressMode = 2, |
| 35 |
LPProcessUncompressMode = 3 |
| 36 |
} LPProcessMode; |
| 37 |
|
| 38 |
#import <Cocoa/Cocoa.h> |
| 39 |
#import "LPDocument.h" |
| 40 |
#import "LPOutlineView.h" |
| 41 |
|
| 42 |
@interface LPMainWindowController : NSWindowController |
| 43 |
{ |
| 44 |
IBOutlet LPOutlineView *_fileOutlineView; |
| 45 |
IBOutlet NSTextField* _statusTextField; |
| 46 |
IBOutlet NSProgressIndicator* _progressIndicator; |
| 47 |
|
| 48 |
// For ProgressWindow |
| 49 |
IBOutlet NSButton* _cancelButton; |
| 50 |
|
| 51 |
// For Dialogs |
| 52 |
IBOutlet NSButton *_choiceCancelButton; |
| 53 |
IBOutlet NSButton *_choiceCheckButton; |
| 54 |
IBOutlet NSTextField *_choiceInfoTextField; |
| 55 |
IBOutlet NSButton *_choiceNoButton; |
| 56 |
IBOutlet NSPanel *_choicePanel; |
| 57 |
IBOutlet NSTextField *_choiceTitleTextField; |
| 58 |
IBOutlet NSButton *_choiceYesButton; |
| 59 |
|
| 60 |
IBOutlet NSTextField *_errorInfoTextField; |
| 61 |
IBOutlet NSPanel *_errorPanel; |
| 62 |
IBOutlet NSTextField *_errorTitleTextField; |
| 63 |
|
| 64 |
IBOutlet NSTextField *_passwordInfoTextField; |
| 65 |
IBOutlet NSPanel *_passwordPanel; |
| 66 |
IBOutlet NSTextField *_passwordTextField; |
| 67 |
IBOutlet NSTextField *_passwordTitleTextField; |
| 68 |
|
| 69 |
// int _processMode���typedef LPProcessMode��������� |
| 70 |
LPProcessMode _processMode; //! 1:������������������������������������������2:��������������������������� 3:��������������������������� |
| 71 |
NSMutableDictionary* _iconDict; //! ��������������������������������������������������������� |
| 72 |
NSImage* _folderIcon; //! ��������������������������������������������������������������������������������������������� |
| 73 |
|
| 74 |
//NSModalSession session; |
| 75 |
NSString* lastSortIdentifier; //! ������������������������������������������NSOutlineView������������������������ |
| 76 |
BOOL sortUp; //! ��������������������� |
| 77 |
} |
| 78 |
|
| 79 |
- (void)loadDialogs; |
| 80 |
- (void)refreshStatus; |
| 81 |
- (void)progressUpdate; |
| 82 |
- (void)archiveInfoDictDidBuild; |
| 83 |
- (void)archiveDidUncompress; |
| 84 |
- (void)archiveWillUncompress; |
| 85 |
- (void)archiveDidCompress; |
| 86 |
- (void)archiveWillCompress; |
| 87 |
|
| 88 |
// For ProgressWindow |
| 89 |
- (IBAction)stopProcess:(id)sender; |
| 90 |
- (IBAction)pauseProcess:(id)sender; |
| 91 |
|
| 92 |
// For Dialogs |
| 93 |
- (IBAction)choiceCancel:(id)sender; |
| 94 |
- (IBAction)choiceNo:(id)sender; |
| 95 |
- (IBAction)choiceYes:(id)sender; |
| 96 |
|
| 97 |
- (IBAction)errorAccept:(id)sender; |
| 98 |
- (IBAction)passwordAccept:(id)sender; |
| 99 |
- (IBAction)passwordCancel:(id)sender; |
| 100 |
|
| 101 |
- (LPDialogResult)showChoiceAlert:(BOOL*)flag title:(NSString*)title defaultButton:(NSString*)defaultButton |
| 102 |
alternateButton:(NSString*)alternateButton otherButton:(NSString*)otherButton |
| 103 |
message:(NSString*)message; |
| 104 |
- (void)showErrorAlertWithErrorID:(LPError)error; |
| 105 |
- (void)showErrorAlert:(NSString*)title info:(NSString*)info; |
| 106 |
- (NSString*)askPassword; |
| 107 |
|
| 108 |
@end |