1 |
/* IconsViewerIcon.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 ICONVIEWSICON_H |
27 |
#define ICONVIEWSICON_H |
28 |
|
29 |
#include <AppKit/NSView.h> |
30 |
|
31 |
@class NSString; |
32 |
@class NSArray; |
33 |
@class NSMutableArray; |
34 |
@class NSNotification; |
35 |
@class NSEvent; |
36 |
@class NSPasteboard; |
37 |
@class NSTextField; |
38 |
@class NSImage; |
39 |
@class NSFileManager; |
40 |
|
41 |
@interface IconsViewerIcon : NSView |
42 |
{ |
43 |
NSString *path; |
44 |
NSString *name; |
45 |
NSString *type; |
46 |
BOOL isPakage; |
47 |
BOOL isSelect; |
48 |
BOOL locked; |
49 |
|
50 |
NSImage *icon, *highlight; |
51 |
NSTextField *namelabel; |
52 |
int labelWidth; |
53 |
|
54 |
id delegate; |
55 |
int dragdelay; |
56 |
BOOL isDragTarget; |
57 |
BOOL onSelf; |
58 |
|
59 |
NSFileManager *fm; |
60 |
} |
61 |
|
62 |
- (id)initForPath:(NSString *)apath delegate:(id)adelegate; |
63 |
|
64 |
- (void)setPath:(NSString *)apath; |
65 |
|
66 |
- (void)select; |
67 |
|
68 |
- (void)unselect; |
69 |
|
70 |
- (void)renewIcon; |
71 |
|
72 |
- (void)setLabelWidth; |
73 |
|
74 |
- (NSTextField *)myLabel; |
75 |
|
76 |
- (NSString *)type; |
77 |
|
78 |
- (NSString *)path; |
79 |
|
80 |
- (NSString *)myName; |
81 |
|
82 |
- (NSSize)iconShift; |
83 |
|
84 |
- (BOOL)isSelect; |
85 |
|
86 |
- (void)setLocked:(BOOL)value; |
87 |
|
88 |
- (BOOL)isLocked; |
89 |
|
90 |
- (id)delegate; |
91 |
|
92 |
- (void)setDelegate:(id)aDelegate; |
93 |
|
94 |
@end |
95 |
|
96 |
@interface IconsViewerIcon (DraggingSource) |
97 |
|
98 |
- (void)startExternalDragOnEvent:(NSEvent *)event; |
99 |
|
100 |
- (void)declareAndSetShapeOnPasteboard:(NSPasteboard *)pb; |
101 |
|
102 |
- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)flag; |
103 |
|
104 |
@end |
105 |
|
106 |
@interface IconsViewerIcon (DraggingDestination) |
107 |
|
108 |
- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender; |
109 |
|
110 |
- (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender; |
111 |
|
112 |
- (void)draggingExited:(id <NSDraggingInfo>)sender; |
113 |
|
114 |
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender; |
115 |
|
116 |
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender; |
117 |
|
118 |
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender; |
119 |
|
120 |
@end |
121 |
|
122 |
// |
123 |
// Methods Implemented by the Delegate |
124 |
// |
125 |
|
126 |
@interface NSObject (IconsViewerIconDelegateMethods) |
127 |
|
128 |
- (int)getCellsWidth; |
129 |
|
130 |
- (void)setLabelFrameOfIcon:(id)aicon; |
131 |
|
132 |
- (void)unselectIconsDifferentFrom:(id)aicon; |
133 |
|
134 |
- (void)setShiftClickValue:(BOOL)value; |
135 |
|
136 |
- (void)setTheCurrentSelection:(id)paths; |
137 |
|
138 |
- (NSArray *)getTheCurrentSelection; |
139 |
|
140 |
- (void)openTheCurrentSelection:(id)paths newViewer:(BOOL)newv; |
141 |
|
142 |
- (id)menuForRightMouseEvent:(NSEvent *)theEvent; |
143 |
|
144 |
@end |
145 |
|
146 |
#endif // ICONVIEWSICON_H |
147 |
|