[ENH]ProjectNavigationMorph ballon help

Karl Ramberg karl.ramberg at chello.se
Tue Jun 20 16:32:12 UTC 2000


Make those cryptic navigation buttons a little more understandable.

Karl
-------------- next part --------------
'From Squeak2.9alpha of 13 June 2000 [latest update: #2424] on 20 June 2000 at 6:30:30 pm'!

!ProjectNavigationMorph methodsFor: 'as yet unclassified' stamp: 'kfr 6/20/2000 18:03'!
addButton: aString balloonText: anotherString for: aSymbol

	| b a |
	b _ SimpleButtonMorph new 
		target: self;
		borderColor: #raised;
		color: color darker;
		label: aString;
		setBalloonText: anotherString;
		actionSelector: aSymbol.
	a _ AlignmentMorph newColumn.
	a color: color; borderWidth: 0; inset: 2.
	a hResizing: #shrinkWrap; vResizing: #shrinkWrap.
	a addMorphBack: b.
	self addMorphBack: a.

! !

!ProjectNavigationMorph methodsFor: 'as yet unclassified' stamp: 'kfr 6/20/2000 18:08'!
addButtons

	self 
		addButton: '< Prev' balloonText: 'Previous project' for: #previousProject;
		addButton: 'Next >' balloonText: 'Next project' for: #nextProject;
		addButton: '^ Publish' balloonText: 'Publish this project. Save it where it came from (server, hard disk, etc.) ' for: #publishProject;
		addButton: 'Newer?' balloonText: 'Is there a newer version of this project ?' for: #getNewerVersionIfAvailable;
		addButton: 'Tell!!' balloonText: 'Tell a friend about this project' for: #tellAFriend.
! !

!ProjectNavigationMorph methodsFor: 'as yet unclassified' stamp: 'kfr 6/20/2000 18:24'!
step

	| delta |
	owner == self world ifFalse: [^self].
	(owner submorphs indexOf: self) = 1 ifFalse: [ 
		(owner firstSubmorph isMemberOf: BalloonMorph)
		ifFalse:[owner addMorphFront: self]].
	delta _ self bounds amountToTranslateWithin: self worldBounds.
	delta = (0 @ 0) ifFalse: [self position: self position + delta].
! !



More information about the Squeak-dev mailing list