--- a/MenuPanel.st Thu Oct 14 14:47:16 2004 +0200
+++ b/MenuPanel.st Thu Oct 14 14:47:41 2004 +0200
@@ -23,7 +23,8 @@
lastPointerView openDelayedMenuBlock preferredWidth application
originator centerItems hideOnRelease defaultHideOnRelease'
classVariableNames:'InitialSelectionQuerySignal Images LigthenedImages
- DefaultForegroundColor DefaultBackgroundColor'
+ DefaultForegroundColor DefaultBackgroundColor IconIndicationOn
+ IconIndicationOff'
poolDictionaries:''
category:'Views-Menus'
!
@@ -411,9 +412,12 @@
<resource: #image>
- ^Icon
- constantNamed:#'MenuPanel iconIndicationOff'
- ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUPG???8A0@@B@\@@@ G@@@HA0@@B@\@@@ G@@@HA0@@B@\@@@ G@@@HA0@@B@Z*** @@@@@@b') ; colorMapFromArray:#[255 255 255 127 127 127 170 170 170 0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a') ; yourself); yourself]
+ IconIndicationOff isNil ifTrue:[
+ IconIndicationOff := Icon
+ constantNamed:#'MenuPanel iconIndicationOff'
+ ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUPG???8A0@@B@\@@@ G@@@HA0@@B@\@@@ G@@@HA0@@B@\@@@ G@@@HA0@@B@Z*** @@@@@@b') ; colorMapFromArray:#[255 255 255 127 127 127 170 170 170 0 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a') ; yourself); yourself]
+ ].
+ ^ IconIndicationOff
!
iconIndicationOn
@@ -430,9 +434,12 @@
<resource: #image>
- ^Icon
- constantNamed:#'MenuPanel iconIndicationOn'
- ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'****$H@@@MBEUUWP!!UUU4HUUT]BEUTGP!!ETA4HPTA]BD@AWP!!PAU4HUAU]BEUUWP/???4EUUUU@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a') ; yourself); yourself]
+ IconIndicationOn isNil ifTrue:[
+ IconIndicationOn := Icon
+ constantNamed:#'MenuPanel iconIndicationOn'
+ ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'****$H@@@MBEUUWP!!UUU4HUUT]BEUTGP!!ETA4HPTA]BD@AWP!!PAU4HUAU]BEUUWP/???4EUUUU@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??3??O?<??3??O?<??3??O?<??3??O?<??3??@@a') ; yourself); yourself]
+ ].
+ ^ IconIndicationOn
!
iconRadioGroupDisabledOff
@@ -589,6 +596,8 @@
#'button.activeBackgroundColor' #'button.backgroundColor' #'button.lightColor'
#'button.enteredBackgroundColor' #'button.halfLightColor' #'button.halfShadowColor'
#'button.activeLevel' #'button.passiveLevel' #'button.edgeStyle'
+ #'menu.iconIndicationOn' #'menu.iconIndicationOff'
+ #'menu.iconIndicationOnFile' #'menu.iconIndicationOffFile'
)>
|styleSheet style var foregroundColor backgroundColor buttonPassiveBackgroundColor
@@ -678,6 +687,32 @@
Item updateStyleCache.
+ var := styleSheet at:#'menu.iconIndicationOn' ifAbsent:nil.
+ var notNil ifTrue:[
+ IconIndicationOn := var.
+ ] ifFalse:[
+ var := styleSheet at:#'menu.iconIndicationOn.bitmapFile' ifAbsent:nil.
+ var notNil ifTrue:[
+ var := Smalltalk imageFromFileNamed:var forClass:self.
+ var notNil ifTrue:[
+ IconIndicationOn := var.
+ ].
+ ].
+ ].
+self halt.
+ var := styleSheet at:#'menu.iconIndicationOff' ifAbsent:nil.
+ var notNil ifTrue:[
+ IconIndicationOff := var.
+ ] ifFalse:[
+ var := styleSheet at:#'menu.iconIndicationOff.bitmapFile' ifAbsent:nil.
+ var notNil ifTrue:[
+ var := Smalltalk imageFromFileNamed:var forClass:self.
+ var notNil ifTrue:[
+ IconIndicationOff := var.
+ ].
+ ].
+ ].
+
"
self updateStyleCache
"
@@ -7491,7 +7526,7 @@
!MenuPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.397 2004-08-30 18:16:58 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.398 2004-10-14 12:47:41 cg Exp $'
! !
MenuPanel initialize!