1 /* GWViewersManager.h
2  *
3  * Copyright (C) 2004-2013 Free Software Foundation, Inc.
4  *
5  * Author: Enrico Sersale <enrico@imago.ro>
6  * Date: June 2004
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., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
23  */
24 
25 
26 #import <Foundation/Foundation.h>
27 #import "FSNodeRep.h"
28 #import "GWViewer.h"
29 
30 @class GWorkspace;
31 @class History;
32 
33 @interface GWViewersManager : NSObject
34 {
35   NSMutableArray *viewers;
36   BOOL orderingViewers;
37   GWorkspace *gworkspace;
38   History *historyWindow;
39   BOOL settingHistoryPath;
40   NSHelpManager *helpManager;
41   NSAttributedString *bviewerHelp;
42   NSNotificationCenter *nc;
43 }
44 
45 + (GWViewersManager *)viewersManager;
46 
47 
48 - (void)showViewers;
49 
50 - (id)showRootViewer;
51 
52 - (void)selectRepOfNode:(FSNode *)node
53           inViewerWithBaseNode:(FSNode *)base;
54 
55 
56 - (id)viewerForNode:(FSNode *)node
57           showType:(GWViewType)stype
58      showSelection:(BOOL)showsel
59           forceNew:(BOOL)force
60 	   withKey:(NSString *)key;
61 
62 - (NSArray *)viewersForBaseNode:(FSNode *)node;
63 
64 - (id)viewerWithBaseNode:(FSNode *)node;
65 
66 - (id)viewerShowingNode:(FSNode *)node;
67 
68 - (id)rootViewer;
69 
70 
71 - (void)viewerWillClose:(id)aviewer;
72 
73 - (void)closeInvalidViewers:(NSArray *)vwrs;
74 
75 - (void)selectionChanged:(NSArray *)selection;
76 
77 - (void)openSelectionInViewer:(id)viewer
78                   closeSender:(BOOL)close;
79 
80 - (void)openAsFolderSelectionInViewer:(id)viewer;
81 
82 - (void)openWithSelectionInViewer:(id)viewer;
83 
84 
85 - (void)sortTypeDidChange:(NSNotification *)notif;
86 
87 - (void)fileSystemWillChange:(NSNotification *)notif;
88 
89 - (void)fileSystemDidChange:(NSNotification *)notif;
90 
91 - (void)watcherNotification:(NSNotification *)notif;
92 
93 - (void)thumbnailsDidChangeInPaths:(NSArray *)paths;
94 
95 - (void)hideDotsFileDidChange:(BOOL)hide;
96 
97 - (void)hiddenFilesDidChange:(NSArray *)paths;
98 
99 
100 - (BOOL)hasViewerWithWindow:(id)awindow;
101 
102 - (id)viewerWithWindow:(id)awindow;
103 
104 - (NSArray *)viewerWindows;
105 
106 - (BOOL)orderingViewers;
107 
108 - (void)updateDesktop;
109 
110 - (void)updateDefaults;
111 
112 @end
113 
114 
115 @interface GWViewersManager (History)
116 
117 - (void)addNode:(FSNode *)node toHistoryOfViewer:(id)viewer;
118 
119 - (void)removeDuplicatesInHistory:(NSMutableArray *)history
120                          position:(int *)pos;
121 
122 - (void)changeHistoryOwner:(id)viewer;
123 
124 - (void)goToHistoryPosition:(int)pos
125                    ofViewer:(id)viewer;
126 
127 - (void)goBackwardInHistoryOfViewer:(id)viewer;
128 
129 - (void)goForwardInHistoryOfViewer:(id)viewer;
130 
131 - (void)setPosition:(int)position
132           inHistory:(NSMutableArray *)history
133            ofViewer:(id)viewer;
134 
135 @end
136