DSVColumnView.st
changeset 3138 bf718db445b5
parent 3130 30ac624dd866
child 3140 6f2bc099fb35
equal deleted inserted replaced
3137:7e8fae56b94c 3138:bf718db445b5
    25 		checkToggleActiveImage checkTogglePassiveImage checkToggleLevel
    25 		checkToggleActiveImage checkTogglePassiveImage checkToggleLevel
    26 		comboButtonExtent comboButtonForm comboButtonLevel dropSource
    26 		comboButtonExtent comboButtonForm comboButtonLevel dropSource
    27 		columnAdaptor tabAtEndAction tabAtStartAction modifiedChannel
    27 		columnAdaptor tabAtEndAction tabAtStartAction modifiedChannel
    28 		autoScroll autoScrollBlock needFitColumns scrollWhenUpdating
    28 		autoScroll autoScrollBlock needFitColumns scrollWhenUpdating
    29 		separatorOneDColor selectionForegroundColor
    29 		separatorOneDColor selectionForegroundColor
    30 		selectionBackgroundColor previousExtent selectConditionBlock
    30 		selectionForegroundColorNoFocus selectionBackgroundColor
    31 		scrollRowWise autoScrollToColumn'
    31 		selectionBackgroundColorNoFocus previousExtent
       
    32 		selectConditionBlock scrollRowWise autoScrollToColumn'
    32 	classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
    33 	classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
    33 		DefaultHilightForegroundColor DefaultHilightBackgroundColor
    34 		DefaultHilightForegroundColor DefaultHilightBackgroundColor
    34 		ButtonLightColor ButtonShadowColor CheckToggleActiveImage
    35 		ButtonLightColor ButtonShadowColor CheckToggleActiveImage
    35 		CheckTogglePassiveImage ButtonHalfLightColor
    36 		CheckTogglePassiveImage ButtonHalfLightColor
    36 		ButtonHalfShadowColor ButtonEdgeStyle CheckToggleForm
    37 		ButtonHalfShadowColor ButtonEdgeStyle CheckToggleForm
   659 !
   660 !
   660 
   661 
   661 selectionBackgroundColor
   662 selectionBackgroundColor
   662     "returns the background color of a selected row"
   663     "returns the background color of a selected row"
   663     
   664     
   664     ^ selectionBackgroundColor
   665     self hasFocus ifTrue:[
       
   666         ^ selectionBackgroundColor
       
   667     ].
       
   668     ^ selectionBackgroundColorNoFocus.
   665 !
   669 !
   666 
   670 
   667 selectionForegroundColor
   671 selectionForegroundColor
   668     "returns the foreground color of a selected row"
   672     "returns the foreground color of a selected row"
   669     
   673 
   670     ^ selectionForegroundColor
   674     self hasFocus ifTrue:[
       
   675         ^ selectionForegroundColor
       
   676     ].
       
   677     ^ selectionForegroundColorNoFocus.
   671 !
   678 !
   672 
   679 
   673 separatorDarkColor
   680 separatorDarkColor
   674     "returns the dark color used for drawing a shadowed separator (3D)"
   681     "returns the dark color used for drawing a shadowed separator (3D)"
   675     
   682     
  1789 
  1796 
  1790             y0 < y1 ifTrue:[
  1797             y0 < y1 ifTrue:[
  1791                 self invalidateX:margin y:y0 width:width height:(y1 - y0)
  1798                 self invalidateX:margin y:y0 width:width height:(y1 - y0)
  1792             ]
  1799             ]
  1793         ]
  1800         ]
       
  1801     ]
       
  1802 !
       
  1803 
       
  1804 invalidateSelection
       
  1805     shown ifTrue:[ |colIndex|
       
  1806         colIndex := self selectedColIndex ? 0.
       
  1807 
       
  1808         self selectionIndicesDo:[:aRowIndex|
       
  1809             self invalidateRowAt:aRowIndex colAt:colIndex.
       
  1810         ].
  1794     ]
  1811     ]
  1795 !
  1812 !
  1796 
  1813 
  1797 invalidateVisibleRow:aRow 
  1814 invalidateVisibleRow:aRow 
  1798     "redraw row if visible"
  1815     "redraw row if visible"
  2684         ^ editView isNil
  2701         ^ editView isNil
  2685     ].
  2702     ].
  2686     ^ false
  2703     ^ false
  2687 !
  2704 !
  2688 
  2705 
       
  2706 showFocus:explicit
       
  2707     self invalidateSelection.
       
  2708     super showFocus:explicit
       
  2709 !
       
  2710 
       
  2711 showNoFocus:explicit
       
  2712     self invalidateSelection.
       
  2713     super showNoFocus:explicit
       
  2714 !
       
  2715 
  2689 wantsFocusWithPointerEnter
  2716 wantsFocusWithPointerEnter
  2690     "views which like to take the keyboard focus
  2717     "views which like to take the keyboard focus
  2691      when the pointer enters can do so by redefining this
  2718      when the pointer enters can do so by redefining this
  2692      to return true"
  2719      to return true"
  2693 
  2720 
  2752 
  2779 
  2753     fgColor     := fgColor     onDevice:device.
  2780     fgColor     := fgColor     onDevice:device.
  2754     bgColor     := bgColor     onDevice:device.
  2781     bgColor     := bgColor     onDevice:device.
  2755     selectionForegroundColor := selectionForegroundColor onDevice:device.
  2782     selectionForegroundColor := selectionForegroundColor onDevice:device.
  2756     selectionBackgroundColor := selectionBackgroundColor onDevice:device.
  2783     selectionBackgroundColor := selectionBackgroundColor onDevice:device.
       
  2784     selectionForegroundColorNoFocus := selectionForegroundColorNoFocus onDevice:device.
       
  2785     selectionBackgroundColorNoFocus := selectionBackgroundColorNoFocus onDevice:device.
  2757 
  2786 
  2758     buttonShadowColor := buttonShadowColor onDevice:device.
  2787     buttonShadowColor := buttonShadowColor onDevice:device.
  2759     buttonLightColor  := buttonLightColor onDevice:device.
  2788     buttonLightColor  := buttonLightColor onDevice:device.
  2760 
  2789 
  2761     buttonHalfShadowColor notNil ifTrue:[
  2790     buttonHalfShadowColor notNil ifTrue:[
  2807         ]
  2836         ]
  2808     ].
  2837     ].
  2809 
  2838 
  2810     buttonHalfShadowColor isNil ifTrue:[
  2839     buttonHalfShadowColor isNil ifTrue:[
  2811         buttonHalfShadowColor := Color gray
  2840         buttonHalfShadowColor := Color gray
       
  2841     ].
       
  2842 
       
  2843     selectionForegroundColorNoFocus isNil ifTrue:[
       
  2844         selectionForegroundColorNoFocus := selectionForegroundColor.
       
  2845     ].
       
  2846     selectionBackgroundColorNoFocus isNil ifTrue:[
       
  2847         selectionBackgroundColorNoFocus := selectionBackgroundColor lightened.
  2812     ].
  2848     ].
  2813 
  2849 
  2814     rowSelectorForm         := self class rowSelectorImage.
  2850     rowSelectorForm         := self class rowSelectorImage.
  2815     checkToggleActiveImage  := CheckToggleActiveImage.
  2851     checkToggleActiveImage  := CheckToggleActiveImage.
  2816     checkTogglePassiveImage := CheckTogglePassiveImage.
  2852     checkTogglePassiveImage := CheckTogglePassiveImage.
  4160 ! !
  4196 ! !
  4161 
  4197 
  4162 !DSVColumnView class methodsFor:'documentation'!
  4198 !DSVColumnView class methodsFor:'documentation'!
  4163 
  4199 
  4164 version
  4200 version
  4165     ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.217 2006-10-23 08:56:12 cg Exp $'
  4201     ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.218 2006-11-07 16:22:02 ca Exp $'
  4166 ! !
  4202 ! !