1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
|
/* GWViewer.h
*
* Copyright (C) 2004-2013 Free Software Foundation, Inc.
*
* Author: Enrico Sersale <enrico@imago.ro>
* Date: July 2004
*
* This file is part of the GNUstep GWorkspace application
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
*/
#import <Foundation/Foundation.h>
typedef enum
{
GWViewTypeBrowser = 1,
GWViewTypeIcon,
GWViewTypeList
} GWViewType;
@class GWViewersManager;
@class FSNode;
@class FSNodeRep;
@class GWViewerWindow;
@class GWViewerSplit;
@class GWViewerShelf;
@class GWViewerScrollView;
@class GWViewerIconsPath;
@class GWViewerPathsScroll;
@class NSView;
@class GWorkspace;
@interface GWViewer : NSObject
{
GWViewerWindow *vwrwin;
GWViewerSplit *split;
GWViewerShelf *shelf;
float shelfHeight;
NSView *lowBox;
GWViewerPathsScroll *pathsScroll;
GWViewerIconsPath *pathsView;
GWViewerScrollView *nviewScroll;
id nodeView;
NSDictionary *viewerPrefs;
GWViewType viewType;
BOOL rootViewer; /* base path = root */
BOOL firstRootViewer; /* special first viewer */
NSString *defaultsKeyStr;
int visibleCols;
int resizeIncrement;
FSNode *baseNode;
NSArray *baseNodeArray;
NSArray *lastSelection;
NSMutableArray *watchedNodes;
FSNodeRep *fsnodeRep;
NSMutableArray *history;
int historyPosition;
BOOL invalidated;
BOOL closing;
GWViewersManager *manager;
GWorkspace *gworkspace;
NSNotificationCenter *nc;
}
- (id)initForNode:(FSNode *)node
inWindow:(GWViewerWindow *)win
showType:(GWViewType)stype
showSelection:(BOOL)showsel
withKey:(NSString *)key;
- (void)createSubviews;
- (FSNode *)baseNode;
- (BOOL)isShowingNode:(FSNode *)anode;
- (BOOL)isShowingPath:(NSString *)apath;
- (void)reloadNodeContents;
- (void)reloadFromNode:(FSNode *)anode;
- (void)unloadFromNode:(FSNode *)anode;
- (void)updateShownSelection;
- (GWViewerWindow *)win;
- (id)nodeView;
- (id)shelf;
- (GWViewType)viewType;
/* the first among root viewers, the default Viewer */
- (BOOL)isFirstRootViewer;
/* returns the key used in the defaults (prefsname) */
- (NSString *)defaultsKey;
- (void)activate;
- (void)deactivate;
- (void)tileViews;
- (void)scrollToBeginning;
- (void)invalidate;
- (BOOL)invalidated;
- (BOOL)isClosing;
- (void)setOpened:(BOOL)opened
repOfNode:(FSNode *)anode;
- (void)unselectAllReps;
- (void)selectionChanged:(NSArray *)newsel;
- (void)multipleNodeViewDidSelectSubNode:(FSNode *)node;
- (void)pathsViewDidSelectIcon:(id)icon;
- (void)shelfDidSelectIcon:(id)icon;
- (void)setSelectableNodesRange:(NSRange)range;
- (void)updeateInfoLabels;
- (BOOL)involvedByFileOperation:(NSDictionary *)opinfo;
- (void)nodeContentsWillChange:(NSDictionary *)info;
- (void)nodeContentsDidChange:(NSDictionary *)info;
- (void)watchedPathChanged:(NSDictionary *)info;
- (NSArray *)watchedNodes;
- (void)hideDotsFileChanged:(BOOL)hide;
- (void)hiddenFilesChanged:(NSArray *)paths;
- (NSMutableArray *)history;
- (int)historyPosition;
- (void)setHistoryPosition:(int)pos;
- (void)columnsWidthChanged:(NSNotification *)notification;
- (void)updateDefaults;
@end
//
// GWViewerWindow Delegate Methods
//
@interface GWViewer (GWViewerWindowDelegateMethods)
- (void)openSelectionInNewViewer:(BOOL)newv;
- (void)openSelectionAsFolder;
- (void)openSelectionWith;
- (void)newFolder;
- (void)newFile;
- (void)duplicateFiles;
- (void)recycleFiles;
- (void)emptyTrash;
- (void)deleteFiles;
- (void)goBackwardInHistory;
- (void)goForwardInHistory;
- (void)setViewerType:(id)sender;
- (void)setShownType:(id)sender;
- (void)setExtendedShownType:(id)sender;
- (void)setIconsSize:(id)sender;
- (void)setIconsPosition:(id)sender;
- (void)setLabelSize:(id)sender;
- (void)chooseLabelColor:(id)sender;
- (void)chooseBackColor:(id)sender;
- (void)selectAllInViewer;
- (void)showTerminal;
- (BOOL)validateItem:(id)menuItem;
- (void)makeThumbnails:(id)sender;
- (void)removeThumbnails:(id)sender;
@end
|