UIObjectView.st
changeset 76 c9c4254a9ee5
parent 72 a5a7054e2b7d
child 78 a0a00603a8b6
equal deleted inserted replaced
75:c9779da5ce4e 76:c9c4254a9ee5
   553 
   553 
   554     motionAction  := [:movePoint| self doDragCreate:movePoint].
   554     motionAction  := [:movePoint| self doDragCreate:movePoint].
   555     releaseAction := [ self endCreate].
   555     releaseAction := [ self endCreate].
   556 
   556 
   557     object := createClass new.
   557     object := createClass new.
   558     widget addSubView:object.
   558     (widget isKindOf:ScrollableView) ifTrue:[
       
   559         widget scrolledView:object
       
   560     ] ifFalse:[
       
   561         widget addSubView:object.
       
   562     ].
   559 
   563 
   560     start := self alignToGrid:aPoint.
   564     start := self alignToGrid:aPoint.
   561     delta := widget originRelativeTo:self.
   565     delta := widget originRelativeTo:self.
   562     frame := Rectangle origin:(start - delta) corner:start.
   566     frame := Rectangle origin:(start - delta) corner:start.
   563 
   567 
   566     object realize.
   570     object realize.
   567 
   571 
   568     self actionCreate:object frame:frame delta:delta.
   572     self actionCreate:object frame:frame delta:delta.
   569     self invertOutlineOf:object.
   573     self invertOutlineOf:object.
   570 
   574 
   571 
   575     "Modified: 1.3.1997 / 01:46:17 / cg"
   572 ! !
   576 ! !
   573 
   577 
   574 !UIObjectView methodsFor:'object moving'!
   578 !UIObjectView methodsFor:'object moving'!
   575 
   579 
   576 doObjectMove:aPoint
   580 doObjectMove:aPoint