/[gnustep]/gnustep/usr-apps/gworkspace/GWLib/BIcon.h
ViewVC logotype

Contents of /gnustep/usr-apps/gworkspace/GWLib/BIcon.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Sep 30 15:38:04 2003 UTC (20 years, 6 months ago) by esersale
Branch: MAIN
Changes since 1.3: +0 -1 lines
File MIME type: text/plain
*** empty log message ***

1 /* BIcon.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 BICON_H
27 #define BICON_H
28
29 #include <AppKit/NSView.h>
30
31 #define ICONPOSITION(s1, s2) (NSMakePoint(((int)(s1).width - (int)(s2).width) >> 1, \
32 ((int)(s1).height - (int)(s2).height) >> 1))
33
34 #define ONICON(p, s1, s2) ([self mouse: (p) \
35 inRect: NSMakeRect(((int)(s1).width - (int)(s2).width) >> 1,\
36 ((int)(s1).height - (int)(s2).height) >> 1, 48, 48)])
37
38 @class NSString;
39 @class NSArray;
40 @class NSFileManager;
41 @class NSEvent;
42 @class NSPasteboard;
43 @class NSImage;
44 @class NSTextField;
45 @class BIconLabel;
46
47 @interface BIcon : NSView
48 {
49 NSArray *paths;
50 NSString *fullpath;
51 NSString *name;
52 NSString *hostname;
53
54 BOOL isRootIcon;
55 BOOL singlepath;
56 NSString *type;
57 BOOL isPakage;
58 BOOL isbranch;
59 BOOL dimmed;
60 BOOL locked;
61
62 NSImage *icon, *highlight, *arrow;
63 BIconLabel *namelabel;
64
65 id delegate;
66
67 BOOL isSelect;
68 BOOL contestualMenu;
69
70 int dragdelay;
71 BOOL isDragTarget;
72 BOOL onSelf;
73
74 NSFileManager *fm;
75 }
76
77 - (void)setDelegate:(id)aDelegate;
78
79 - (id)delegate;
80
81 - (void)setPaths:(NSArray *)p;
82
83 - (void)select;
84
85 - (void)unselect;
86
87 - (void)renewIcon;
88
89 - (void)openWithApp:(id)sender;
90
91 - (void)openWith:(id)sender;
92
93 - (NSTextField *)label;
94
95 - (void)clickOnLabel;
96
97 - (NSString *)type;
98
99 - (BOOL)isSinglePath;
100
101 - (BOOL)isSelect;
102
103 - (void)setBranch:(BOOL)value;
104
105 - (BOOL)isBranch;
106
107 - (void)setDimmed:(BOOL)value;
108
109 - (BOOL)isDimmed;
110
111 - (void)setLocked:(BOOL)value;
112
113 - (BOOL)isLocked;
114
115 - (BOOL)isRootIcon;
116
117 - (NSArray *)paths;
118
119 - (NSString *)name;
120
121 - (NSString *)hostname;
122
123 - (NSImage *)icon;
124
125 - (NSSize)iconShift;
126
127 @end
128
129
130 @interface BIcon (DraggingSource)
131
132 - (void)startExternalDragOnEvent:(NSEvent *)event;
133
134 - (void)declareAndSetShapeOnPasteboard:(NSPasteboard *)pb;
135
136 - (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)flag;
137
138 - (void)draggedImage:(NSImage *)anImage
139 endedAt:(NSPoint)aPoint
140 deposited:(BOOL)flag;
141
142 @end
143
144
145 @interface BIcon (DraggingDestination)
146
147 - (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender;
148
149 - (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender;
150
151 - (void)draggingExited:(id <NSDraggingInfo>)sender;
152
153 - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
154
155 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
156
157 - (void)concludeDragOperation:(id <NSDraggingInfo>)sender;
158
159 @end
160
161
162 //
163 // Methods Implemented by the Delegate
164 //
165
166 @interface NSObject (BIconDelegateMethods)
167
168 - (void)icon:(BIcon *)sender setFrameOfLabel:(NSTextField *)label;
169
170 - (void)unselectOtherIcons:(BIcon *)selicon;
171
172 - (void)unselectNameEditor;
173
174 - (void)restoreSelectionAfterDndOfIcon:(BIcon *)dndicon;
175
176 - (void)clickOnIcon:(BIcon *)clicked;
177
178 - (void)doubleClickOnIcon:(BIcon *)clicked newViewer:(BOOL)isnew;
179
180 @end
181
182 #endif // BICON_H

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26