'From etoys2.1 of 26 July 2007 [latest update: #1556] on 16 August 2007 at 10:06:52 pm'! "Change Set: fullScreenBook-sw Date: 14 August 2007 Author: Scott Wallace TRAC 2825: When exiting full-screen mode of a BookMorph, restore the original position of the book. Also, make the enter/exit-full-screen items available in the main Book menu (formerly only avail in halo menu)"! !BookMorph methodsFor: 'menu' stamp: 'sw 8/14/2007 18:42'! addAdvancedItemsTo: aMenu "Add advanced items to a menu which allow the user to affect all the pages of the book. NB balloon help msgs still pending." | subMenu | subMenu := MenuMorph new defaultTarget: self. subMenu addTranslatedList: #( ('make all pages the same size as this page' makeUniformPageSize 'Make all the pages of this book be the same size as the page currently showing.') ('set background color for all pages' #setPageColor 'Choose a color to assign as the background color for all of this book''s pages') - ('uncache page sorter' uncachePageSorter) ('make a thread of projects in this book' buildThreadOfProjects) - ('make this the template for new pages' setNewPagePrototype)) . "NB The following 2 items do not get auto-updated in a persistent menu." newPagePrototype ifNotNil: [subMenu add: 'clear new-page template' translated action: #clearNewPagePrototype]. self isInFullScreenMode ifTrue: [subMenu add: 'exit full screen' translated action: #exitFullScreen] ifFalse: [subMenu add: 'show full screen' translated action: #goFullScreen]. (ActiveHand pasteBuffer isKindOf: PasteUpMorph) ifTrue: [subMenu addLine. subMenu add: 'paste book page' translated action: #pasteBookPage]. aMenu add: 'advanced...' translated subMenu: subMenu ! ! !BookMorph methodsFor: 'other' stamp: 'sw 8/14/2007 18:38'! exitFullScreen | floater | self isInFullScreenMode ifFalse: [^self]. self setProperty: #fullScreenMode toValue: false. floater _ self valueOfProperty: #floatingPageControls ifAbsent: [nil]. floater ifNotNil: [ floater delete. self removeProperty: #floatingPageControls. ]. self position: (self valueOfProperty: #positionWhenNotFullScreen ifAbsent: [Preferences sugarNavigator ifTrue: [0@75] ifFalse: [0@0]]). self adjustCurrentPageForFullScreen. ! ! !BookMorph methodsFor: 'other' stamp: 'sw 8/14/2007 18:36'! goFullScreen | floater | self isInFullScreenMode ifTrue: [^self]. self setProperty: #fullScreenMode toValue: true. self setProperty: #positionWhenNotFullScreen toValue: self position. self position: (currentPage topLeft - self topLeft) negated. self adjustCurrentPageForFullScreen. floater _ self buildFloatingPageControls. self setProperty: #floatingPageControls toValue: floater. floater openInWorld. ! !