1916 |
1923 |
1917 initStyle |
1924 initStyle |
1918 "initialize style dep. stuff" |
1925 "initialize style dep. stuff" |
1919 |
1926 |
1920 <resource: #style (#name |
1927 <resource: #style (#name |
1921 #'scroller.autoRepeat' |
1928 #'scroller.autoRepeat' |
1922 #'scroller.initialRepeatDelay' |
1929 #'scroller.initialRepeatDelay' |
1923 #'scroller.repeatDelay')> |
1930 #'scroller.repeatDelay')> |
1924 |
1931 |
1925 |nm| |
1932 |nm| |
1926 |
1933 |
1927 super initStyle. |
1934 super initStyle. |
1928 |
1935 |
1929 DefaultViewBackground notNil ifTrue:[ |
1936 DefaultViewBackground notNil ifTrue:[ |
1930 viewBackground := DefaultViewBackground onDevice:device. |
1937 viewBackground := DefaultViewBackground onDevice:device. |
1931 ]. |
1938 ]. |
1932 DefaultShadowColor notNil ifTrue:[ |
1939 DefaultShadowColor notNil ifTrue:[ |
1933 shadowColor := DefaultShadowColor onDevice:device. |
1940 shadowColor := DefaultShadowColor onDevice:device. |
1934 ]. |
1941 ]. |
1935 DefaultLightColor notNil ifTrue:[ |
1942 DefaultLightColor notNil ifTrue:[ |
1936 lightColor := DefaultLightColor onDevice:device. |
1943 lightColor := DefaultLightColor onDevice:device. |
1937 ]. |
1944 ]. |
1938 |
1945 |
1939 tallyMarks := DefaultTallyMarks. |
1946 tallyMarks := DefaultTallyMarks. |
1940 tallyLevel := DefaultTallyLevel. |
1947 tallyLevel := DefaultTallyLevel. |
1941 DefaultLevel ~~ level ifTrue:[ |
1948 DefaultLevel ~~ level ifTrue:[ |
1942 self level:DefaultLevel. |
1949 self level:DefaultLevel. |
1943 ]. |
1950 ]. |
1944 DefaultBorderWidth ~~ borderWidth ifTrue:[ |
1951 DefaultBorderWidth ~~ borderWidth ifTrue:[ |
1945 self borderWidth:DefaultBorderWidth. |
1952 self borderWidth:DefaultBorderWidth. |
1946 ]. |
1953 ]. |
1947 thumbLevel := DefaultThumbLevel. |
1954 thumbLevel := DefaultThumbLevel. |
1948 thumbActiveLevel := DefaultThumbActiveLevel. |
1955 thumbActiveLevel := DefaultThumbActiveLevel. |
1949 inset := DefaultInset. |
1956 inset := DefaultInset. |
1950 fixThumbHeight := DefaultFixThumbHeight. |
1957 fixThumbHeight := DefaultFixThumbHeight. |
1951 thumbEdgeStyle := DefaultEdgeStyle. |
1958 thumbEdgeStyle := DefaultEdgeStyle. |
1952 |
1959 |
1953 DefaultGhostColor notNil ifTrue:[ |
1960 DefaultGhostColor notNil ifTrue:[ |
1954 ghostColor := DefaultGhostColor onDevice:device. |
1961 ghostColor := DefaultGhostColor onDevice:device. |
1955 ]. |
1962 ]. |
1956 DefaultGhostFrameColor notNil ifTrue:[ |
1963 DefaultGhostFrameColor notNil ifTrue:[ |
1957 ghostFrameColor := DefaultGhostFrameColor onDevice:device. |
1964 ghostFrameColor := DefaultGhostFrameColor onDevice:device. |
1958 ]. |
1965 ]. |
1959 ghostLevel := DefaultGhostLevel. |
1966 ghostLevel := DefaultGhostLevel. |
1960 |
1967 |
1961 DefaultThumbFrameColor notNil ifTrue:[ |
1968 DefaultThumbFrameColor notNil ifTrue:[ |
1962 thumbFrameColor := DefaultThumbFrameColor onDevice:device. |
1969 thumbFrameColor := DefaultThumbFrameColor onDevice:device. |
1963 ]. |
1970 ]. |
1964 DefaultThumbShadowColor notNil ifTrue:[ |
1971 DefaultThumbShadowColor notNil ifTrue:[ |
1965 thumbShadowColor := DefaultThumbShadowColor |
1972 thumbShadowColor := DefaultThumbShadowColor |
1966 ] ifFalse:[ |
1973 ] ifFalse:[ |
1967 thumbShadowColor := shadowColor. |
1974 thumbShadowColor := shadowColor. |
1968 ]. |
1975 ]. |
1969 DefaultThumbLightColor notNil ifTrue:[ |
1976 DefaultThumbLightColor notNil ifTrue:[ |
1970 thumbLightColor := DefaultThumbLightColor |
1977 thumbLightColor := DefaultThumbLightColor |
1971 ] ifFalse:[ |
1978 ] ifFalse:[ |
1972 thumbLightColor := lightColor. |
1979 thumbLightColor := lightColor. |
1973 ]. |
1980 ]. |
1974 |
1981 |
1975 thumbEdgeStyle notNil ifTrue:[ |
1982 thumbEdgeStyle notNil ifTrue:[ |
1976 DefaultThumbHalfShadowColor notNil ifTrue:[ |
1983 DefaultThumbHalfShadowColor notNil ifTrue:[ |
1977 thumbHalfShadowColor := DefaultThumbHalfShadowColor |
1984 thumbHalfShadowColor := DefaultThumbHalfShadowColor |
1978 ]. |
1985 ]. |
1979 |
1986 |
1980 DefaultThumbHalfLightColor notNil ifTrue:[ |
1987 DefaultThumbHalfLightColor notNil ifTrue:[ |
1981 thumbHalfLightColor := DefaultThumbHalfLightColor |
1988 thumbHalfLightColor := DefaultThumbHalfLightColor |
1982 ]. |
1989 ]. |
1983 ]. |
1990 ]. |
1984 |
1991 |
1985 nm := styleSheet name. |
1992 nm := styleSheet name. |
1986 |
1993 |
1987 device hasGrayscales ifFalse:[ |
1994 device hasGrayscales ifFalse:[ |
1988 thumbEdgeStyle notNil ifTrue:[ |
1995 thumbEdgeStyle notNil ifTrue:[ |
1989 thumbHalfShadowColor := Color darkGray. |
1996 thumbHalfShadowColor := Color darkGray. |
1990 thumbHalfLightColor := White |
1997 thumbHalfLightColor := White |
1991 ]. |
1998 ]. |
1992 |
1999 |
1993 thumbShadowColor := Black. |
2000 thumbShadowColor := Black. |
1994 "/ thumbLightColor := White. |
2001 "/ thumbLightColor := White. |
1995 |
2002 |
1996 nm = #motif ifTrue:[ |
2003 nm = #motif ifTrue:[ |
1997 DefaultThumbColor isNil ifTrue:[ |
2004 DefaultThumbColor isNil ifTrue:[ |
1998 thumbColor := White . |
2005 thumbColor := White . |
1999 ]. |
2006 ]. |
2000 ] |
2007 ] |
2001 ]. |
2008 ]. |
2002 |
2009 |
2003 DefaultThumbColor notNil ifTrue:[ |
2010 DefaultThumbColor notNil ifTrue:[ |
2004 thumbColor := DefaultThumbColor onDevice:device |
2011 thumbColor := DefaultThumbColor onDevice:device |
2005 ] ifFalse:[ |
2012 ] ifFalse:[ |
2006 thumbColor := White. |
2013 thumbColor := White. |
2007 nm ~= #normal ifTrue:[ |
2014 nm ~= #normal ifTrue:[ |
2008 device hasGrayscales ifFalse:[ |
2015 device hasGrayscales ifFalse:[ |
2009 thumbColor := Color grey |
2016 thumbColor := Color grey |
2010 ]. |
2017 ]. |
2011 ]. |
2018 ]. |
2012 ]. |
2019 ]. |
2013 |
2020 |
2014 thumbColor := thumbColor onDevice:device. |
2021 thumbColor := thumbColor onDevice:device. |
2015 thumbShadowColor notNil ifTrue:[ |
2022 thumbShadowColor notNil ifTrue:[ |
2016 thumbShadowColor := thumbShadowColor onDevice:device. |
2023 thumbShadowColor := thumbShadowColor onDevice:device. |
2017 ]. |
2024 ]. |
2018 thumbLightColor notNil ifTrue:[ |
2025 thumbLightColor notNil ifTrue:[ |
2019 thumbLightColor := thumbLightColor onDevice:device. |
2026 thumbLightColor := thumbLightColor onDevice:device. |
2020 ]. |
2027 ]. |
2021 thumbHalfShadowColor notNil ifTrue:[ |
2028 thumbHalfShadowColor notNil ifTrue:[ |
2022 thumbHalfShadowColor := thumbHalfShadowColor onDevice:device. |
2029 thumbHalfShadowColor := thumbHalfShadowColor onDevice:device. |
2023 ]. |
2030 ]. |
2024 thumbHalfLightColor notNil ifTrue:[ |
2031 thumbHalfLightColor notNil ifTrue:[ |
2025 thumbHalfLightColor := thumbHalfLightColor onDevice:device. |
2032 thumbHalfLightColor := thumbHalfLightColor onDevice:device. |
2026 ]. |
2033 ]. |
2027 thumbEdgeStyle notNil ifTrue:[ |
2034 thumbEdgeStyle notNil ifTrue:[ |
2028 thumbHalfShadowColor isNil ifTrue:[ |
2035 thumbHalfShadowColor isNil ifTrue:[ |
2029 thumbHalfShadowColor := thumbShadowColor lightened onDevice:device |
2036 thumbHalfShadowColor := thumbShadowColor lightened onDevice:device |
2030 ] |
2037 ] |
2031 ]. |
2038 ]. |
2032 |
2039 |
2033 DefaultThumbEnteredColor notNil ifTrue:[ |
2040 DefaultThumbEnteredColor notNil ifTrue:[ |
2034 thumbEnteredColor := DefaultThumbEnteredColor onDevice:device. |
2041 thumbEnteredColor := DefaultThumbEnteredColor onDevice:device. |
2035 ] ifFalse:[ |
2042 ] ifFalse:[ |
2036 thumbEnteredColor := thumbColor. |
2043 thumbEnteredColor := thumbColor. |
2037 ]. |
2044 ]. |
2038 |
2045 |
2039 (DefaultThumbEnteredColor notNil or:[NewCursors]) ifTrue:[ |
2046 (DefaultThumbEnteredColor notNil or:[NewCursors]) ifTrue:[ |
2040 self enableMotionEvents. |
2047 self enableMotionEvents. |
2041 self enableEnterLeaveEvents. |
2048 self enableEnterLeaveEvents. |
2042 ]. |
2049 ]. |
2043 |
2050 |
2044 DefaultThumbImage notNil ifTrue:[ |
2051 DefaultThumbImage notNil ifTrue:[ |
2045 thumbImage := DefaultThumbImage onDevice:device. |
2052 thumbImage := DefaultThumbImage onDevice:device. |
2046 fixThumbHeight := true. |
2053 fixThumbHeight := true. |
2047 ]. |
2054 ]. |
2048 |
2055 |
2049 HandleImage notNil ifTrue:[ |
2056 HandleImage notNil ifTrue:[ |
2050 shadowForm := HandleImage onDevice:device. |
2057 shadowForm := HandleImage onDevice:device. |
2051 ] ifFalse:[ |
2058 ] ifFalse:[ |
2052 nm = #next ifTrue:[ |
2059 nm = #next ifTrue:[ |
2053 shadowForm := self class handleShadowFormOn:device. |
2060 shadowForm := self class handleShadowFormOn:device. |
2054 lightForm := self class handleLightFormOn:device |
2061 lightForm := self class handleLightFormOn:device |
2055 ] ifFalse:[ |
2062 ] ifFalse:[ |
2056 shadowForm := lightForm := nil |
2063 shadowForm := lightForm := nil |
2057 ]. |
2064 ]. |
2058 ]. |
2065 ]. |
2059 drawableId notNil ifTrue:[ |
2066 drawableId notNil ifTrue:[ |
2060 self computeThumbFrame |
2067 self computeThumbFrame |
2061 ]. |
2068 ]. |
2062 |
2069 |
2063 autoRepeat := styleSheet at:#'scroller.autoRepeat' default:true. |
2070 autoRepeat := styleSheet at:#'scroller.autoRepeat' default:true. |
2064 initialRepeatDelay := styleSheet at:#'scroller.initialRepeatDelay' default:0.2. |
2071 initialRepeatDelay := styleSheet at:#'scroller.initialRepeatDelay' default:0.2. |
2065 repeatDelay := styleSheet at:#'scroller.repeatDelay' default:0.1. |
2072 repeatDelay := styleSheet at:#'scroller.repeatDelay' default:0.15. |
2066 |
2073 |
2067 "Modified: / 5.9.1998 / 20:21:41 / cg" |
2074 "Modified: / 5.9.1998 / 20:21:41 / cg" |
2068 ! |
2075 ! |
2069 |
2076 |
2070 initialize |
2077 initialize |