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 |
id gworkspace; |
67 |
NSFileManager *fm; |
68 |
} |
69 |
|
70 |
- (void)validateCurrentPathAfterOperation:(NSDictionary *)opdict; |
71 |
|
72 |
- (void)fileSystemWillChange:(NSNotification *)notification; |
73 |
|
74 |
- (void)fileSystemDidChange:(NSNotification *)notification; |
75 |
|
76 |
- (void)sortTypeDidChange:(NSNotification *)notification; |
77 |
|
78 |
- (void)watcherNotification:(NSNotification *)notification; |
79 |
|
80 |
- (void)setWatchers; |
81 |
|
82 |
- (void)setWatcherForPath:(NSString *)path; |
83 |
|
84 |
- (void)unsetWatcherForPath:(NSString *)path; |
85 |
|
86 |
- (void)unsetWatchersFromPath:(NSString *)path; |
87 |
|
88 |
- (void)reSetWatchersFromPath:(NSString *)path; |
89 |
|
90 |
- (void)openCurrentSelection:(NSArray *)paths newViewer:(BOOL)newv; |
91 |
|
92 |
- (void)setSelectedIconsPaths:(NSArray *)paths; |
93 |
|
94 |
- (void)makePopUp:(NSArray *)pathComps; |
95 |
|
96 |
- (void)popUpAction:(id)sender; |
97 |
|
98 |
- (void)updateDiskInfo; |
99 |
|
100 |
- (void)closeNicely; |
101 |
|
102 |
- (void)close:(id)sender; |
103 |
|
104 |
@end |
105 |
|
106 |
// |
107 |
// Methods Implemented by the Delegate |
108 |
// |
109 |
|
110 |
@interface NSObject (ViewerDelegateMethods) |
111 |
|
112 |
- (void)setTheSelectedPaths:(id)paths; |
113 |
|
114 |
- (NSArray *)selectedPaths; |
115 |
|
116 |
- (void)setTitleAndPath:(id)apath selectedPaths:(id)paths; |
117 |
|
118 |
- (void)addPathToHistory:(NSArray *)paths; |
119 |
|
120 |
- (void)updateTheInfoString; |
121 |
|
122 |
- (int)browserColumnsWidth; |
123 |
|
124 |
- (int)iconCellsWidth; |
125 |
|
126 |
- (int)getWindowFrameWidth; |
127 |
|
128 |
- (int)getWindowFrameHeight; |
129 |
|
130 |
- (void)startIndicatorForOperation:(NSString *)operation; |
131 |
|
132 |
- (void)stopIndicatorForOperation:(NSString *)operation; |
133 |
|
134 |
@end |
135 |
|
136 |
// |
137 |
// SmallIconsPanel Delegate Methods |
138 |
// |
139 |
|
140 |
@interface SmallIconsViewer (SmallIconsPanelDelegateMethods) |
141 |
|
142 |
- (void)setTheSelectedPaths:(id)paths; |
143 |
|
144 |
- (void)setSelectedPathsFromIcons:(id)paths; |
145 |
|
146 |
- (void)openTheCurrentSelection:(id)paths newViewer:(BOOL)newv; |
147 |
|
148 |
- (int)iconCellsWidth; |
149 |
|
150 |
@end |
151 |
|
152 |
#endif // SMALLICONSVIEWER_H |
153 |
|