author | Claus Gittinger <cg@exept.de> |
Thu, 12 Jun 2003 13:09:59 +0200 | |
changeset 1784 | 67f412dd5926 |
parent 1709 | fc33be8aaa9c |
child 1952 | 5009754ae556 |
permissions | -rw-r--r-- |
546 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
1482 | 15 |
"{ Package: 'stx:libview2' }" |
16 |
||
395 | 17 |
Object subclass:#DropObject |
860 | 18 |
instanceVariableNames:'theObject displayObject' |
395 | 19 |
classVariableNames:'' |
20 |
poolDictionaries:'' |
|
875 | 21 |
category:'Interface-DragAndDrop' |
395 | 22 |
! |
23 |
||
403 | 24 |
DropObject class instanceVariableNames:'DisplayObject' |
25 |
||
26 |
" |
|
1482 | 27 |
No other class instance variables are inherited by this class. |
403 | 28 |
" |
29 |
! |
|
30 |
||
1482 | 31 |
DropObject subclass:#Class |
395 | 32 |
instanceVariableNames:'' |
33 |
classVariableNames:'' |
|
34 |
poolDictionaries:'' |
|
35 |
privateIn:DropObject |
|
36 |
! |
|
37 |
||
1277
ad8a630c9acd
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
1112
diff
changeset
|
38 |
DropObject subclass:#Color |
ad8a630c9acd
try bitmaps in package directory
Claus Gittinger <cg@exept.de>
parents:
1112
diff
changeset
|
39 |
instanceVariableNames:'' |
860 | 40 |
classVariableNames:'' |
41 |
poolDictionaries:'' |
|
42 |
privateIn:DropObject |
|
43 |
! |
|
44 |
||
1482 | 45 |
DropObject subclass:#File |
46 |
instanceVariableNames:'info isHtmlFile isImageFile isPrintable' |
|
47 |
classVariableNames:'' |
|
48 |
poolDictionaries:'' |
|
49 |
privateIn:DropObject |
|
50 |
! |
|
51 |
||
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
52 |
DropObject::File subclass:#FileInArchive |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
53 |
instanceVariableNames:'' |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
54 |
classVariableNames:'' |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
55 |
poolDictionaries:'' |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
56 |
privateIn:DropObject |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
57 |
! |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
58 |
|
395 | 59 |
DropObject subclass:#Image |
60 |
instanceVariableNames:'' |
|
61 |
classVariableNames:'' |
|
62 |
poolDictionaries:'' |
|
63 |
privateIn:DropObject |
|
64 |
! |
|
65 |
||
1482 | 66 |
DropObject subclass:#Method |
67 |
instanceVariableNames:'' |
|
68 |
classVariableNames:'' |
|
69 |
poolDictionaries:'' |
|
70 |
privateIn:DropObject |
|
71 |
! |
|
72 |
||
73 |
DropObject subclass:#Text |
|
74 |
instanceVariableNames:'' |
|
75 |
classVariableNames:'' |
|
76 |
poolDictionaries:'' |
|
77 |
privateIn:DropObject |
|
78 |
! |
|
79 |
||
546 | 80 |
!DropObject class methodsFor:'documentation'! |
81 |
||
82 |
copyright |
|
83 |
" |
|
84 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
85 |
All Rights Reserved |
|
86 |
||
87 |
This software is furnished under a license and may be used |
|
88 |
only in accordance with the terms of that license and with the |
|
89 |
inclusion of the above copyright notice. This software may not |
|
90 |
be provided or otherwise made available to, or used by, any |
|
91 |
other person. No title to or ownership of the software is |
|
92 |
hereby transferred. |
|
93 |
" |
|
94 |
||
95 |
||
96 |
! |
|
97 |
||
98 |
documentation |
|
99 |
" |
|
100 |
instances of myself and subclasses wrap objects which are being |
|
101 |
dragged (and dropped). |
|
102 |
Any object can be dragged, but for some often encountered types, |
|
103 |
specialized subclasses are provided, which react to certain queries. |
|
104 |
||
105 |
[see also:] |
|
106 |
DragAndDropManager |
|
107 |
||
108 |
[author:] |
|
109 |
Claus Atzkern |
|
110 |
" |
|
111 |
! ! |
|
395 | 112 |
|
113 |
!DropObject class methodsFor:'instance creation'! |
|
114 |
||
1112 | 115 |
dropObjectClassFor:someThing |
116 |
"given something to drag&drop, return an appropriate |
|
117 |
dropObject class for it." |
|
118 |
||
119 |
someThing isColor ifTrue:[^ DropObject::Color]. |
|
120 |
someThing isImageOrForm ifTrue:[^ DropObject::Image]. |
|
121 |
(someThing isKindOf:Filename) ifTrue:[^ DropObject::File]. |
|
122 |
someThing isString ifTrue:[^ DropObject::Text]. |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
123 |
someThing isBehavior ifTrue:[^ DropObject::Class]. |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
124 |
someThing isMethod ifTrue:[^ DropObject::Method]. |
1112 | 125 |
^ self |
126 |
! |
|
127 |
||
395 | 128 |
new:someThing |
547 | 129 |
"create an instance on something |
395 | 130 |
" |
131 |
|cls| |
|
132 |
||
1112 | 133 |
cls := self dropObjectClassFor:someThing. |
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
134 |
^ self newInstanceOf:cls for:someThing |
547 | 135 |
|
136 |
"Modified: 19.4.1997 / 17:19:55 / cg" |
|
395 | 137 |
! |
138 |
||
1482 | 139 |
newClass:aClass |
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
140 |
"create an instance for a class (dragging a class from a browser)" |
1482 | 141 |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
142 |
^ self newInstanceOf:DropObject::Class for:aClass |
1482 | 143 |
! |
144 |
||
395 | 145 |
newColor:aColor |
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
146 |
"create an instance for a color (dragging a color from a bitmap editor)" |
547 | 147 |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
148 |
^ self newInstanceOf:DropObject::Color for:aColor |
547 | 149 |
|
150 |
"Modified: 19.4.1997 / 17:20:17 / cg" |
|
395 | 151 |
! |
152 |
||
153 |
newFile:aFilename |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
154 |
"create an instance for a file or directory (dragging a file in a fileBrowser)" |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
155 |
|
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
156 |
^ self newInstanceOf:DropObject::File for:aFilename |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
157 |
! |
547 | 158 |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
159 |
newFileInArchive:aFilename |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
160 |
"create an instance for a file or directory contained inside an archive |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
161 |
(dragging a file from an archive shown in a fileBrowser)" |
547 | 162 |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
163 |
^ self newInstanceOf:DropObject::FileInArchive for:aFilename |
395 | 164 |
! |
165 |
||
166 |
newImage:anImageOrForm |
|
547 | 167 |
"create an instance for an image" |
168 |
||
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
169 |
^ self newInstanceOf:DropObject::Image for:anImageOrForm |
547 | 170 |
|
171 |
"Modified: 19.4.1997 / 17:20:37 / cg" |
|
395 | 172 |
! |
173 |
||
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
174 |
newInstanceOf:aClass for:someThing |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
175 |
"create an instance on something |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
176 |
" |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
177 |
^ aClass new theObject:someThing |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
178 |
|
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
179 |
"Modified: 19.4.1997 / 17:19:55 / cg" |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
180 |
! |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
181 |
|
1482 | 182 |
newMethod:aMethod |
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
183 |
"create an instance for a method (dragging a method in a browser)" |
1482 | 184 |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
185 |
^ self newInstanceOf:DropObject::Method for:aMethod |
1482 | 186 |
! |
187 |
||
395 | 188 |
newText:aTextOrString |
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
189 |
"create an instance for some text (dragging some text from an editor)" |
547 | 190 |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
191 |
^ self newInstanceOf:DropObject::Text for:aTextOrString |
547 | 192 |
|
193 |
"Modified: 19.4.1997 / 17:20:46 / cg" |
|
395 | 194 |
! ! |
195 |
||
403 | 196 |
!DropObject class methodsFor:'defaults'! |
197 |
||
198 |
displayObject |
|
546 | 199 |
"return some object which is shown while dragging; |
200 |
here an image based upon my displayObjectName is returned. |
|
201 |
Either this method or #displayObjectName is usually redefined |
|
202 |
in subclasses" |
|
403 | 203 |
|
204 |
DisplayObject notNil ifTrue:[ |
|
205 |
^ DisplayObject |
|
206 |
]. |
|
1292 | 207 |
DisplayObject := Smalltalk imageFromFileNamed:(self displayObjectName) forClass:self. |
403 | 208 |
^ DisplayObject |
546 | 209 |
|
210 |
"Modified: 19.4.1997 / 13:04:05 / cg" |
|
211 |
! |
|
212 |
||
213 |
displayObject:aDisplayObject |
|
214 |
"set the object which is shown while dragging; |
|
215 |
this object must understand #displayOn:x:y: (i.e. the displayObject |
|
216 |
protocol). The object is kept per class for ALL future drag operations. |
|
217 |
Useful to change the default images in subclasses." |
|
218 |
||
219 |
DisplayObject := aDisplayObject |
|
220 |
||
221 |
"Modified: 19.4.1997 / 15:42:10 / cg" |
|
403 | 222 |
! |
223 |
||
224 |
displayObjectName |
|
546 | 225 |
"return the name of a bitmap image file, which is used |
226 |
during a drag. |
|
227 |
Here, a dummy file is returned." |
|
228 |
||
403 | 229 |
^ 'bitmaps/xpmBitmaps/plain_pixmaps/balloon3.xpm' |
230 |
||
546 | 231 |
"Modified: 19.4.1997 / 13:54:13 / cg" |
403 | 232 |
! ! |
233 |
||
395 | 234 |
!DropObject methodsFor:'accessing'! |
235 |
||
860 | 236 |
displayObject |
237 |
"return my graphical representation - here a default is returned" |
|
238 |
||
239 |
^ displayObject ? (self class displayObject) |
|
240 |
||
241 |
||
242 |
! |
|
243 |
||
244 |
displayObject:anObject |
|
245 |
"set my graphical representation" |
|
246 |
||
247 |
displayObject := anObject |
|
248 |
||
249 |
! |
|
250 |
||
395 | 251 |
theObject |
546 | 252 |
"return the real object represented by the receiver" |
395 | 253 |
|
546 | 254 |
^ theObject |
255 |
||
256 |
"Modified: 19.4.1997 / 12:53:01 / cg" |
|
257 |
! |
|
395 | 258 |
|
259 |
theObject:something |
|
546 | 260 |
"set the real object represented by the receiver" |
395 | 261 |
|
546 | 262 |
theObject := something. |
263 |
||
264 |
"Modified: 19.4.1997 / 12:53:10 / cg" |
|
265 |
! ! |
|
395 | 266 |
|
267 |
!DropObject methodsFor:'testing'! |
|
268 |
||
1482 | 269 |
isClassObject |
270 |
"return true, if the dropObject represents some class" |
|
271 |
||
272 |
^ false |
|
273 |
! |
|
274 |
||
395 | 275 |
isColorObject |
546 | 276 |
"return true, if the dropObject represents a color" |
277 |
||
395 | 278 |
^ false |
546 | 279 |
|
280 |
"Modified: 19.4.1997 / 12:52:36 / cg" |
|
395 | 281 |
! |
282 |
||
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
283 |
isFileInArchive |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
284 |
^ false |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
285 |
! |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
286 |
|
395 | 287 |
isFileObject |
546 | 288 |
"return true, if the dropObject represents some file or directory" |
289 |
||
395 | 290 |
^ false |
546 | 291 |
|
292 |
"Modified: 19.4.1997 / 12:52:29 / cg" |
|
395 | 293 |
! |
294 |
||
295 |
isImageObject |
|
546 | 296 |
"return true, if the dropObject represents some image" |
297 |
||
395 | 298 |
^ false |
546 | 299 |
|
300 |
"Modified: 19.4.1997 / 12:52:22 / cg" |
|
395 | 301 |
! |
302 |
||
1482 | 303 |
isMethodObject |
304 |
"return true, if the dropObject represents some method" |
|
305 |
||
306 |
^ false |
|
307 |
! |
|
308 |
||
395 | 309 |
isTextObject |
546 | 310 |
"return true, if the dropObject represents some text" |
311 |
||
395 | 312 |
^ false |
546 | 313 |
|
314 |
"Modified: 19.4.1997 / 12:52:17 / cg" |
|
315 |
! ! |
|
316 |
||
1482 | 317 |
!DropObject::Class methodsFor:'testing'! |
318 |
||
319 |
isClassObject |
|
320 |
"return true, if the dropObject represents a class" |
|
321 |
||
322 |
^ true |
|
323 |
! ! |
|
324 |
||
325 |
!DropObject::Color class methodsFor:'defaults'! |
|
326 |
||
327 |
displayObjectName |
|
328 |
"return the name of a bitmap image file, which is used |
|
329 |
during a drag." |
|
330 |
||
331 |
^ 'bitmaps/xpmBitmaps/misc_tools/color_wheel.xpm' |
|
332 |
||
333 |
"Modified: 19.4.1997 / 15:38:12 / cg" |
|
334 |
! ! |
|
335 |
||
336 |
!DropObject::Color methodsFor:'testing'! |
|
337 |
||
338 |
isColorObject |
|
339 |
"return true, if the dropObject represents a color" |
|
340 |
||
341 |
^ true |
|
342 |
||
343 |
"Modified: 19.4.1997 / 12:51:57 / cg" |
|
344 |
! ! |
|
345 |
||
403 | 346 |
!DropObject::File class methodsFor:'defaults'! |
347 |
||
348 |
displayObjectName |
|
546 | 349 |
"return the name of a bitmap image file, which is used |
350 |
during a drag." |
|
403 | 351 |
|
546 | 352 |
^ 'bitmaps/xpmBitmaps/document_images/xfm_file.xpm' |
403 | 353 |
|
546 | 354 |
"Modified: 19.4.1997 / 15:38:07 / cg" |
403 | 355 |
! ! |
356 |
||
357 |
!DropObject::File methodsFor:'accessing'! |
|
358 |
||
359 |
theObject:aPathname |
|
546 | 360 |
|f path| |
403 | 361 |
|
546 | 362 |
f := aPathname asFilename. |
363 |
path := f pathName. |
|
364 |
info := f info. |
|
403 | 365 |
|
546 | 366 |
super theObject:f |
367 |
||
368 |
"Modified: 19.4.1997 / 12:49:17 / cg" |
|
403 | 369 |
! ! |
370 |
||
371 |
!DropObject::File methodsFor:'queries'! |
|
372 |
||
373 |
exists |
|
546 | 374 |
"returns true if the file or directory exists |
403 | 375 |
" |
376 |
^ info notNil |
|
546 | 377 |
|
378 |
"Modified: 19.4.1997 / 12:49:30 / cg" |
|
403 | 379 |
! |
380 |
||
381 |
isDirectory |
|
382 |
"checks whether file is a directory |
|
383 |
" |
|
384 |
^ (info notNil and:[info type == #directory]) |
|
385 |
! |
|
386 |
||
387 |
isHtmlFile |
|
546 | 388 |
"checks whether file is an html file |
403 | 389 |
" |
390 |
|suffixes pathName| |
|
391 |
||
392 |
isHtmlFile isNil ifTrue:[ |
|
393 |
(info isNil or:[self isDirectory]) ifTrue:[ |
|
394 |
isHtmlFile := false |
|
395 |
] ifFalse:[ |
|
396 |
pathName := theObject asString. |
|
397 |
suffixes := #( '.html' '.htm' '.HTML' '.HTM' ). |
|
398 |
isHtmlFile := (suffixes findFirst:[:el|pathName endsWith:el]) ~~ 0 |
|
399 |
] |
|
400 |
]. |
|
401 |
^ isHtmlFile |
|
546 | 402 |
|
403 |
"Modified: 19.4.1997 / 12:49:37 / cg" |
|
403 | 404 |
! |
405 |
||
406 |
isImageFile |
|
546 | 407 |
"returns true if file is an image file |
403 | 408 |
" |
546 | 409 |
|pathName| |
403 | 410 |
|
411 |
isImageFile isNil ifTrue:[ |
|
412 |
(info isNil or:[self isDirectory]) ifTrue:[ |
|
413 |
isImageFile := false |
|
414 |
] ifFalse:[ |
|
415 |
pathName := theObject asString. |
|
546 | 416 |
isImageFile := Image isImageFileSuffix:(pathName asFilename suffix). |
403 | 417 |
] |
418 |
]. |
|
419 |
^ isImageFile |
|
420 |
||
546 | 421 |
"Modified: 19.4.1997 / 12:50:58 / cg" |
403 | 422 |
! |
423 |
||
424 |
isPrintable |
|
1709
fc33be8aaa9c
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1623
diff
changeset
|
425 |
"returns false if file contains nonprintable characters" |
fc33be8aaa9c
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1623
diff
changeset
|
426 |
|
403 | 427 |
|stream buff size| |
428 |
||
429 |
isPrintable isNil ifTrue:[ |
|
430 |
isPrintable := false. |
|
431 |
||
432 |
(info isNil or:[self isDirectory]) ifFalse:[ |
|
1709
fc33be8aaa9c
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1623
diff
changeset
|
433 |
stream := theObject readStreamOrNil. |
fc33be8aaa9c
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
1623
diff
changeset
|
434 |
stream notNil ifTrue:[ |
403 | 435 |
buff := String new:300. |
436 |
size := stream nextBytes:300 into:buff. |
|
437 |
stream close. |
|
438 |
]. |
|
439 |
1 to:size do:[:i| |
|
440 |
(buff at:i) isPrintable ifFalse:[ |
|
441 |
^ isPrintable |
|
442 |
] |
|
443 |
]. |
|
444 |
isPrintable := true |
|
445 |
] |
|
446 |
]. |
|
447 |
^ isPrintable |
|
448 |
! ! |
|
449 |
||
450 |
!DropObject::File methodsFor:'testing'! |
|
451 |
||
452 |
isFileObject |
|
546 | 453 |
"return true, if the dropObject represents a file- or directory" |
396 | 454 |
|
455 |
^ true |
|
456 |
||
546 | 457 |
"Modified: 19.4.1997 / 12:51:49 / cg" |
395 | 458 |
! ! |
459 |
||
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
460 |
!DropObject::FileInArchive methodsFor:'testing'! |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
461 |
|
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
462 |
isFileInArchive |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
463 |
^ true |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
464 |
! ! |
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
465 |
|
1292 | 466 |
!DropObject::Image class methodsFor:'defaults'! |
467 |
||
468 |
displayObjectName |
|
469 |
"return the name of a bitmap image file, which is used |
|
470 |
during a drag." |
|
471 |
||
472 |
^ 'bitmaps/xpmBitmaps/misc_tools/picture.xpm' |
|
473 |
||
474 |
"Modified: 19.4.1997 / 15:38:02 / cg" |
|
475 |
! ! |
|
476 |
||
477 |
!DropObject::Image methodsFor:'testing'! |
|
478 |
||
479 |
isImageObject |
|
480 |
"return true, if the dropObject represents an image" |
|
481 |
||
482 |
^ true |
|
483 |
||
484 |
"Modified: 19.4.1997 / 12:51:28 / cg" |
|
485 |
! ! |
|
486 |
||
1482 | 487 |
!DropObject::Method methodsFor:'testing'! |
488 |
||
489 |
isMethodObject |
|
490 |
"return true, if the dropObject represents a method" |
|
491 |
||
492 |
^ true |
|
493 |
! ! |
|
494 |
||
495 |
!DropObject::Text class methodsFor:'defaults'! |
|
496 |
||
497 |
displayObjectName |
|
498 |
^ 'bitmaps/xpmBitmaps/document_images/yellow_file_text_grab.xpm' |
|
499 |
||
500 |
"Modified: 19.4.1997 / 15:40:33 / cg" |
|
501 |
! ! |
|
502 |
||
503 |
!DropObject::Text methodsFor:'testing'! |
|
504 |
||
505 |
isTextObject |
|
506 |
"return true, if the dropObject represents some text" |
|
507 |
||
508 |
^ true |
|
509 |
||
510 |
"Modified: 19.4.1997 / 12:52:08 / cg" |
|
511 |
! ! |
|
512 |
||
395 | 513 |
!DropObject class methodsFor:'documentation'! |
514 |
||
515 |
version |
|
1784
67f412dd5926
refactored inst-creation code;
Claus Gittinger <cg@exept.de>
parents:
1709
diff
changeset
|
516 |
^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.14 2003-06-12 11:09:59 cg Exp $' |
395 | 517 |
! ! |