RadioButton.st
changeset 3688 e266cdde958a
parent 3687 48b9b4e7ed08
child 3689 9efe3a56ff1f
equal deleted inserted replaced
3687:48b9b4e7ed08 3688:e266cdde958a
   389     "Modified: / 30.7.1998 / 21:31:55 / cg"
   389     "Modified: / 30.7.1998 / 21:31:55 / cg"
   390 !
   390 !
   391 
   391 
   392 roundOffForm
   392 roundOffForm
   393     RoundOffForm isNil ifTrue:[
   393     RoundOffForm isNil ifTrue:[
   394         RoundOffForm := Form 
   394         self updateStyleCache.
   395             width:16 
       
   396             height:16 
       
   397             fromArray:#[
       
   398 
       
   399 "/                        2r00000011 2r10000000
       
   400 "/                        2r00001111 2r11100000
       
   401 "/                        2r00111100 2r01111000
       
   402 "/                        2r00110000 2r00011000
       
   403 "/                        2r01100000 2r00001100
       
   404 "/                        2r01100000 2r00001100
       
   405 "/                        2r11000000 2r00000110
       
   406 "/                        2r11000000 2r00000110
       
   407 "/                        2r11000000 2r00000110
       
   408 "/                        2r01100000 2r00001100
       
   409 "/                        2r01100000 2r00001100
       
   410 "/                        2r00110000 2r00011000
       
   411 "/                        2r00111100 2r01111000
       
   412 "/                        2r00001111 2r11100000
       
   413 "/                        2r00000011 2r10000000
       
   414 "/                        2r00000000 2r00000000
       
   415 
       
   416                         2r00000011 2r10000000
       
   417                         2r00001100 2r01100000
       
   418                         2r00010000 2r00010000
       
   419                         2r00100000 2r00001000
       
   420                         2r01000000 2r00000100
       
   421                         2r01000000 2r00000100
       
   422                         2r10000000 2r00000010
       
   423                         2r10000000 2r00000010
       
   424                         2r10000000 2r00000010
       
   425                         2r01000000 2r00000100
       
   426                         2r01000000 2r00000100
       
   427                         2r00100000 2r00001000
       
   428                         2r00010000 2r00010000
       
   429                         2r00001100 2r01100000
       
   430                         2r00000011 2r10000000
       
   431                         2r00000000 2r00000000
       
   432                        ].
       
   433         RoundOffForm := RoundOffForm onDevice:Display.
       
   434     ].
   395     ].
   435     ^ RoundOffForm
   396     ^ RoundOffForm
   436 
   397 !
   437     "Created: / 3.11.1997 / 12:41:13 / cg"
   398 
   438     "Modified: / 30.7.1998 / 21:33:03 / cg"
   399 roundOffForm_old
       
   400     ^ Form 
       
   401         width:16 
       
   402         height:16 
       
   403         fromArray:#[
       
   404             2r00000011 2r10000000
       
   405             2r00001100 2r01100000
       
   406             2r00010000 2r00010000
       
   407             2r00100000 2r00001000
       
   408             2r01000000 2r00000100
       
   409             2r01000000 2r00000100
       
   410             2r10000000 2r00000010
       
   411             2r10000000 2r00000010
       
   412             2r10000000 2r00000010
       
   413             2r01000000 2r00000100
       
   414             2r01000000 2r00000100
       
   415             2r00100000 2r00001000
       
   416             2r00010000 2r00010000
       
   417             2r00001100 2r01100000
       
   418             2r00000011 2r10000000
       
   419             2r00000000 2r00000000
       
   420         ].
   439 !
   421 !
   440 
   422 
   441 roundOnForm
   423 roundOnForm
   442     RoundOnForm isNil ifTrue:[
   424     RoundOnForm isNil ifTrue:[
   443         RoundOnForm := Form 
   425         self updateStyleCache.
   444                         width:16 
       
   445                         height:16 
       
   446                         fromArray:#[
       
   447 
       
   448 "/                                    2r00000000 2r00000000
       
   449 "/                                    2r00000000 2r00000000
       
   450 "/                                    2r00000000 2r00000000
       
   451 "/                                    2r00000111 2r11000000
       
   452 "/                                    2r00001111 2r11100000
       
   453 "/                                    2r00011111 2r11110000
       
   454 "/                                    2r00011111 2r11110000
       
   455 "/                                    2r00011111 2r11110000
       
   456 "/                                    2r00011111 2r11110000
       
   457 "/                                    2r00011111 2r11110000
       
   458 "/                                    2r00001111 2r11100000
       
   459 "/                                    2r00000111 2r11000000
       
   460 "/                                    2r00000000 2r00000000
       
   461 "/                                    2r00000000 2r00000000
       
   462 "/                                    2r00000000 2r00000000
       
   463 "/                                    2r00000000 2r00000000
       
   464 
       
   465                                     2r00000000 2r00000000
       
   466                                     2r00000000 2r00000000
       
   467                                     2r00000000 2r00000000
       
   468                                     2r00000000 2r00000000
       
   469                                     2r00000011 2r10000000
       
   470                                     2r00000111 2r11000000
       
   471                                     2r00001111 2r11100000
       
   472                                     2r00001111 2r11100000
       
   473                                     2r00001111 2r11100000
       
   474                                     2r00000111 2r11000000
       
   475                                     2r00000011 2r10000000
       
   476                                     2r00000000 2r00000000
       
   477                                     2r00000000 2r00000000
       
   478                                     2r00000000 2r00000000
       
   479                                     2r00000000 2r00000000
       
   480                                     2r00000000 2r00000000
       
   481                                    ].
       
   482         RoundOnForm := RoundOnForm onDevice:Display.
       
   483     ].
   426     ].
   484     ^ RoundOnForm
   427     ^ RoundOnForm
   485 
   428 
   486     "RoundOnForm := nil. self updateStyleCache"
   429     "
       
   430      RoundOnForm := nil. 
       
   431      self updateStyleCache
       
   432     "
       
   433 !
       
   434 
       
   435 roundOnForm_old
       
   436     ^ Form 
       
   437         width:16 
       
   438         height:16 
       
   439         fromArray:#[
       
   440             2r00000000 2r00000000
       
   441             2r00000000 2r00000000
       
   442             2r00000000 2r00000000
       
   443             2r00000000 2r00000000
       
   444             2r00000011 2r10000000
       
   445             2r00000111 2r11000000
       
   446             2r00001111 2r11100000
       
   447             2r00001111 2r11100000
       
   448             2r00001111 2r11100000
       
   449             2r00000111 2r11000000
       
   450             2r00000011 2r10000000
       
   451             2r00000000 2r00000000
       
   452             2r00000000 2r00000000
       
   453             2r00000000 2r00000000
       
   454             2r00000000 2r00000000
       
   455             2r00000000 2r00000000
       
   456        ].
   487 !
   457 !
   488 
   458 
   489 updateStyleCache
   459 updateStyleCache
   490     <resource: #style (#'radioButton.style' 
   460     <resource: #style (#'radioButton.style' 
   491                        #'radioButton.activeLevel'
   461                        #'radioButton.activeLevel'
   528         RoundOffForm := StyleSheet isWindowsXPStyle
   498         RoundOffForm := StyleSheet isWindowsXPStyle
   529                             ifTrue:[ self radioOnIcon_xp ]
   499                             ifTrue:[ self radioOnIcon_xp ]
   530                             ifFalse:[ self radioOnIcon_w95 ]
   500                             ifFalse:[ self radioOnIcon_w95 ]
   531     ].
   501     ].
   532     f notNil ifTrue:[
   502     f notNil ifTrue:[
       
   503         "/ RoundOnForm := self roundOnForm_old.
   533         RoundOnForm := f onDevice:Display
   504         RoundOnForm := f onDevice:Display
   534     ].
   505     ].
   535 
   506 
   536     f := StyleSheet at:#'radioButton.passiveImageFile'.
   507     f := StyleSheet at:#'radioButton.passiveImageFile'.
   537     f notNil ifTrue:[
   508     f notNil ifTrue:[
   538         f := Smalltalk imageFromFileNamed:f forClass:self.
   509         f := Smalltalk imageFromFileNamed:f forClass:self.
   539     ] ifFalse:[
   510     ] ifFalse:[
   540         f := StyleSheet at:#'radioButton.passiveImage'.
   511         f := StyleSheet at:#'radioButton.passiveImage'.
   541     ].
   512     ].
   542     f isNil ifTrue:[
   513     f isNil ifTrue:[
       
   514         "/ RoundOffForm := self roundOffForm_old.
   543         RoundOffForm := StyleSheet isWindowsXPStyle
   515         RoundOffForm := StyleSheet isWindowsXPStyle
   544                             ifTrue:[ self radioOffIcon_xp ]
   516                             ifTrue:[ self radioOffIcon_xp ]
   545                             ifFalse:[ self radioOffIcon_w95 ]
   517                             ifFalse:[ self radioOffIcon_w95 ]
   546     ].
   518     ].
   547 
   519 
   906 ! !
   878 ! !
   907 
   879 
   908 !RadioButton class methodsFor:'documentation'!
   880 !RadioButton class methodsFor:'documentation'!
   909 
   881 
   910 version
   882 version
   911     ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.38 2008-08-05 13:25:21 cg Exp $'
   883     ^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.39 2008-08-06 09:34:34 cg Exp $'
   912 ! !
   884 ! !