'From etoys2.2 of 21 September 2007 [latest update: #1778] on 19 November 2007 at 9:56:04 am'! "Change Set: QG-JumpTo-tk Date: 19 November 2007 Author: Ted Kaehler Add ability to adjust the look of the page control in the Guides. Method JumpToAdjust: changes colors of 'Jump to...' button and makes it act on mouseUp."! !BooklikeMorph methodsFor: 'page controls' stamp: 'tk 11/19/2007 09:28'! pageControls "Return the page controls colums" ^ self submorphWithProperty: #pageControl! ! !QuickGuideMorph methodsFor: 'initialization' stamp: 'tk 11/19/2007 09:53'! initialize | newPage | newPagePrototype _ QuickGuideHolderMorph new. newPagePrototype guideName: 'empty'. newPagePrototype setProperty: #transitionSpec toValue: (Array with: 'silence' with: #none with: #none). super initialize. order _ OrderedCollection with: 'index'. newPage _ newPagePrototype veryDeepCopy. newPage guideName: 'index'. self insertPage: newPage pageSize: 100@100 atIndex: 1. self goToPage: 2. self deletePageBasic. self pageControlsAtTop: false. self jumpToAdjust: self pageControls. ! ! !QuickGuideMorph methodsFor: 'page controls' stamp: 'tk 11/19/2007 09:50'! jumpToAdjust: pageControlColumn "Change look of JumpTo: button, since specs don't have enough options." | bar jump | bar _ pageControlColumn firstSubmorph firstSubmorph. jump _ bar submorphThat: [:mm | mm class == SimpleButtonMorph and: [mm actionSelector == #showJumpToMenu] ] ifNone: [^ nil]. jump color: (Color r: 0.839 g: 1.0 b: 0.806); borderColor: (Color gray: 0.6); actWhen: #buttonUp. ! ! !QuickGuideMorph methodsFor: 'page controls' stamp: 'tk 11/19/2007 09:29'! shortControlSpecs ^ { #spacer. #pageNumber. #variableSpacer. {#PrevPage. #previousPage. 'Previous page' translated}. #spacer. #showDescription. #spacer. {#NextPage. #nextPage. 'Next page' translated}. #variableSpacer. {' Jump to... '. #showJumpToMenu. 'Menu to see another Guide' translated. #border}. "further adjusted in jumpToAdjust: " #spacer. }! !