UIObjectView.st
changeset 84 da0459487089
parent 82 99dc76d66eab
child 89 35c5711729c2
equal deleted inserted replaced
83:d9377c397262 84:da0459487089
   424     |extent x y selectors values|
   424     |extent x y selectors values|
   425 
   425 
   426 "minimum extent
   426 "minimum extent
   427 "
   427 "
   428     (anObject specClass supportsSubComponents) ifTrue:[
   428     (anObject specClass supportsSubComponents) ifTrue:[
   429         extent := 5@5
   429         extent := 25@25
   430     ] ifFalse:[
   430     ] ifFalse:[
   431         extent := self extent.
   431         extent := self extent.
   432         x := extent x // 3.
   432         x := extent x // 3.
   433         y := extent y // 3.
   433         y := extent y // 3.
   434         extent := anObject preferredExtent.
   434         extent := anObject preferredExtent.
   524 startCreate:aPoint
   524 startCreate:aPoint
   525     "start a widget create
   525     "start a widget create
   526     "
   526     "
   527     |widget object start frame delta|
   527     |widget object start frame delta|
   528 
   528 
   529     (createClass isNil or:[self numberOfSelections > 1]) ifTrue:[
   529     self selection notNil ifTrue:[
   530         self unselect.
   530         self numberOfSelections > 1 ifTrue:[
   531       ^ self setDefaultActions.
   531             self warn:'to much elements selected'.
   532     ].
   532           ^ self setDefaultActions.
   533 
   533         ].
   534     (widget := self singleSelection) notNil ifTrue:[
   534         self unselect
   535         self unselect.
   535     ].
   536 
   536 
   537         (self isPoint:aPoint containedIn:widget) ifFalse:[
   537     (    (widget := self findObjectAt:aPoint) notNil
   538             widget := self
   538      and:[widget specClass supportsSubComponents]
   539         ] ifTrue:[
   539     ) ifFalse:[
   540             widget specClass supportsSubComponents ifFalse:[
       
   541                 ^ self setDefaultActions.
       
   542             ]
       
   543         ]
       
   544     ] ifFalse:[
       
   545         widget := self
   540         widget := self
   546     ].
   541     ].
   547 
   542 
   548     motionAction  := [:movePoint| self doDragCreate:movePoint].
   543     motionAction  := [:movePoint| self doDragCreate:movePoint].
   549     releaseAction := [ self endCreate].
   544     releaseAction := [ self endCreate].
   565     object extent:(actionData minExtent).
   560     object extent:(actionData minExtent).
   566     object realize.
   561     object realize.
   567 
   562 
   568     self actionCreate:object frame:frame delta:delta.
   563     self actionCreate:object frame:frame delta:delta.
   569     self invertOutlineOf:object.
   564     self invertOutlineOf:object.
   570 
       
   571     "Modified: 1.3.1997 / 01:46:17 / cg"
       
   572 ! !
   565 ! !
   573 
   566 
   574 !UIObjectView methodsFor:'object moving'!
   567 !UIObjectView methodsFor:'object moving'!
   575 
   568 
   576 doObjectMove:aPoint
   569 doObjectMove:aPoint