|
Class: PluggableDropView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--PluggableDropView
- Package:
- stx:libview2
- Category:
- Views-Basic
- Version:
- rev:
1.4
date: 2021/02/16 00:51:15
- user: cg
- file: PluggableDropView.st directory: libview2
- module: stx stc-classLibrary: libview2
- Author:
- cg
a view which can be configured to handle drops
accessing
-
canDropHandler: aBlockOrValueHolder
-
Modified (format): / 16-02-2021 / 01:49:47 / cg
-
dropHandler: something
-
drag & drop
-
canDrop: dropObjects
-
invoked to ask if objects can be dropped;
true if no canDropHandler is defined
-
dropObjects: dropObjects
-
invoked to actually drop those objects;
call the defined dropHandler
embedded in another view:
|top v|
top := StandardSystemView new.
top extent:300@300.
v := PluggableDropView new.
v origin:10@10 corner:150@150.
top add:v.
v canDropHandler:[:dropObjects| true].
v dropHandler:[:dropObjects| Transcript showCR:e'dropped {dropObjects}'].
top open
|
|