MenuPanel.st
changeset 2755 f8035120da51
parent 2754 e1099c448aa9
child 2761 611ecd331c14
equal deleted inserted replaced
2754:e1099c448aa9 2755:f8035120da51
    22 		showSeparatingLines showGroupDivider implicitGrabView
    22 		showSeparatingLines showGroupDivider implicitGrabView
    23 		lastPointerView openDelayedMenuBlock preferredWidth application
    23 		lastPointerView openDelayedMenuBlock preferredWidth application
    24 		originator centerItems hideOnRelease defaultHideOnRelease'
    24 		originator centerItems hideOnRelease defaultHideOnRelease'
    25 	classVariableNames:'InitialSelectionQuerySignal Images LigthenedImages
    25 	classVariableNames:'InitialSelectionQuerySignal Images LigthenedImages
    26 		DefaultForegroundColor DefaultBackgroundColor IconIndicationOn
    26 		DefaultForegroundColor DefaultBackgroundColor IconIndicationOn
    27 		IconIndicationOff IconRadioOn IconRadioOff'
    27 		IconIndicationOff IconRadioOn IconRadioOff
       
    28 		IconDisabledIndicationOn IconDisabledIndicationOff
       
    29 		IconDisabledRadioOn IconDisabledRadioOff'
    28 	poolDictionaries:''
    30 	poolDictionaries:''
    29 	category:'Views-Menus'
    31 	category:'Views-Menus'
    30 !
    32 !
    31 
    33 
    32 Object subclass:#Item
    34 Object subclass:#Item
   372      ImageEditor openOnClass:self andSelector:#iconIndicationDisabledOff
   374      ImageEditor openOnClass:self andSelector:#iconIndicationDisabledOff
   373     "
   375     "
   374 
   376 
   375     <resource: #image>
   377     <resource: #image>
   376 
   378 
   377     ^Icon
   379     IconDisabledIndicationOff isNil ifTrue:[
   378 	constantNamed:#'MenuPanel iconIndicationDisabledOff'
   380         IconDisabledIndicationOff := Icon
   379 	ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUPG???8A:***@^*** G***(A:***@^*** G***(A:***@^*** G***(A:***@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]
   381             constantNamed:#'MenuPanel iconIndicationDisabledOff'
       
   382             ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUPG???8A:***@^*** G***(A:***@^*** G***(A:***@^*** G***(A:***@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]
       
   383     ].
       
   384     ^ IconDisabledIndicationOff
   380 !
   385 !
   381 
   386 
   382 iconIndicationDisabledOn
   387 iconIndicationDisabledOn
   383     "This resource specification was automatically generated
   388     "This resource specification was automatically generated
   384      by the ImageEditor of ST/X."
   389      by the ImageEditor of ST/X."
   391      ImageEditor openOnClass:self andSelector:#iconIndicationDisabledOn
   396      ImageEditor openOnClass:self andSelector:#iconIndicationDisabledOn
   392     "
   397     "
   393 
   398 
   394     <resource: #image>
   399     <resource: #image>
   395 
   400 
   396     ^Icon
   401     IconDisabledIndicationOn isNil ifTrue:[
   397 	constantNamed:#'MenuPanel iconIndicationDisabledOn'
   402         IconDisabledIndicationOn := Icon
   398 	ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'****$H@@@MBO???P#???4H??<=BO?<OP#O<C4H0<C=BL@C?P#0C?4H?C?=BO???P/???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]
   403             constantNamed:#'MenuPanel iconIndicationDisabledOn'
       
   404             ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'****$H@@@MBO???P#???4H??<=BO?<OP#O<C4H0<C=BL@C?P#0C?4H?C?=BO???P/???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]
       
   405     ].
       
   406     ^ IconDisabledIndicationOn
   399 !
   407 !
   400 
   408 
   401 iconIndicationOff
   409 iconIndicationOff
   402     "This resource specification was automatically generated
   410     "This resource specification was automatically generated
   403      by the ImageEditor of ST/X."
   411      by the ImageEditor of ST/X."
   454      ImageEditor openOnClass:self andSelector:#iconRadioGroupDisabledOff
   462      ImageEditor openOnClass:self andSelector:#iconRadioGroupDisabledOff
   455     "
   463     "
   456 
   464 
   457     <resource: #image>
   465     <resource: #image>
   458 
   466 
   459     ^Icon
   467     IconDisabledRadioOff isNil ifTrue:[
   460 	constantNamed:#'MenuPanel iconRadioGroupDisabledOff'
   468         IconDisabledRadioOff := Icon
   461 	ifAbsentPut:[(Depth2Image new) width: 15; height: 15; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@AUP@@E@AP@DJ*Y@DZ**(AJ**+AJ***LR***#D***(1J***LR***#AZ**#@Z**(0A** 0@C@C0@@O?@@') ; colorMapFromArray:#[0 0 0 85 85 85 170 170 170 255 255 255]; mask:((Depth1Image new) width: 15; height: 15; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A<@_<C?8_?1??O?:??+?>/?:??)?=G?4O< HL@_@') ; yourself); yourself]
   469             constantNamed:#'MenuPanel iconRadioGroupDisabledOff'
       
   470             ifAbsentPut:[(Depth2Image new) width: 15; height: 15; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@AUP@@E@AP@DJ*Y@DZ**(AJ**+AJ***LR***#D***(1J***LR***#AZ**#@Z**(0A** 0@C@C0@@O?@@') ; colorMapFromArray:#[0 0 0 85 85 85 170 170 170 255 255 255]; mask:((Depth1Image new) width: 15; height: 15; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A<@_<C?8_?1??O?:??+?>/?:??)?=G?4O< HL@_@') ; yourself); yourself]
       
   471     ].
       
   472     ^ IconDisabledRadioOff
   462 !
   473 !
   463 
   474 
   464 iconRadioGroupDisabledOn
   475 iconRadioGroupDisabledOn
   465     "This resource specification was automatically generated
   476     "This resource specification was automatically generated
   466      by the ImageEditor of ST/X."
   477      by the ImageEditor of ST/X."
   474      Icon flushCachedIcons
   485      Icon flushCachedIcons
   475     "
   486     "
   476 
   487 
   477     <resource: #image>
   488     <resource: #image>
   478 
   489 
   479     ^Icon
   490     IconDisabledRadioOn isNil ifTrue:[
   480         constantNamed:#'MenuPanel class iconRadioGroupDisabledOn'
   491         IconDisabledRadioOn := Icon
   481         ifAbsentPut:[(Depth2Image new) width: 15; height: 15; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@AUP@@E@AP@DJ*Y@DYUZ(AIUU+AIUUVLRUUU#D%UUX1IUUVLRUUU#AYUU#@Z%U(0A** 0@C@C0@@O?@@') ; colorMapFromArray:#[0 0 0 85 85 85 170 170 170 255 255 255]; mask:((Depth1Image new) width: 15; height: 15; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A<@_<C?8_?1??O?:??+?>/?:??)?=G?4O< HL@_@') ; yourself); yourself]
   492             constantNamed:#'MenuPanel class iconRadioGroupDisabledOn'
       
   493             ifAbsentPut:[(Depth2Image new) width: 15; height: 15; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@AUP@@E@AP@DJ*Y@DYUZ(AIUU+AIUUVLRUUU#D%UUX1IUUVLRUUU#AYUU#@Z%U(0A** 0@C@C0@@O?@@') ; colorMapFromArray:#[0 0 0 85 85 85 170 170 170 255 255 255]; mask:((Depth1Image new) width: 15; height: 15; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A<@_<C?8_?1??O?:??+?>/?:??)?=G?4O< HL@_@') ; yourself); yourself]
       
   494     ].
       
   495     ^ IconDisabledRadioOn
   482 !
   496 !
   483 
   497 
   484 iconRadioGroupOff
   498 iconRadioGroupOff
   485     "This resource specification was automatically generated
   499     "This resource specification was automatically generated
   486      by the ImageEditor of ST/X."
   500      by the ImageEditor of ST/X."
   604         #'button.activeLevel' #'button.passiveLevel' #'button.edgeStyle'
   618         #'button.activeLevel' #'button.passiveLevel' #'button.edgeStyle'
   605         #'menu.iconIndicationOn' #'menu.iconIndicationOff'
   619         #'menu.iconIndicationOn' #'menu.iconIndicationOff'
   606         #'menu.iconIndicationOn.bitmapFile' #'menu.iconIndication.bitmapOffFile'
   620         #'menu.iconIndicationOn.bitmapFile' #'menu.iconIndication.bitmapOffFile'
   607         #'menu.iconRadioOn' #'menu.iconRadioOff'
   621         #'menu.iconRadioOn' #'menu.iconRadioOff'
   608         #'menu.iconRadioOn.bitmapFile' #'menu.iconRadioOff.bitmapFile'
   622         #'menu.iconRadioOn.bitmapFile' #'menu.iconRadioOff.bitmapFile'
       
   623         #'menu.iconDisabledIndicationOn' #'menu.iconDisabledIndicationOff'
       
   624         #'menu.iconDisabledIndicationOn.bitmapFile' #'menu.iconDisabledIndication.bitmapOffFile'
       
   625         #'menu.iconDisabledRadioOn' #'menu.iconDisabledRadioOff'
       
   626         #'menu.iconDisabledRadioOn.bitmapFile' #'menu.iconDisabledRadioOff.bitmapFile'
   609     )>
   627     )>
   610 
   628 
   611     |styleSheet style var foregroundColor backgroundColor buttonPassiveBackgroundColor
   629     |styleSheet style var foregroundColor backgroundColor buttonPassiveBackgroundColor
   612     buttonActiveLevel buttonPassiveLevel buttonEnteredLevel getBitmapOrFile|
   630     buttonActiveLevel buttonPassiveLevel buttonEnteredLevel getBitmapOrFile|
   613 
   631 
   714     ].
   732     ].
   715     var := getBitmapOrFile value:#'menu.iconIndicationOff' value:#'menu.iconIndicationOff.bitmapFile'.
   733     var := getBitmapOrFile value:#'menu.iconIndicationOff' value:#'menu.iconIndicationOff.bitmapFile'.
   716     var notNil ifTrue:[
   734     var notNil ifTrue:[
   717         IconIndicationOff := var.
   735         IconIndicationOff := var.
   718     ].
   736     ].
       
   737     var := getBitmapOrFile value:#'menu.iconDisabledIndicationOn' value:#'menu.iconDisabledIndicationOn.bitmapFile'.
       
   738     var notNil ifTrue:[
       
   739         IconDisabledIndicationOn := var.
       
   740     ].
       
   741     var := getBitmapOrFile value:#'menu.iconDisabledIndicationOff' value:#'menu.iconDisabledIndicationOff.bitmapFile'.
       
   742     var notNil ifTrue:[
       
   743         IconDisabledIndicationOff := var.
       
   744     ].
       
   745 
   719     var := getBitmapOrFile value:#'menu.iconRadioOn' value:#'menu.iconRadioOn.bitmapFile'.
   746     var := getBitmapOrFile value:#'menu.iconRadioOn' value:#'menu.iconRadioOn.bitmapFile'.
   720     var notNil ifTrue:[
   747     var notNil ifTrue:[
   721         IconRadioOn := var.
   748         IconRadioOn := var.
   722     ].
   749     ].
   723     var := getBitmapOrFile value:#'menu.iconRadioOff' value:#'menu.iconRadioOff.bitmapFile'.
   750     var := getBitmapOrFile value:#'menu.iconRadioOff' value:#'menu.iconRadioOff.bitmapFile'.
   724     var notNil ifTrue:[
   751     var notNil ifTrue:[
   725         IconRadioOff := var.
   752         IconRadioOff := var.
       
   753     ].
       
   754     var := getBitmapOrFile value:#'menu.iconDisabledRadioOn' value:#'menu.iconDisabledRadioOn.bitmapFile'.
       
   755     var notNil ifTrue:[
       
   756         IconDisabledRadioOn := var.
       
   757     ].
       
   758     var := getBitmapOrFile value:#'menu.iconDisabledRadioOff' value:#'menu.iconDisabledRadioOff.bitmapFile'.
       
   759     var notNil ifTrue:[
       
   760         IconDisabledRadioOff := var.
   726     ].
   761     ].
   727 
   762 
   728     "
   763     "
   729      self updateStyleCache
   764      self updateStyleCache
   730     "
   765     "
  7536 ! !
  7571 ! !
  7537 
  7572 
  7538 !MenuPanel class methodsFor:'documentation'!
  7573 !MenuPanel class methodsFor:'documentation'!
  7539 
  7574 
  7540 version
  7575 version
  7541     ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.399 2004-10-14 12:58:07 cg Exp $'
  7576     ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.400 2004-10-14 13:12:36 cg Exp $'
  7542 ! !
  7577 ! !
  7543 
  7578 
  7544 MenuPanel initialize!
  7579 MenuPanel initialize!