[ENH]BooklikeMorph (update)
Bert Freudenberg
bert at isgnw.CS.Uni-Magdeburg.De
Sun May 7 09:43:06 UTC 2000
On Sat, 6 May 2000, Karl Ramberg wrote:
> Makes the Page Controls in BookMorphs pick up a mouseMove so the
> BookMorph is easier to move around !
Yep, that's nice! But why is it slower than grabbing the book itself? Oh,
you're handling #mouseStillDown instead of #mouseDown ... I'll attach a
fixed changeset.
-- Bert
-------------- next part --------------
'From Squeak2.8alpha of 19 January 2000 [latest update: #2052] on 7 May 2000 at 11:39:29 am'!
!BooklikeMorph methodsFor: 'page controls' stamp: 'bf 5/7/2000 11:35'!
showPageControls: controlSpecs
| spacer pageControls anIndex |
self hidePageControls.
anIndex _ (submorphs size > 0 and: [submorphs first hasProperty: #header])
ifTrue: [2]
ifFalse: [1].
spacer _ Morph new color: color; extent: 0 at 10.
spacer setProperty: #pageControl toValue: true.
self privateAddMorph: spacer atIndex: anIndex.
pageControls _ self makePageControlsFrom: controlSpecs.
pageControls borderWidth: 0; inset: 4.
pageControls setProperty: #pageControl toValue: true.
pageControls setNameTo: 'Page Controls'.
pageControls eventHandler: (EventHandler new on: #mouseDown send: #move to: self).
self privateAddMorph: pageControls beSticky atIndex: anIndex! !
!BooklikeMorph methodsFor: 'misc' stamp: 'kfr 5/6/2000 21:47'!
move
^ self activeHand grabMorph: self
! !
More information about the Squeak-dev
mailing list
|