1 |
/* IconsPath.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 ICONSPATH_H |
27 |
#define ICONSPATH_H |
28 |
|
29 |
#include <AppKit/NSView.h> |
30 |
|
31 |
@class NSString; |
32 |
@class NSArray; |
33 |
@class NSMutableArray; |
34 |
@class NSFileManager; |
35 |
@class PathIcon; |
36 |
@class BNameEditor; |
37 |
|
38 |
@interface IconsPath : NSView |
39 |
{ |
40 |
NSString *root; |
41 |
NSString *currentPath; |
42 |
NSMutableArray *icons; |
43 |
BNameEditor *nameEditor; |
44 |
PathIcon *edIcon; |
45 |
NSFont *editorFont; |
46 |
float columnsWidth; |
47 |
id delegate; |
48 |
id gworkspace; |
49 |
} |
50 |
|
51 |
- (id)initWithRootAtPath:(NSString *)rpath |
52 |
columnsWidth:(float)cwidth |
53 |
delegate:(id)adelegate; |
54 |
|
55 |
- (void)setIconsForSelection:(NSArray *)selection; |
56 |
|
57 |
- (void)setColumnWidth:(float)width; |
58 |
|
59 |
- (void)renewIcons:(int)n; |
60 |
|
61 |
- (void)addIcon; |
62 |
|
63 |
- (void)removeIcon:(PathIcon *)icon; |
64 |
|
65 |
- (void)removeIconAtIndex:(int)index; |
66 |
|
67 |
- (void)lockIconsFromPath:(NSString *)path; |
68 |
|
69 |
- (void)unlockIconsFromPath:(NSString *)path; |
70 |
|
71 |
- (void)setIconsPositions; |
72 |
|
73 |
- (void)setLabelRectOfIcon:(PathIcon *)icon; |
74 |
|
75 |
- (void)unselectOtherIcons:(PathIcon *)icon; |
76 |
|
77 |
- (void)selectIconAtIndex:(int)index; |
78 |
|
79 |
- (void)startEditing; |
80 |
|
81 |
- (NSArray *)icons; |
82 |
|
83 |
- (PathIcon *)iconAtIndex:(int)index; |
84 |
|
85 |
- (int)indexOfIcon:(PathIcon *)icon; |
86 |
|
87 |
- (int)indexOfIconWithPath:(NSString *)path; |
88 |
|
89 |
- (PathIcon *)iconWithPath:(NSString *)path; |
90 |
|
91 |
- (PathIcon *)lastIcon; |
92 |
|
93 |
- (NSPoint)positionOfLastIcon; |
94 |
|
95 |
- (NSPoint)positionForSlidedImage; |
96 |
|
97 |
- (int)numberOfIcons; |
98 |
|
99 |
- (void)updateNameEditor; |
100 |
|
101 |
- (void)editorAction:(id)sender; |
102 |
|
103 |
- (id)delegate; |
104 |
|
105 |
- (void)setDelegate:(id)anObject; |
106 |
|
107 |
@end |
108 |
|
109 |
// |
110 |
// Methods Implemented by the Delegate |
111 |
// |
112 |
|
113 |
@interface NSObject (IconsPathDelegateMethods) |
114 |
|
115 |
- (void)clickedIcon:(id)anicon; |
116 |
|
117 |
- (void)doubleClickedIcon:(id)anicon newViewer:(BOOL)isnew; |
118 |
|
119 |
@end |
120 |
|
121 |
// |
122 |
// PathIcon Delegate Methods |
123 |
// |
124 |
|
125 |
@interface IconsPath (PathIconDelegateMethods) |
126 |
|
127 |
- (void)setLabelFrameOfIcon:(id)anicon; |
128 |
|
129 |
- (void)unselectIconsDifferentFrom:(id)anicon; |
130 |
|
131 |
- (void)clickedIcon:(id)anicon; |
132 |
|
133 |
- (void)doubleClickedIcon:(id)anicon newViewer:(BOOL)isnew; |
134 |
|
135 |
- (void)unselectNameEditor; |
136 |
|
137 |
- (void)restoreSelectionAfterDndOfIcon:(id)dndicon; |
138 |
|
139 |
@end |
140 |
|
141 |
#endif // ICONSPATH_H |
142 |
|