eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DropObject':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DropObject


Inheritance:

   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.30 date: 2023/11/22 08:46:19
user: stefan
file: DropObject.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


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.

copyright

COPYRIGHT (c) 1997 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

defaults
o  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.

image specs
o  displayImage
This resource specification was automatically generated
by the ImageEditor of ST/X.

Usage example(s):

     self displayImage inspect
     ImageEditor openOnClass:self andSelector:#displayImage
     Icon flushCachedIcons

instance creation
o  dropObjectClassFor: someThing
given something to drag&drop, return an appropriate
dropObject class for it.

o  new: anObject
create an instance on anObject

o  newClass: aClass
create an instance for a class (dragging a class from a browser)

o  newColor: aColor
create an instance for a color (dragging a color from a bitmap editor)

o  newFile: aFilename
create an instance for a file or directory (dragging a file in a fileBrowser)

o  newFileInArchive: aFilename
create an instance for a file or directory contained inside an archive
(dragging a file from an archive shown in a fileBrowser)

o  newImage: anImageOrForm
create an instance for an image

o  newInstanceOf: aClass for: someThing
create an instance on something

o  newMethod: aMethod
create an instance for a method (dragging a method in a browser)

o  newProject: aPackageSymbol
create an instance for a package (dragging a package from a browser)

o  newText: aTextOrString
create an instance for some text (dragging some text from an editor)


Instance protocol:

accessing
o  asDragAndDropDisplayObjectOn: aDevice
return my graphical representation

o  displayObject
return my graphical representation - here a default is returned

o  displayObject: anObject
set my graphical representation

o  theObject
return the real object represented by the receiver

o  theObject: something
set the real object represented by the receiver

testing
o  isClassObject
return true, if the dropObject represents some class

o  isColorObject
return true, if the dropObject represents a color

o  isFileInArchive

o  isFileObject
return true, if the dropObject represents some file or directory

o  isImageObject
return true, if the dropObject represents some image

o  isMethodObject
return true, if the dropObject represents some method

o  isProjectObject
return true, if the dropObject represents some project

o  isTextObject
return true, if the dropObject represents some text


Private classes:

    Class
    Color
    File
    FileInArchive
    Image
    Method
    Project
    Text


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:21:53 GMT