|
Class: DropObject
Object
|
+--DropObject
|
+--DropObject::Class
|
+--DropObject::Color
|
+--DropObject::File
|
+--DropObject::Image
|
+--DropObject::Method
|
+--DropObject::Project
|
+--DropObject::Text
- Package:
- stx:libview2
- Category:
- Interface-DragAndDrop
- Version:
- rev:
1.26
date: 2019/05/07 14:41:11
- user: stefan
- file: DropObject.st directory: libview2
- module: stx stc-classLibrary: libview2
- Author:
- Claus Atzkern
instances of myself and subclasses wrap objects which are being
dragged (and dropped).
Any object can be dragged, but for some often encountered types,
specialized subclasses are provided, which react to certain queries.
DragAndDropManager
defaults
-
displayObject
-
return some object which is shown while dragging;
here an image based upon my displayObjectName is returned.
Either this method or #displayObjectName is usually redefined
in subclasses
-
displayObject: aDisplayObject
-
set the object which is shown while dragging;
this object must understand #displayOn:x:y: (i.e. the displayObject
protocol). The object is kept per class for ALL future drag operations.
Useful to change the default images in subclasses.
-
displayObjectName
-
return the name of a bitmap image file, which is used
during a drag.
Here, a dummy file is returned.
instance creation
-
dropObjectClassFor: someThing
-
given something to drag&drop, return an appropriate
dropObject class for it.
-
new: someThing
-
create an instance on something
-
newClass: aClass
-
create an instance for a class (dragging a class from a browser)
-
newColor: aColor
-
create an instance for a color (dragging a color from a bitmap editor)
-
newFile: aFilename
-
create an instance for a file or directory (dragging a file in a fileBrowser)
-
newFileInArchive: aFilename
-
create an instance for a file or directory contained inside an archive
(dragging a file from an archive shown in a fileBrowser)
-
newImage: anImageOrForm
-
create an instance for an image
-
newInstanceOf: aClass for: someThing
-
create an instance on something
-
newMethod: aMethod
-
create an instance for a method (dragging a method in a browser)
-
newProject: aPackageSymbol
-
create an instance for a package (dragging a package from a browser)
-
newText: aTextOrString
-
create an instance for some text (dragging some text from an editor)
accessing
-
displayObject
-
return my graphical representation - here a default is returned
-
displayObject: anObject
-
set my graphical representation
-
theObject
-
return the real object represented by the receiver
-
theObject: something
-
set the real object represented by the receiver
testing
-
isClassObject
-
return true, if the dropObject represents some class
-
isColorObject
-
return true, if the dropObject represents a color
-
isFileInArchive
-
-
isFileObject
-
return true, if the dropObject represents some file or directory
-
isImageObject
-
return true, if the dropObject represents some image
-
isMethodObject
-
return true, if the dropObject represents some method
-
isProjectObject
-
return true, if the dropObject represents some project
-
isTextObject
-
return true, if the dropObject represents some text
Class
Color
File
FileInArchive
Image
Method
Project
Text
|