SelectionInListView.st
branchdelegated_gc_text-view-selection-refactoring
changeset 5129 9549b0a1dbf5
parent 4999 7ca486a26aa1
parent 5121 f3bc3a3c7eba
child 5221 d036f1df0408
equal deleted inserted replaced
5088:1c8a17975b43 5129:9549b0a1dbf5
    27 		DefaultForegroundColor DefaultBackgroundColor
    27 		DefaultForegroundColor DefaultBackgroundColor
    28 		DefaultHilightForegroundColor DefaultHilightBackgroundColor
    28 		DefaultHilightForegroundColor DefaultHilightBackgroundColor
    29 		DefaultHilightFrameColor DefaultHilightLevel
    29 		DefaultHilightFrameColor DefaultHilightLevel
    30 		DefaultRightArrowStyle DefaultRightArrowLevel
    30 		DefaultRightArrowStyle DefaultRightArrowLevel
    31 		DefaultDisabledForegroundColor DefaultShadowColor
    31 		DefaultDisabledForegroundColor DefaultShadowColor
    32 		DefaultLightColor DefaultHilightStyle'
    32 		DefaultLightColor DefaultHilightStyle
       
    33 		DefaultHilightForegroundColorNoFocus
       
    34 		DefaultHilightBackgroundColorNoFocus'
    33 	poolDictionaries:''
    35 	poolDictionaries:''
    34 	category:'Views-Lists'
    36 	category:'Views-Lists'
    35 !
    37 !
    36 
    38 
    37 !SelectionInListView class methodsFor:'documentation'!
    39 !SelectionInListView class methodsFor:'documentation'!
  1035 updateStyleCache
  1037 updateStyleCache
  1036     "extract values from the styleSheet and cache them in class variables"
  1038     "extract values from the styleSheet and cache them in class variables"
  1037 
  1039 
  1038     <resource: #style (#'selection.disabledForegroundColor'
  1040     <resource: #style (#'selection.disabledForegroundColor'
  1039                        #'selection.hilightForegroundColor' #'selection.hilightBackgroundColor'
  1041                        #'selection.hilightForegroundColor' #'selection.hilightBackgroundColor'
       
  1042                        #'selection.hilightForegroundColorNoFocus' #'selection.hilightBackgroundColorNoFocus'
  1040                        #'selection.hilightFrameColor' #'selection.hilightLevel'
  1043                        #'selection.hilightFrameColor' #'selection.hilightLevel'
  1041                        #'selection.rightArrowStyle' #'selection.rightArrowLevel'
  1044                        #'selection.rightArrowStyle' #'selection.rightArrowLevel'
  1042                        #'selection.foregroundColor' #'selection.backgroundColor'
  1045                        #'selection.foregroundColor' #'selection.backgroundColor'
  1043                        #'selection.shadowColor' #'selection.lightColor'
  1046                        #'selection.shadowColor' #'selection.lightColor'
  1044                        #'selection.font' #'selection.hilightStyle')>
  1047                        #'selection.font' #'selection.hilightStyle')>
  1045 
  1048 
  1046     DefaultDisabledForegroundColor := StyleSheet colorAt:#'selection.disabledForegroundColor'.
  1049     DefaultDisabledForegroundColor := StyleSheet colorAt:#'selection.disabledForegroundColor'.
  1047     DefaultHilightForegroundColor := StyleSheet colorAt:#'selection.hilightForegroundColor'.
  1050     DefaultHilightForegroundColor := StyleSheet colorAt:#'selection.hilightForegroundColor'.
  1048     DefaultHilightBackgroundColor := StyleSheet colorAt:#'selection.hilightBackgroundColor'.
  1051     DefaultHilightBackgroundColor := StyleSheet colorAt:#'selection.hilightBackgroundColor'.
       
  1052     DefaultHilightForegroundColorNoFocus := StyleSheet colorAt:#'selection.hilightForegroundColorNoFocus'.
       
  1053     DefaultHilightBackgroundColorNoFocus := StyleSheet colorAt:#'selection.hilightBackgroundColorNoFocus'.
  1049     DefaultHilightFrameColor := StyleSheet colorAt:#'selection.hilightFrameColor'.
  1054     DefaultHilightFrameColor := StyleSheet colorAt:#'selection.hilightFrameColor'.
  1050     DefaultHilightLevel := StyleSheet at:#'selection.hilightLevel' default:0.
  1055     DefaultHilightLevel := StyleSheet at:#'selection.hilightLevel' default:0.
  1051     DefaultHilightStyle := StyleSheet at:#'selection.hilightStyle' default:(StyleSheet name).
  1056     DefaultHilightStyle := StyleSheet at:#'selection.hilightStyle' default:(StyleSheet name).
  1052     DefaultRightArrowStyle := StyleSheet at:#'selection.rightArrowStyle'.
  1057     DefaultRightArrowStyle := StyleSheet at:#'selection.rightArrowStyle'.
  1053     DefaultRightArrowLevel := StyleSheet at:#'selection.rightArrowLevel'.
  1058     DefaultRightArrowLevel := StyleSheet at:#'selection.rightArrowLevel'.
  1259          #bold 
  1264          #bold 
  1260     "
  1265     "
  1261 
  1266 
  1262     (index > self size) ifFalse:[
  1267     (index > self size) ifFalse:[
  1263         listAttributes isNil ifTrue:[
  1268         listAttributes isNil ifTrue:[
  1264             listAttributes := OrderedCollection withSize:index
  1269             listAttributes := OrderedCollection newWithSize:index
  1265         ] ifFalse:[
  1270         ] ifFalse:[
  1266             (index > listAttributes size) ifTrue:[
  1271             (index > listAttributes size) ifTrue:[
  1267                 listAttributes grow:index
  1272                 listAttributes grow:index
  1268             ]
  1273             ]
  1269         ].
  1274         ].
  2814                 hilightFgColor := bgColor  "fgColor" "self whiteColor".
  2819                 hilightFgColor := bgColor  "fgColor" "self whiteColor".
  2815                 hilightBgColor := fgColor "bgColor lightened" "darkened".
  2820                 hilightBgColor := fgColor "bgColor lightened" "darkened".
  2816             ] ifFalse:[
  2821             ] ifFalse:[
  2817                 (hilightStyle == #openwin) ifTrue:[
  2822                 (hilightStyle == #openwin) ifTrue:[
  2818                     hilightFgColor := fgColor.
  2823                     hilightFgColor := fgColor.
  2819                     hilightBgColor := Color grey.
  2824                     hilightBgColor := Color gray.
  2820                     smallArrow := true.
  2825                     smallArrow := true.
  2821                 ] ifFalse:[
  2826                 ] ifFalse:[
  2822                     (hilightStyle == #win95) ifTrue:[
  2827                     (hilightStyle == #win95) ifTrue:[
  2823                         smallArrow := true.
  2828                         smallArrow := true.
  2824                     ]
  2829                     ]
  2883     ] ifFalse:[
  2888     ] ifFalse:[
  2884         halfIntensityFgColor := Color darkGray.
  2889         halfIntensityFgColor := Color darkGray.
  2885     ].
  2890     ].
  2886 
  2891 
  2887     hilightFgColorNoFocus isNil ifTrue:[
  2892     hilightFgColorNoFocus isNil ifTrue:[
  2888         hilightFgColorNoFocus := hilightFgColor.
  2893         hilightFgColorNoFocus := DefaultHilightForegroundColorNoFocus.
       
  2894         hilightFgColorNoFocus isNil ifTrue:[
       
  2895             hilightFgColorNoFocus := hilightFgColor slightlyLightened.
       
  2896         ]
  2889     ].
  2897     ].
  2890     hilightBgColorNoFocus isNil ifTrue:[
  2898     hilightBgColorNoFocus isNil ifTrue:[
  2891         hilightBgColorNoFocus := hilightBgColor lightened.
  2899         hilightBgColorNoFocus := DefaultHilightBackgroundColorNoFocus.
       
  2900         hilightBgColorNoFocus isNil ifTrue:[
       
  2901             hilightBgColorNoFocus := hilightBgColor slightlyLightened.
       
  2902         ]
  2892     ].
  2903     ].
  2893 
  2904 
  2894     "Modified: / 05-08-1998 / 00:00:00 / cg"
  2905     "Modified: / 05-08-1998 / 00:00:00 / cg"
  2895     "Modified (comment): / 05-10-2011 / 15:50:50 / az"
  2906     "Modified (comment): / 05-10-2011 / 15:50:50 / az"
  2896 !
  2907 !
  2931             self makeLineVisible:selection
  2942             self makeLineVisible:selection
  2932         ]
  2943         ]
  2933     ].
  2944     ].
  2934 
  2945 
  2935     "Modified: 27.2.1997 / 14:23:40 / cg"
  2946     "Modified: 27.2.1997 / 14:23:40 / cg"
       
  2947 ! !
       
  2948 
       
  2949 !SelectionInListView methodsFor:'native widget support'!
       
  2950 
       
  2951 nativeWindowType
       
  2952     "return a symbol describing my native window type 
       
  2953      (may be used internally by the device as a native window creation hint)"
       
  2954 
       
  2955     ^ #SelectionInListView
  2936 ! !
  2956 ! !
  2937 
  2957 
  2938 !SelectionInListView methodsFor:'private'!
  2958 !SelectionInListView methodsFor:'private'!
  2939 
  2959 
  2940 argForChangeMessage
  2960 argForChangeMessage
  4146 ! !
  4166 ! !
  4147 
  4167 
  4148 !SelectionInListView class methodsFor:'documentation'!
  4168 !SelectionInListView class methodsFor:'documentation'!
  4149 
  4169 
  4150 version
  4170 version
  4151     ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.274 2014-03-26 09:55:36 vrany Exp $'
  4171     ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.278 2014-08-03 12:27:28 cg Exp $'
  4152 !
  4172 !
  4153 
  4173 
  4154 version_CVS
  4174 version_CVS
  4155     ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.274 2014-03-26 09:55:36 vrany Exp $'
  4175     ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.278 2014-08-03 12:27:28 cg Exp $'
  4156 !
  4176 !
  4157 
  4177 
  4158 version_HG
  4178 version_HG
  4159 
  4179 
  4160     ^ '$Changeset: <not expanded> $'
  4180     ^ '$Changeset: <not expanded> $'