'From etoys3.0 of 24 February 2008 [latest update: #2084] on 28 August 2008 at 1:06:10 pm'! "Change Set: screenModeMenuAug28-yo Date: 28 August 2008 Author: Yoshiki Ohshima Add full screen to the screen mode choice."! !SugarNavigatorBar methodsFor: 'buttons creation' stamp: 'yo 8/25/2008 11:26'! availableDisplayModes | ret actual desired | ret _ OrderedCollection new: 3. ret add: #physical. actual _ DisplayScreen actualScreenSize. desired _ OLPCVirtualScreen virtualScreenExtent. actual = desired ifTrue: [^ ret]. ret add: #scaledVirtual. (actual x > desired x and: [actual y > desired y]) ifTrue: [ ret add: #centeredVirtual. ]. (self inFullScreenMode not) ifTrue: [ ret add: #fullScreen ] ifFalse: [ ret add: #nonFullScreen ]. ^ ret asArray. ! ! !SugarNavigatorBar methodsFor: 'buttons creation' stamp: 'yo 8/25/2008 11:29'! stringForDisplayModeIs: aSymbol "Answer the (English) description of the scaling mode represented by the given symbol." | currentMode | currentMode _ self currentDisplayMode. aSymbol == #physical ifTrue: [ ^ (currentMode = aSymbol ifTrue: [''] ifFalse: ['']), 'No Scaling' translated. ]. aSymbol == #scaledVirtual ifTrue: [ ^ (currentMode = aSymbol ifTrue: [''] ifFalse: ['']), 'Scaled Virtual Extent' translated. ]. aSymbol == #centeredVirtual ifTrue: [ ^ (currentMode = aSymbol ifTrue: [''] ifFalse: ['']), 'Centered Virtual Extent' translated. ]. aSymbol == #fullScreen ifTrue: [ ^ 'Full Screen' translated. ]. aSymbol == #nonFullScreen ifTrue: [ ^ 'Non Full Screen' translated. ]. ! ! !SugarNavigatorBar methodsFor: 'button actions' stamp: 'yo 8/25/2008 11:26'! changeDisplayModeTo: aSymbol | currentMode | currentMode _ self currentDisplayMode. aSymbol = currentMode ifTrue: [^ self]. aSymbol == #physical ifTrue: [ ^ OLPCVirtualScreen unInstall. ]. aSymbol == #scaledVirtual ifTrue: [ ^ OLPCVirtualScreen install. ]. aSymbol == #centeredVirtual ifTrue: [ OLPCVirtualScreen install. ^ Display zoomOut: true. ]. aSymbol == #fullScreen ifTrue: [ ^ self fullScreenOn. ]. aSymbol == #nonFullScreen ifTrue: [ ^ self fullScreenOff. ]. ! !