[ENH]BooklikeMorph

Karl Ramberg karl.ramberg at chello.se
Sat May 6 19:57:56 UTC 2000


Makes the Page Controls in BookMorphs pick up a mouseMove so the
BookMorph
is easier to move around ! (My english is all wierd today... :-) )

Karl
-------------- next part --------------
'From Squeak2.8alpha of 19 February 2000 [latest update: #1972] on 6 May 2000 at 9:48:14 pm'!

!BooklikeMorph methodsFor: 'page controls' stamp: 'kfr 5/6/2000 21:47'!
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: #mouseStillDown 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