From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:29:05 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>MacOS7VisualPairButton</name> <environment>UI</environment> <super>UI.VisualPairButton</super> <private>false</private> none passiveImage isActive windowActive isHorizontal <imports></imports> <category>UILooks-MacOS7</category> <attributes> <package>UILooks-MacOS7</package> </attributes> </class> <class> <name>MacOS7WidgetPolicy</name> <environment>UI</environment> <super>UI.MacWidgetPolicy</super> <private>false</private> none <imports></imports> <category>UILooks-MacOS7</category> <attributes> <package>UILooks-MacOS7</package> </attributes> </class> <class> <name>MacOS7ScrollBar</name> <environment>UI</environment> <super>UI.MacScrollBar</super> <private>false</private> none <imports></imports> <category>UILooks-MacOS7</category> <attributes> <package>UILooks-MacOS7</package> </attributes> </class> <comment> UI.MacOS7ScrollBar
Instances of this class are a scroll-bar in the Macintosh look&feel style. An instance can implement either the vertical or horizontal scroll bar. Instances are used by MacOS7BorderDecorationPolicy. Instance Variables: isActive <Boolean> Whether or not the scroll bar is currently displayed as being active Class Variables: MacScrollbarGray <Pattern> The grey pattern used in the scroll bar area.
</comment> <class> <name>MacOS7BorderDecorationPolicy</name> <environment>UI</environment> <super>UI.MacBorderDecorationPolicy</super> <private>false</private> none <imports></imports> <category>UILooks-MacOS7</category> <attributes> <package>UILooks-MacOS7</package> </attributes> </class> <comment> UI.MacOS7BorderDecorationPolicy
Instances of this class are a BorderDecorationPolicy for the Macintosh look & feel style. (BorderDecorationPolicy browse) to see the description of the purpose of a BorderDecorationPolicy. Class Variables: MacDownArrow <CachedImage> Image of the down arrow on bottom on vertical scroll bar MacDownArrowPressed <CachedImage> Image of the down arrow when pressed MacLeftArrow <CachedImage> Image of the left arrow on the horizontal scroll bar MacLeftArrowPressed <CachedImage> Image of the left arrow when pressed MacRightArrow <CachedImage> Image of the right arrow on the horizontal scroll bar MacRightArrowPressed <CachedImage> Image of the right arrow when pressed MacUpArrow <CachedImage> Image of the up arrow on the top of the vertical scroll bar MacUpArrowPressed <CachedImage> Image of the up arrow when pressed
</comment> <class> <name>MacOS7LookPolicy</name> <environment>UI</environment> <super>UI.MacLookPolicy</super> <private>false</private> none <imports></imports> <category>UILooks-MacOS7</category> <attributes> <package>UILooks-MacOS7</package> </attributes> </class> <name>MacButtonPalette</name> <environment>UI.MacOS7BorderDecorationPolicy</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacDownArrowPassive</name> <environment>UI.MacOS7BorderDecorationPolicy</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacLeftArrowPassive</name> <environment>UI.MacOS7BorderDecorationPolicy</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacRightArrowPassive</name> <environment>UI.MacOS7BorderDecorationPolicy</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacUpArrowPassive</name> <environment>UI.MacOS7BorderDecorationPolicy</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacMarkerPalette</name> <environment>UI.MacOS7ScrollBar</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacHorizontalMarker</name> <environment>UI.MacOS7ScrollBar</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <name>MacVerticalMarker</name> <environment>UI.MacOS7ScrollBar</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>UILooks-MacOS7</package> </attributes> <methods> UI.MacOS7VisualPairButton <category>displaying</category>
displayInactiveOn: aGraphicsContext "Display the receiver in the inactive state." | displayBounds | displayBounds := self bounds. (passiveImage == nil or: [windowActive not]) ifTrue: [ aGraphicsContext paint: ColorValue white. aGraphicsContext displayRectangle: self bounds. aGraphicsContext paint: self selectionForegroundColor] ifFalse: [passiveImage displayOn: aGraphicsContext at: displayBounds center - passiveImage preferredBounds center]
displayOn: aGraphicsContext "Display the receiver's scrolling information on aGraphicsContext." self shouldDisplayAsActive ifTrue: [super displayOn: aGraphicsContext] ifFalse: [self displayInactiveOn: aGraphicsContext].
</methods> <methods> UI.MacOS7VisualPairButton <category>broadcast</category>
downcastEvent: key with: parameter from: anObject "Change the button display in case the window gets in-/activated 18.2.1994 RW" | windowWasActive | super downcastEvent: key with: parameter from: anObject. key == #deactivate ifTrue: [windowWasActive := windowActive. windowActive := false. windowWasActive ifTrue: [self invalidate]. ^self]. key == #activate ifTrue: [windowWasActive := windowActive. windowActive := true. windowWasActive ifFalse: [self invalidate]]
</methods> <methods> UI.MacOS7VisualPairButton <category>initialize-release</category>
initialize super initialize. isActive := true. windowActive := true
offImage: image1 onImage: image2 passiveImage: image3 isHorizontal: aBoolean offImage := image1. onImage := image2. passiveImage := image3. isHorizontal := aBoolean.
</methods> <methods> UI.MacOS7VisualPairButton <category>testing</category>
isActive "Answer whether I should display myself as an active scroll bar." isActive == nil ifTrue: [ isActive := self shouldBeActive]. ^isActive
shouldBeActive "Answer whether I should be an active scroll bar considering the state of the model being scrolled." | occludedExtent | isHorizontal ifTrue: [occludedExtent := (model model scrollableExtent - model model visibleExtent) * (1 @ 0)] ifFalse: [occludedExtent := (model model scrollableExtent - model model visibleExtent) * (0 @ 1)]. ^occludedExtent x > 0 or: [occludedExtent y > 0]
shouldDisplayAsActive "Answer whether I should display myself as an active scroll bar." isActive := self shouldBeActive. ^self isActive & windowActive
</methods> <methods> UI.MacOS7VisualPairButton <category>updating</category>
update: anAspectSymbol with: aParameter from: aSender "For displaying active/inactive button pictures, when the model (the ScrollWrapper) changes its scrollable area. 18.2.1994 RW" | sba | sba := self shouldBeActive. sba == isActive ifFalse: [isActive := sba. self invalidate] ifTrue: [super update: anAspectSymbol with: aParameter from: aSender]
</methods> <methods> UI.MacOS7WidgetPolicy <category>accessing</category>
lookPolicyClass ^MacOS7LookPolicy
</methods> <methods> UI.MacOS7ScrollBar <category>displaying</category>
displayInteriorOn: aGraphicsContext "Display the entire interior area of the receiver exclusive of the scroll thumb marker." "This method is an override for real MacLookFeel 5.11.94 Roland Wagener." aGraphicsContext paint: MacScrollbarGray; displayRectangle: self bounds
</methods> <methods> UI.MacOS7ScrollBar <category>private</category>
displayMarkerOn: aGraphicsContext "Display the marker in a scrollbar. Modified for real MacLookFeel 13.2.1994 Roland Wagener" | box clipBox | clipBox := aGraphicsContext clippingBounds. box := self marker. (clipBox intersects: box) ifTrue: [self isVertical ifTrue:[MacVerticalMarker displayOn: aGraphicsContext at: box topLeft] ifFalse:[MacHorizontalMarker displayOn: aGraphicsContext at: box topLeft]]
markerLength ^16
</methods> <methods> UI.MacOS7ScrollBar class <category>class initialization</category>
initialize "MacOS7ScrollBar initialize" self initializePalettes. self initializeVerticalMarker. self initializeHorizontalMarker.
initializeHorizontalMarker "MacOS7ScrollBar initialize" MacHorizontalMarker := CachedImage on: (Image extent: 16@14 depth: 3 palette: MacMarkerPalette bits: #[ 16r41 16r11 16r11 16r11 16r11 16r11 16r11 16r15 16r41 16r33 16r33 16r33 16r33 16r33 16r33 16r35 16r41 16r33 16r33 16r33 16r33 16r33 16r33 16r35 16r41 16r33 16r33 16r33 16r33 16r33 16r33 16r35 16r41 16r30 16r16 16r16 16r16 16r16 16r13 16r35 16r41 16r30 16r16 16r16 16r16 16r16 16r13 16r35 16r41 16r30 16r16 16r16 16r16 16r16 16r13 16r35 16r41 16r30 16r16 16r16 16r16 16r16 16r13 16r35 16r41 16r30 16r16 16r16 16r16 16r16 16r13 16r35 16r41 16r30 16r16 16r16 16r16 16r16 16r13 16r35 16r41 16r33 16r33 16r33 16r33 16r33 16r33 16r35 16r41 16r33 16r33 16r33 16r33 16r33 16r33 16r35 16r41 16r33 16r33 16r33 16r33 16r33 16r33 16r35 16r45 16r55 16r55 16r55 16r55 16r55 16r55 16r55 ])
initializePalettes "MacOS7ScrollBar initialize" MacScrollbarGray := Pattern from: (CachedImage on: (Image extent: 8 @ 2 depth: 1 palette: (MappedPalette withColors: ((Array new: 2) at: 1 put: (ColorValue scaledRed: 7099 scaledGreen: 7099 scaledBlue: 7099); at: 2 put: (ColorValue scaledRed: 3822 scaledGreen: 3822 scaledBlue: 3822); yourself)) bits: #[68 17 ] pad: 8)). MacMarkerPalette := MappedPalette withColors: ((Array new: 7) at: 1 put: (ColorValue scaledRed: 8191 scaledGreen: 6553 scaledBlue: 3276); at: 2 put: (ColorValue scaledRed: 8191 scaledGreen: 6553 scaledBlue: 4915); at: 3 put: ColorValue white; at: 4 put: ColorValue lightGray; at: 5 put: (ColorValue scaledRed: 2730 scaledGreen: 2730 scaledBlue: 2730); at: 6 put: (ColorValue scaledRed: 4915 scaledGreen: 3276 scaledBlue: 0); at: 7 put: (ColorValue scaledRed: 6553 scaledGreen: 4915 scaledBlue: 1638); yourself).
initializeVerticalMarker "MacOS7ScrollBar initialize" MacVerticalMarker := CachedImage on: (Image extent: 14@16 depth: 3 palette:MacMarkerPalette bits: #[ 16r44 16r44 16r44 16r44 16r44 16r44 16r44 16r00 16r11 16r11 16r11 16r11 16r11 16r11 16r15 16r00 16r13 16r33 16r33 16r33 16r33 16r33 16r35 16r00 16r13 16r33 16r00 16r00 16r00 16r33 16r35 16r00 16r13 16r33 16r11 16r11 16r11 16r33 16r35 16r00 16r13 16r33 16r66 16r66 16r66 16r33 16r35 16r00 16r13 16r33 16r11 16r11 16r11 16r33 16r35 16r00 16r13 16r33 16r66 16r66 16r66 16r33 16r35 16r00 16r13 16r33 16r11 16r11 16r11 16r33 16r35 16r00 16r13 16r33 16r66 16r66 16r66 16r33 16r35 16r00 16r13 16r33 16r11 16r11 16r11 16r33 16r35 16r00 16r13 16r33 16r66 16r66 16r66 16r33 16r35 16r00 16r13 16r33 16r11 16r11 16r11 16r33 16r35 16r00 16r13 16r33 16r33 16r33 16r33 16r33 16r35 16r00 16r13 16r33 16r33 16r33 16r33 16r33 16r35 16r00 16r55 16r55 16r55 16r55 16r55 16r55 16r55 16r00 ])
</methods> <methods> UI.MacOS7ScrollBar class <category>constants</category>
scrollBarGray ^MacScrollbarGray
</methods> <methods> UI.MacOS7BorderDecorationPolicy <category>private - layout</category>
downButtonFor: aScrollWrapper "Create a button, as in the up and down buttons of a vertical scrollbar" | model b | model := PluggableAdaptor on: aScrollWrapper. model getBlock: [:m | false] putBlock: [:theView :theValue | theView scrollVertically: theView scrollGrid y negated] updateBlock: [:m :a :p | true]. b := MacOS7VisualPairButton model: model. b offImage: MacDownArrow onImage: MacDownArrowPressed passiveImage: MacDownArrowPassive isHorizontal: false. self configureScrollerButton: b forModel: model. ^self withBounds: b
horizontalScrollBarFor: aScrollWrapper "Create a scrollbar for the view. This is a composite of two buttons and a slider." | bar button scroller | bar := CompositePart new. button := (self leftButtonFor: aScrollWrapper). button layout: (LayoutFrame new bottomFraction: 1; rightOffset: scrollButtonThickness-1). bar addWrapper: button. button := (self rightButtonFor: aScrollWrapper). button layout: (LayoutFrame new bottomFraction: 1; leftFraction: 1 offset: scrollButtonThickness negated+1; rightFraction: 1). bar addWrapper: button. scroller := self horizontalThumbFor: aScrollWrapper. scroller layout: (LayoutFrame new bottomFraction: 1; leftOffset: scrollButtonThickness-1; rightFraction: 1 offset: scrollButtonThickness negated+1). bar addWrapper: scroller. ^self withBorder: bar
horizontalThumbFor: aScrollWrapper "Create a scrollbar for the view. This is a composite of two buttons and a slider." | scroller | scroller := (MacOS7ScrollBar model: aScrollWrapper) beHorizontal. "scroller controller dragOutline: true." scroller := self withBounds: scroller. ^scroller
leftButtonFor: aScrollWrapper "Create a button, as in the up and down buttons of a vertical scrollbar" | model b | model := PluggableAdaptor on: aScrollWrapper. model getBlock: [:m | false] putBlock: [:view :v | v ifTrue: [view scrollHorizontally: view scrollGrid y]] updateBlock: [:m :a :p | false]. b := MacOS7VisualPairButton model: model. b offImage: MacLeftArrow onImage: MacLeftArrowPressed passiveImage: MacLeftArrowPassive isHorizontal: true. self configureScrollerButton: b forModel: model. ^self withBounds: b
preferredBoundsFor: aBorderDecorator | bounds vdelta hdelta b| b := aBorderDecorator hasBorder. hdelta := (b and: [aBorderDecorator hasHorizontalScrollBar]) ifTrue: [1] ifFalse: [0]. vdelta := (b and: [aBorderDecorator hasVerticalScrollBar]) ifTrue: [1] ifFalse: [0]. bounds := self border displayBoxFor: aBorderDecorator scrollerComponent preferredBounds. bounds := bounds expandedBy: inset. ^Rectangle left: bounds left - (self leftOffsetFor: aBorderDecorator) right: bounds right - ((self rightOffsetFor: aBorderDecorator)+vdelta) top: bounds top - (self topOffsetFor: aBorderDecorator) bottom: bounds bottom - ((self bottomOffsetFor: aBorderDecorator)+hdelta)
rightButtonFor: aScrollWrapper "Create a button, as in the up and down buttons of a vertical scrollbar" | model b | model := PluggableAdaptor on: aScrollWrapper. model getBlock: [:m | false] putBlock: [:view :v | v ifTrue: [view scrollHorizontally: view scrollGrid y negated ]] updateBlock: [:m :a :p | true]. b := MacOS7VisualPairButton model: model. b offImage: MacRightArrow onImage: MacRightArrowPressed passiveImage: MacRightArrowPassive isHorizontal: true. self configureScrollerButton: b forModel: model. ^self withBounds: b
upButtonFor: aScrollWrapper "Create a button, as in the up and down buttons of a vertical scrollbar" | model b | model := PluggableAdaptor on: aScrollWrapper. model getBlock: [:m | false] putBlock: [:view :v | v ifTrue: [view scrollVertically: view scrollGrid y]] updateBlock: [:m :a :p | true]. b := MacOS7VisualPairButton model: model. b offImage: MacUpArrow onImage: MacUpArrowPressed passiveImage: MacUpArrowPassive isHorizontal: false. self configureScrollerButton: b forModel: model. ^self withBounds: b
verticalScrollBarFor: aScrollWrapper "Create a scrollbar for the view. This is a composite of two buttons and a slider." | bar button scroller | bar := CompositePart new. button := (self upButtonFor: aScrollWrapper). button layout: (LayoutFrame new rightFraction: 1; bottomOffset: scrollButtonThickness-1). bar addWrapper: button. button := (self downButtonFor: aScrollWrapper). button layout: (LayoutFrame new rightFraction: 1; topFraction: 1 offset: scrollButtonThickness negated+1; bottomFraction: 1). bar addWrapper: button. scroller := self verticalThumbFor: aScrollWrapper. scroller layout: (LayoutFrame new rightFraction: 1; topOffset: scrollButtonThickness - 1; bottomFraction: 1 offset: scrollButtonThickness negated + 1). bar addWrapper: scroller. ^self withBorder: bar
verticalThumbFor: aScrollWrapper "Create a scrollbar for the view. This is a composite of two buttons and a slider." | scroller | scroller := (MacOS7ScrollBar model: aScrollWrapper) beVertical. "scroller controller dragOutline: true." scroller := self withBounds: scroller. ^scroller
</methods> <methods> UI.MacOS7BorderDecorationPolicy <category>initialize-release</category>
initialize "Initialize the receiver with the default values." super initialize. scrollbarThickness := 16. scrollButtonThickness := 16. markerThickness := 14. menuBarHeight := 8. minMarkerExtent := 1. border := SimpleBorder new
</methods> <methods> UI.MacOS7BorderDecorationPolicy <category>private - regions</category>
topOffsetFor: aDecorator "Compute the distance from the top of the container to the top of the data area" ^0
</methods> <methods> UI.MacOS7BorderDecorationPolicy class <category>class-initialization</category>
initialize "MacOS7BorderDecorationPolicy initialize" self initializePalette. self initializeMacUpArrow. self initializeMacDownArrow. self initializeMacLeftArrow. self initializeMacRightArrow . self initializeMacUpArrowPressed. self initializeMacDownArrowPressed. self initializeMacLeftArrowPressed. self initializeMacRightArrowPressed. self initializePassiveImages. MacGrowBox := CachedImage on: (Image extent: 14@14 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[ 2r00000000 2r00000000 2r00000000 2r00000000 2r00111111 2r10000000 2r00100000 2r10000000 2r00100000 2r11111000 2r00100000 2r10001000 2r00100000 2r10001000 2r00100000 2r10001000 2r00111111 2r10001000 2r00000010 2r00001000 2r00000010 2r00001000 2r00000011 2r11111000 2r00000000 2r00000000 2r00000000 2r00000000] pad: 16).
initializeMacDownArrow "MacOS7BorderDecorationPolicy initialize" MacDownArrow := CachedImage on: (Image extent: 14 @ 15 depth: 3 palette: MacButtonPalette bits: #[ 16r55 16r55 16r55 16r55 16r55 16r55 16r55 16r00 16r33 16r33 16r33 16r33 16r33 16r33 16r30 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r34 16r44 16r11 16r11 16r14 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r31 16r11 16r12 16r22 16r11 16r11 16r40 16r00 16r34 16r12 16r22 16r22 16r22 16r14 16r40 16r00 16r34 16r41 16r22 16r22 16r21 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r44 16r41 16r21 16r44 16r44 16r40 16r00 16r34 16r44 16r44 16r14 16r44 16r44 16r40 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 ])
initializeMacDownArrowPressed "MacOS7BorderDecorationPolicy initialize" MacDownArrowPressed := CachedImage on: (Image extent: 14@15 depth: 3 palette:MacButtonPalette bits: #[ 16r55 16r55 16r55 16r55 16r55 16r55 16r55 16r00 16r33 16r33 16r33 16r33 16r33 16r33 16r30 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r35 16r55 16r55 16r55 16r55 16r55 16r40 16r00 16r34 16r55 16r55 16r55 16r55 16r54 16r40 16r00 16r34 16r45 16r55 16r55 16r55 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r45 16r55 16r44 16r44 16r40 16r00 16r34 16r44 16r44 16r54 16r44 16r44 16r40 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 ])
initializeMacLeftArrow "MacOS7BorderDecorationPolicy initialize" MacLeftArrow := CachedImage on: ( Image extent: 15@14 depth: 3 palette: MacButtonPalette bits: #[ 16r33 16r33 16r33 16r33 16r33 16r33 16r30 16r50 16r34 16r44 16r44 16r41 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r11 16r44 16r44 16r40 16r50 16r34 16r44 16r41 16r21 16r44 16r44 16r40 16r50 16r34 16r44 16r12 16r21 16r11 16r11 16r40 16r50 16r34 16r41 16r22 16r22 16r22 16r21 16r40 16r50 16r34 16r12 16r22 16r22 16r22 16r21 16r40 16r50 16r34 16r41 16r22 16r22 16r22 16r21 16r40 16r50 16r34 16r44 16r12 16r21 16r11 16r11 16r40 16r50 16r34 16r44 16r41 16r21 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r11 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r41 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r50 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r50 ])
initializeMacLeftArrowPressed "MacOS7BorderDecorationPolicy initialize" MacLeftArrowPressed := CachedImage on: (Image extent: 15@14 depth: 3 palette: MacButtonPalette bits: #[ 16r33 16r33 16r33 16r33 16r33 16r33 16r30 16r50 16r34 16r44 16r44 16r45 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r55 16r44 16r44 16r40 16r50 16r34 16r44 16r45 16r55 16r44 16r44 16r40 16r50 16r34 16r44 16r55 16r55 16r55 16r55 16r40 16r50 16r34 16r45 16r55 16r55 16r55 16r55 16r40 16r50 16r34 16r55 16r55 16r55 16r55 16r55 16r40 16r50 16r34 16r45 16r55 16r55 16r55 16r55 16r40 16r50 16r34 16r44 16r55 16r55 16r55 16r55 16r40 16r50 16r34 16r44 16r45 16r55 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r55 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r45 16r44 16r44 16r40 16r50 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r50 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r50 ])
initializeMacRightArrow "MacOS7BorderDecorationPolicy initialize" "Pixmap fromClipboard asImage convertToPalette: MacButtonPalette" MacRightArrow := CachedImage on: (Image extent: 15@14 depth: 3 palette: MacButtonPalette bits: #[ 16r53 16r33 16r33 16r33 16r33 16r33 16r33 16r00 16r53 16r44 16r44 16r41 16r44 16r44 16r44 16r00 16r53 16r44 16r44 16r41 16r14 16r44 16r44 16r00 16r53 16r44 16r44 16r41 16r21 16r44 16r44 16r00 16r53 16r41 16r11 16r11 16r22 16r14 16r44 16r00 16r53 16r41 16r22 16r22 16r22 16r21 16r44 16r00 16r53 16r41 16r22 16r22 16r22 16r22 16r14 16r00 16r53 16r41 16r22 16r22 16r22 16r21 16r44 16r00 16r53 16r41 16r11 16r11 16r22 16r14 16r44 16r00 16r53 16r44 16r44 16r41 16r21 16r44 16r44 16r00 16r53 16r44 16r44 16r41 16r14 16r44 16r44 16r00 16r53 16r44 16r44 16r41 16r44 16r44 16r44 16r00 16r53 16r44 16r44 16r44 16r44 16r44 16r44 16r00 16r50 16r00 16r00 16r00 16r00 16r00 16r00 16r00 ])
initializeMacRightArrowPressed "MacOS7BorderDecorationPolicy initialize" MacRightArrowPressed := CachedImage on: ( Image extent: 15@14 depth: 3 palette: MacButtonPalette bits: #[ 16r53 16r33 16r33 16r33 16r33 16r33 16r33 16r00 16r53 16r44 16r44 16r45 16r44 16r44 16r44 16r00 16r53 16r44 16r44 16r45 16r54 16r44 16r44 16r00 16r53 16r44 16r44 16r45 16r55 16r44 16r44 16r00 16r53 16r45 16r55 16r55 16r55 16r54 16r44 16r00 16r53 16r45 16r55 16r55 16r55 16r55 16r44 16r00 16r53 16r45 16r55 16r55 16r55 16r55 16r54 16r00 16r53 16r45 16r55 16r55 16r55 16r55 16r44 16r00 16r53 16r45 16r55 16r55 16r55 16r54 16r44 16r00 16r53 16r44 16r44 16r45 16r55 16r44 16r44 16r00 16r53 16r44 16r44 16r45 16r54 16r44 16r44 16r00 16r53 16r44 16r44 16r45 16r44 16r44 16r44 16r00 16r53 16r44 16r44 16r44 16r44 16r44 16r44 16r00 16r50 16r00 16r00 16r00 16r00 16r00 16r00 16r00 ])
initializeMacUpArrow "MacOS7BorderDecorationPolicy initialize" MacUpArrow := CachedImage on: (Image extent: 14@15 depth: 3 palette: MacButtonPalette bits: #[ 16r33 16r33 16r33 16r33 16r33 16r33 16r30 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r34 16r44 16r44 16r14 16r44 16r44 16r40 16r00 16r34 16r44 16r41 16r21 16r44 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r41 16r22 16r22 16r21 16r44 16r40 16r00 16r34 16r12 16r22 16r22 16r22 16r14 16r40 16r00 16r31 16r11 16r12 16r22 16r11 16r11 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r44 16r12 16r22 16r14 16r44 16r40 16r00 16r34 16r44 16r11 16r11 16r14 16r44 16r40 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r55 16r55 16r55 16r55 16r55 16r55 16r55 16r00 ])
initializeMacUpArrowPressed "MacOS7BorderDecorationPolicy initialize" MacUpArrowPressed := CachedImage on:(Image extent: 14@15 depth: 3 palette: MacButtonPalette bits: #[ 16r33 16r33 16r33 16r33 16r33 16r33 16r30 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r34 16r44 16r44 16r54 16r44 16r44 16r40 16r00 16r34 16r44 16r45 16r55 16r44 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r45 16r55 16r55 16r55 16r44 16r40 16r00 16r34 16r55 16r55 16r55 16r55 16r54 16r40 16r00 16r35 16r55 16r55 16r55 16r55 16r55 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r55 16r55 16r54 16r44 16r40 16r00 16r34 16r44 16r44 16r44 16r44 16r44 16r40 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r55 16r55 16r55 16r55 16r55 16r55 16r55 16r00 ])
initializePalette MacButtonPalette := MappedPalette withColors: ((Array new: 6) at: 1 put: (ColorValue brightness: 7/15); at: 2 put: (ColorValue red: 9/15 green: 6/15 blue: 0); at: 3 put: (ColorValue red: 1 green: 12/15 blue: 6/15); at: 4 put: ColorValue white; at: 5 put: (ColorValue brightness: 13/15); at: 6 put: ColorValue black; yourself)
initializePassiveImages "Initialize the passive images. 19.2.1994 RW" MacUpArrowPassive := CachedImage on:(Image extent: 14@15 depth: 3 palette: MacButtonPalette bits: #[ 16r33 16r33 16r33 16r33 16r33 16r33 16r33 16r00 16r33 16r33 16r33 16r33 16r33 16r33 16r33 16r00 16r33 16r33 16r33 16r00 16r33 16r33 16r33 16r00 16r33 16r33 16r30 16r33 16r03 16r33 16r33 16r00 16r33 16r33 16r03 16r33 16r30 16r33 16r33 16r00 16r33 16r30 16r33 16r33 16r33 16r03 16r33 16r00 16r33 16r03 16r33 16r33 16r33 16r30 16r33 16r00 16r30 16r00 16r03 16r33 16r30 16r00 16r03 16r00 16r33 16r33 16r03 16r33 16r30 16r33 16r33 16r00 16r33 16r33 16r03 16r33 16r30 16r33 16r33 16r00 16r33 16r33 16r03 16r33 16r30 16r33 16r33 16r00 16r33 16r33 16r00 16r00 16r00 16r33 16r33 16r00 16r33 16r33 16r33 16r33 16r33 16r33 16r33 16r00 16r33 16r33 16r33 16r33 16r33 16r33 16r33 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 16r00 ]). MacDownArrowPassive := CachedImage on: (MacUpArrowPassive image reflectedInY). MacLeftArrowPassive := CachedImage on: (MacDownArrowPassive image rotatedByQuadrants: 1). MacRightArrowPassive := CachedImage on: (MacUpArrowPassive image rotatedByQuadrants: 1).
</methods> <methods> UI.MacOS7BorderDecorationPolicy class <category>installation</category>
install "Set LookPreferences so it uses Mac look policies." "This method is here to backward support the Interface menu on the APOK 1.1 advanced Launcher." MacOS7LookPolicy installLookPreferences
</methods> <methods> UI.MacOS7LookPolicy <category>implementation classes</category>
borderLayoutPolicy "Answer a BorderDecorationPolicy appropriate for the receiver." ^MacOS7BorderDecorationPolicy new
</methods> <methods> UI.MacOS7LookPolicy class <category>installation</category>
deinstallCursors "De-install the Mac-like cursor versions in class Cursor and retract interest for any changes on the UIBuilder defaultPolicyModel. Only do this, if the new policy is realy a different one." UIBuilder defaultPolicyModel value == self ifTrue: [^self]. UIBuilder defaultPolicyModel retractInterestsFor: self. ('Mac*' match: UIBuilder defaultPolicyModel value name) ifTrue:[^self]. Cursor initialize. OSHandle currentOS == #mac ifTrue: [self primEnableHostCursor: false]
installLookPreferences "Install the receiver into the LookPreferences( done by superclass), then register with UIBuilder's defaultPolicyModel valueHolder to be informed of de-installation. In case of de-installation, the execute cursor has to be replaced by the default one." | aUILookPolicy | Cursor initMacNormal. Cursor initMacXeq. OSHandle currentOS == #mac ifTrue: [self primEnableHostCursor: true]. MacOS7WidgetPolicy initialize. MacRadioButtonView initialize. MacCheckButtonView initialize. MacActionButtonView initialize. MacOS7BorderDecorationPolicy initialize. MacOS7ScrollBar initialize. aUILookPolicy := self new. LookPreferences edgeDecorationPolicy: (aUILookPolicy borderLayoutPolicy inset: 1); widgetPolicy: aUILookPolicy widgetPolicy. GraphicsDevice allOpenDevices do: [:device | device updateWidgetPolicy]. UIBuilder defaultPolicyModel onChangeSend: #deinstallCursors to: self
menuName ^(#Macintosh7 << #menus >> 'Macintosh (OS-7)')
</methods> <methods> UI.MacOS7LookPolicy class <category>initialize-release</category>
initialize "Initialize the class." "Attempt to use Chicago for labeling widgets and in menues. MacOS7LookPolicy initialize." | characterAttributes textAttributes | useSystemFontOnWidgets := true. characterAttributes := PlatformCharacterAttributes newWithDefaultAttributes. characterAttributes at: #bold put: [:query | query]. characterAttributes setPlatformId: #Mac. characterAttributes setPlatformQuery: (FontDescription new family: 'Chicago'; pixelSize: 12) . characterAttributes setPortableQuery: (FontDescription new family: #('helv*' '*'); pixelSize: 12; serif: false; boldness: 0.6 "for better readability on SunOS (instead of 0.7)"). textAttributes := VariableSizeTextAttributes new. textAttributes setCharacterAttributes: characterAttributes. textAttributes fontAttributeForLeading: #normal. textAttributes install. systemAttributes := textAttributes. systemWidgetAttributes := textAttributes.
postLoadActionFor: aParcel "After loading the GHMacLookFeel parcel, install the new look." aParcel name = 'GHMacLookFeel' ifTrue: [UIBuilder defaultPolicyClass: (Smalltalk at: (LookPreferences probableLAFAndHWMgr at: 1) ifAbsent: [MacLookPolicy])]
</methods> <methods> UI.MacOS7LookPolicy class <category>private</category>
primEnableHostCursor: trueFalse "Use the hosts system cursors for a while. This will only work on Mac from version 5i.1 onward!!" "MacOS7LookPolicy primEnableHostCursor: true" <primitive: 744> ^self primitiveFailed
</methods> <initialize> UI.MacOS7ScrollBar </initialize> <initialize> UI.MacOS7BorderDecorationPolicy </initialize> <initialize> UI.MacOS7LookPolicy </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>MacLookPolicy</name> <environment>UI</environment> <super>UI.UILookPolicy</super> <private>false</private> none <imports></imports> <category>UILooks-Mac</category> <attributes> <package>UILooks-Mac</package> </attributes> </class> <class> <name>MacBorderDecorationPolicy</name> <environment>UI</environment> <super>UI.EmulationBorderDecorationPolicy</super> <private>false</private> none <imports></imports> <category>UILooks-Mac</category> <attributes> <package>UILooks-Mac</package> </attributes> </class> <class> <name>VisualPairButton</name> <environment>UI</environment> <super>UI.ScrollerButtonView</super> <private>false</private> none offImage onImage <imports></imports> <category>UIBasics-Components</category> <attributes> <package>UIBasics-Components</package> </attributes> </class> <class> <name>MacScrollBar</name> <environment>UI</environment> <super>UI.EmulationFixedThumbScrollBar</super> <private>false</private> none isActive windowActive <imports></imports> <category>UILooks-Mac</category> <attributes> <package>UILooks-Mac</package> </attributes> </class> <class> <name>MacWidgetPolicy</name> <environment>UI</environment> <super>UI.WidgetPolicy</super> <private>false</private> none <imports></imports> <category>UILooks-Mac</category> <attributes> <package>UILooks-Mac</package> </attributes> </class>