1 |
/* SmallIconsViewer.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 SMALLICONSVIEWER_H |
27 |
#define SMALLICONSVIEWER_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 NSArray; |
38 |
@class NSDictionary; |
39 |
@class NSNotification; |
40 |
@class NSFileManager; |
41 |
@class NSScrollView; |
42 |
@class PathsPopUp; |
43 |
@class NSTextField; |
44 |
@class Banner; |
45 |
@class SmallIconsPanel; |
46 |
|
47 |
@interface SmallIconsViewer : NSView <ViewersProtocol, NSCopying> |
48 |
{ |
49 |
Banner *banner; |
50 |
PathsPopUp *pathsPopUp; |
51 |
SmallIconsPanel *panel; |
52 |
NSScrollView *panelScroll; |
53 |
BOOL viewsapps; |
54 |
BOOL autoSynchronize; |
55 |
BOOL firstResize; |
56 |
int resizeIncrement; |
57 |
int columns; |
58 |
float columnsWidth; |
59 |
NSString *rootPath; |
60 |
NSString *lastPath; |
61 |
NSString *currentPath; |
62 |
NSArray *selectedPaths; |
63 |
NSMutableArray *savedSelection; |
64 |
NSMutableArray *watchedPaths; |
65 |
id delegate; |
66 |
NSFileManager *fm; |
67 |
} |
68 |
|
69 |
- (void)validateCurrentPathAfterOperation:(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)openCurrentSelection:(NSArray *)paths newViewer:(BOOL)newv; |
90 |
|
91 |
- (void)setSelectedIconsPaths:(NSArray *)paths; |
92 |
|
93 |
- (void)makePopUp:(NSArray *)pathComps; |
94 |
|
95 |
- (void)popUpAction:(id)sender; |
96 |
|
97 |
- (void)updateDiskInfo; |
98 |
|
99 |
- (void)closeNicely; |
100 |
|
101 |
- (void)close:(id)sender; |
102 |
|
103 |
@end |
104 |
|
105 |
// |
106 |
// Methods Implemented by the Delegate |
107 |
// |
108 |
|
109 |
@interface NSObject (ViewerDelegateMethods) |
110 |
|
111 |
- (void)setTheSelectedPaths:(id)paths; |
112 |
|
113 |
- (NSArray *)selectedPaths; |
114 |
|
115 |
- (void)setTitleAndPath:(id)apath selectedPaths:(id)paths; |
116 |
|
117 |
- (void)addPathToHistory:(NSArray *)paths; |
118 |
|
119 |
- (void)updateTheInfoString; |
120 |
|
121 |
- (int)browserColumnsWidth; |
122 |
|
123 |
- (int)iconCellsWidth; |
124 |
|
125 |
- (int)getWindowFrameWidth; |
126 |
|
127 |
- (int)getWindowFrameHeight; |
128 |
|
129 |
- (void)startIndicatorForOperation:(NSString *)operation; |
130 |
|
131 |
- (void)stopIndicatorForOperation:(NSString *)operation; |
132 |
|
133 |
@end |
134 |
|
135 |
// |
136 |
// SmallIconsPanel Delegate Methods |
137 |
// |
138 |
|
139 |
@interface SmallIconsViewer (SmallIconsPanelDelegateMethods) |
140 |
|
141 |
- (void)setTheSelectedPaths:(id)paths; |
142 |
|
143 |
- (void)setSelectedPathsFromIcons:(id)paths; |
144 |
|
145 |
- (void)openTheCurrentSelection:(id)paths newViewer:(BOOL)newv; |
146 |
|
147 |
- (int)iconCellsWidth; |
148 |
|
149 |
@end |
150 |
|
151 |
#endif // SMALLICONSVIEWER_H |
152 |
|