eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DropContext':

Home

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

Class: DropContext


Inheritance:

   Object
   |
   +--DropContext

Package:
stx:libview2
Category:
Interface-DragAndDrop
Version:
rev: 1.20 date: 2018/06/15 00:48:47
user: cg
file: DropContext.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Claus Atzkern

Description:


instance, which keeps information about the current drag & drop operation.

dropObjects         <Collection>    collection of dropObjects.
rootPoint           <Point>         the current mouse position on the screen (root view).


Related information:

    DragAndDropManager
    DropObject
    DropSource
    DropTarget

Class protocol:

constants
o  dragTypeCopy

o  dragTypeDefault

o  dragTypeLink

o  dragTypeMove


Instance protocol:

accessing
o  dragHandler

o  dragHandler: aHandler

o  dragType
the type of drag - modified by pressing one of Shift, Ctrl or Alt

o  dragType: aSymbol
the type of drag - modified by pressing one of Shift, Ctrl or Alt

o  dropInfo
a hook for additional info

o  dropObjects
returns the collection of dropobjects

o  manager: something

o  rootPoint
returns the absolute point on the screen (rootPoint)

accessing-source
o  dropSource
returns the drop source or nil

o  sourceWidget
returns the source widget the drag is started from

accessing-target
o  dropTarget
returns the drop target or nil

o  targetId
returns the id of the target widget

o  targetPoint
returns the point on the target widget (in LOGICAL coordinates)

usage example(s):

the targetPoint is in LOGICAL coordinates NOT in device coordinates

o  targetPointInDeviceCoordinates
returns the point on the target widget (in DEVICE coordinates)

o  targetWidget
returns the widget assigned to the current dropTarget

actions
o  doDrop
evaluate the drop operation; set the feedBack

o  exchangeDragHandler: aHandler
make the new handler to the active handler

o  passiveAction: aBlock

o  saveDraw: aBlock
evaluate aBlock with the drag temporarily being undrawn
(i.e. restore original picture, evaluate the block, and draw dragged objects again).
Return blocks value.

change & update
o  contentsWillChange
called by the dropTarget-widget if the contents will change during a
dragAndDrop operation

drag & drop manager interface
o  dropObjects: something
set the collection of dropobjects

o  dropSource: aDropSource
set the dropSource

o  dropTarget: aDropTargetOrNil
set a new drop target

o  rootPoint: something
set the absolute point on the screen (rootPoint);
called by the drag and drop manager

o  sourceWidget: aView
set the source widget the drag is started from

o  targetWidget: aViewOrNil id: anId
set a new drop widget

queries
o  canDrop
returns true if the current dropTarget can drop the objects

o  clearHasDroppedFlagToSuppressFeedBack
can be used from within a targets drop code,
to signal that no feedBack should be send to the
dropSource (because the drop did not happen)

o  hasDropped

o  isAlienView
returns true if current dropTarget is not an ST/X view

o  isRootView
returns true if the current target widget is the root view (screen)


Private classes:

    DragType
    DragTypeCopy
    DragTypeLink
    DragTypeMove


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 26 Apr 2024 08:29:24 GMT