DropContext.st
changeset 2627 9f78995f7a33
parent 2564 10ed9ff5b0fc
child 4126 1438e6fca79e
equal deleted inserted replaced
2626:762fe84ed4fa 2627:9f78995f7a33
    11 "
    11 "
    12 "{ Package: 'stx:libview2' }"
    12 "{ Package: 'stx:libview2' }"
    13 
    13 
    14 Object subclass:#DropContext
    14 Object subclass:#DropContext
    15 	instanceVariableNames:'dropObjects rootPoint dropSource sourceWidget dropTarget
    15 	instanceVariableNames:'dropObjects rootPoint dropSource sourceWidget dropTarget
    16 		targetWidget targetId hasDropped dragHandler manager dropInfo'
    16 		targetWidget targetId hasDropped dragHandler manager dropInfo
       
    17 		dragType'
    17 	classVariableNames:''
    18 	classVariableNames:''
    18 	poolDictionaries:''
    19 	poolDictionaries:''
    19 	category:'Interface-DragAndDrop'
    20 	category:'Interface-DragAndDrop'
       
    21 !
       
    22 
       
    23 Object subclass:#DragType
       
    24 	instanceVariableNames:''
       
    25 	classVariableNames:''
       
    26 	poolDictionaries:''
       
    27 	privateIn:DropContext
       
    28 !
       
    29 
       
    30 DropContext::DragType subclass:#DragTypeCopy
       
    31 	instanceVariableNames:''
       
    32 	classVariableNames:''
       
    33 	poolDictionaries:''
       
    34 	privateIn:DropContext
       
    35 !
       
    36 
       
    37 DropContext::DragType subclass:#DragTypeLink
       
    38 	instanceVariableNames:''
       
    39 	classVariableNames:''
       
    40 	poolDictionaries:''
       
    41 	privateIn:DropContext
       
    42 !
       
    43 
       
    44 DropContext::DragType subclass:#DragTypeMove
       
    45 	instanceVariableNames:''
       
    46 	classVariableNames:''
       
    47 	poolDictionaries:''
       
    48 	privateIn:DropContext
    20 !
    49 !
    21 
    50 
    22 !DropContext class methodsFor:'documentation'!
    51 !DropContext class methodsFor:'documentation'!
    23 
    52 
    24 copyright
    53 copyright
    52     [author:]
    81     [author:]
    53         Claus Atzkern
    82         Claus Atzkern
    54 "
    83 "
    55 ! !
    84 ! !
    56 
    85 
       
    86 !DropContext class methodsFor:'constants'!
       
    87 
       
    88 dragTypeCopy
       
    89     ^ DragTypeCopy
       
    90 !
       
    91 
       
    92 dragTypeDefault
       
    93     ^ DragTypeMove
       
    94 !
       
    95 
       
    96 dragTypeLink
       
    97     ^ DragTypeLink
       
    98 !
       
    99 
       
   100 dragTypeMove
       
   101     ^ DragTypeMove
       
   102 ! !
       
   103 
    57 !DropContext methodsFor:'accessing'!
   104 !DropContext methodsFor:'accessing'!
    58 
   105 
    59 dragHandler
   106 dragHandler
    60     ^ dragHandler
   107     ^ dragHandler
    61 
   108 
    62 !
   109 !
    63 
   110 
    64 dragHandler:aHandler
   111 dragHandler:aHandler
    65     dragHandler := aHandler
   112     dragHandler := aHandler
       
   113 !
       
   114 
       
   115 dragType
       
   116     "the type of drag - modified by pressing one of Shift, Ctrl or Alt"
       
   117 
       
   118     ^ dragType ? DragTypeMove
       
   119 !
       
   120 
       
   121 dragType:aSymbol
       
   122     "the type of drag - modified by pressing one of Shift, Ctrl or Alt"
       
   123 
       
   124     dragType := aSymbol
    66 !
   125 !
    67 
   126 
    68 dropInfo
   127 dropInfo
    69     "a hook for additional info"
   128     "a hook for additional info"
    70 
   129 
   296     ^ targetWidget isNil 
   355     ^ targetWidget isNil 
   297         ifTrue:[false]
   356         ifTrue:[false]
   298         ifFalse:[targetWidget isRootView]
   357         ifFalse:[targetWidget isRootView]
   299 ! !
   358 ! !
   300 
   359 
       
   360 !DropContext::DragType class methodsFor:'testing'!
       
   361 
       
   362 isDragTypeCopy
       
   363     ^ false
       
   364 !
       
   365 
       
   366 isDragTypeLink
       
   367     ^ false
       
   368 !
       
   369 
       
   370 isDragTypeMove
       
   371     ^ false
       
   372 ! !
       
   373 
       
   374 !DropContext::DragTypeCopy class methodsFor:'testing'!
       
   375 
       
   376 isDragTypeCopy
       
   377     ^ true
       
   378 ! !
       
   379 
       
   380 !DropContext::DragTypeLink class methodsFor:'testing'!
       
   381 
       
   382 isDragTypeLink
       
   383     ^ true
       
   384 ! !
       
   385 
       
   386 !DropContext::DragTypeMove class methodsFor:'testing'!
       
   387 
       
   388 isDragTypeMove
       
   389     ^ true
       
   390 ! !
       
   391 
   301 !DropContext class methodsFor:'documentation'!
   392 !DropContext class methodsFor:'documentation'!
   302 
   393 
   303 version
   394 version
   304     ^ '$Header: /cvs/stx/stx/libview2/DropContext.st,v 1.16 2008-11-17 22:36:18 cg Exp $'
   395     ^ '$Header: /cvs/stx/stx/libview2/DropContext.st,v 1.17 2009-05-01 17:36:53 cg Exp $'
   305 ! !
   396 ! !