1 |
/* BrowserViewer.h |
2 |
* |
3 |
* Copyright (C) 2003 Free Software Foundation, Inc. |
4 |
* |
5 |
* Author: Enrico Sersale <enrico@imago.ro> |
6 |
* Date: August 2001 |
7 |
* |
8 |
* This file is part of the GNUstep GWorkspace application |
9 |
* |
10 |
* This program is free software; you can redistribute it and/or modify |
11 |
* it under the terms of the GNU General Public License as published by |
12 |
* the Free Software Foundation; either version 2 of the License, or |
13 |
* (at your option) any later version. |
14 |
* |
15 |
* This program is distributed in the hope that it will be useful, |
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 |
* GNU General Public License for more details. |
19 |
* |
20 |
* You should have received a copy of the GNU General Public License |
21 |
* along with this program; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
23 |
*/ |
24 |
|
25 |
|
26 |
#ifndef BROWSER_VIEWER_H |
27 |
#define BROWSER_VIEWER_H |
28 |
|
29 |
#include <AppKit/NSView.h> |
30 |
#ifdef GNUSTEP |
31 |
#include "ViewersProtocol.h" |
32 |
#else |
33 |
#include <GWorkspace/ViewersProtocol.h> |
34 |
#endif |
35 |
|
36 |
@class NSString; |
37 |
@class NSMutableArray; |
38 |
@class NSFileManager; |
39 |
@class NSDictionary; |
40 |
@class NSNotification; |
41 |
@class Browser2; |
42 |
@class BrowserViewerPref; |
43 |
|
44 |
@interface BrowserViewer : NSView <ViewersProtocol, NSCopying> |
45 |
{ |
46 |
Browser2 *browser; |
47 |
int resizeIncrement; |
48 |
int columns; |
49 |
float columnsWidth; |
50 |
BOOL usesShelf; |
51 |
BOOL cellsIcons; |
52 |
NSString *rootPath; |
53 |
NSString *lastPath; |
54 |
NSArray *selectedPaths; |
55 |
BOOL autoSynchronize; |
56 |
BOOL viewsapps; |
57 |
NSMutableArray *watchedPaths; |
58 |
BrowserViewerPref *prefs; |
59 |
id delegate; |
60 |
NSFileManager *fm; |
61 |
} |
62 |
|
63 |
- (void)checkUsesShelf; |
64 |
|
65 |
- (void)checkUsesCellsIcons; |
66 |
|
67 |
- (void)renewAll; |
68 |
|
69 |
- (void)validateRootPathAfterOperation:(NSDictionary *)opdict; |
70 |
|
71 |
- (void)fileSystemWillChange:(NSNotification *)notification; |
72 |
|
73 |
- (void)fileSystemDidChange:(NSNotification *)notification; |
74 |
|
75 |
- (void)sortTypeDidChange:(NSNotification *)notification; |
76 |
|
77 |
- (void)watcherNotification:(NSNotification *)notification; |
78 |
|
79 |
- (void)setWatchers; |
80 |
|
81 |
- (void)setWatcherForPath:(NSString *)path; |
82 |
|
83 |
- (void)unsetWatcherForPath:(NSString *)path; |
84 |
|
85 |
- (void)unsetWatchersFromPath:(NSString *)path; |
86 |
|
87 |
- (void)reSetWatchersFromPath:(NSString *)path; |
88 |
|
89 |
- (void)closeNicely; |
90 |
|
91 |
- (void)close:(id)sender; |
92 |
|
93 |
@end |
94 |
|
95 |
// |
96 |
// Methods Implemented by the Delegate |
97 |
// |
98 |
@interface NSObject (ViewerDelegateMethods) |
99 |
|
100 |
- (void)setTheSelectedPaths:(id)paths; |
101 |
|
102 |
- (NSArray *)selectedPaths; |
103 |
|
104 |
- (void)setTitleAndPath:(id)apath selectedPaths:(id)paths; |
105 |
|
106 |
- (void)addPathToHistory:(NSArray *)paths; |
107 |
|
108 |
- (void)updateTheInfoString; |
109 |
|
110 |
- (int)browserColumnsWidth; |
111 |
|
112 |
- (int)iconCellsWidth; |
113 |
|
114 |
- (int)getWindowFrameWidth; |
115 |
|
116 |
- (int)getWindowFrameHeight; |
117 |
|
118 |
- (void)startIndicatorForOperation:(NSString *)operation; |
119 |
|
120 |
- (void)stopIndicatorForOperation:(NSString *)operation; |
121 |
|
122 |
@end |
123 |
|
124 |
@interface BrowserViewer (Browser2DelegateMethods) |
125 |
|
126 |
- (void)currentSelectedPaths:(NSArray *)paths; |
127 |
|
128 |
- (void)openSelectedPaths:(NSArray *)paths newViewer:(BOOL)isnew; |
129 |
|
130 |
@end |
131 |
|
132 |
#endif // BROWSER_VIEWER_H |
133 |
|