12 "{ Package: 'stx:libwidg' }" |
12 "{ Package: 'stx:libwidg' }" |
13 |
13 |
14 "{ NameSpace: Smalltalk }" |
14 "{ NameSpace: Smalltalk }" |
15 |
15 |
16 ListView subclass:#TextView |
16 ListView subclass:#TextView |
17 instanceVariableNames:'selectionStartLine selectionStartCol selectionEndLine |
17 instanceVariableNames:'selectionStartLine selectionStartCol selectionEndLine |
18 selectionEndCol clickPos clickStartLine clickStartCol clickLine |
18 selectionEndCol clickPos clickStartLine clickStartCol clickLine |
19 clickCol clickCount expandingTop wordStartCol wordStartLine |
19 clickCol clickCount expandingTop wordStartCol wordStartLine |
20 wordEndCol wordEndLine selectionFgColor selectionBgColor |
20 wordEndCol wordEndLine selectionFgColor selectionBgColor |
21 selectStyle directoryForFileDialog defaultFileNameForFileDialog |
21 selectStyle directoryForFileDialog defaultFileNameForFileDialog |
22 externalEncoding contentsWasSaved searchAction lastSearchPattern |
22 externalEncoding contentsWasSaved searchAction lastSearchPattern |
23 lastSearchWasMatch lastSearchIgnoredCase lastSearchDirection |
23 lastSearchWasMatch lastSearchIgnoredCase lastSearchDirection |
24 lastSearchWasVariableSearch parenthesisSpecification dropSource |
24 lastSearchWasVariableSearch parenthesisSpecification dropSource |
25 dragIsActive saveAction st80SelectMode searchBarActionBlock' |
25 dragIsActive saveAction st80SelectMode searchBarActionBlock' |
26 classVariableNames:'DefaultViewBackground DefaultSelectionForegroundColor |
26 classVariableNames:'DefaultViewBackground DefaultSelectionForegroundColor |
27 DefaultSelectionBackgroundColor |
27 DefaultSelectionBackgroundColor |
28 DefaultAlternativeSelectionForegroundColor |
28 DefaultAlternativeSelectionForegroundColor |
29 DefaultAlternativeSelectionBackgroundColor MatchDelayTime |
29 DefaultAlternativeSelectionBackgroundColor MatchDelayTime |
30 WordSelectCatchesBlanks LastSearchPatterns |
30 WordSelectCatchesBlanks LastSearchPatterns |
31 NumRememberedSearchPatterns LastSearchIgnoredCase |
31 NumRememberedSearchPatterns LastSearchIgnoredCase |
32 LastSearchWasMatch DefaultParenthesisSpecification |
32 LastSearchWasMatch DefaultParenthesisSpecification |
33 LastSearchWasMatchWithRegex LastSearchWasWrapAtEndOfText |
33 LastSearchWasMatchWithRegex LastSearchWasWrapAtEndOfText |
34 LastSearchWasReplace LastSearchReplacedString' |
34 LastSearchWasReplace LastSearchReplacedString' |
35 poolDictionaries:'' |
35 poolDictionaries:'' |
36 category:'Views-Text' |
36 category:'Views-Text' |
37 ! |
37 ! |
38 |
38 |
39 !TextView class methodsFor:'documentation'! |
39 !TextView class methodsFor:'documentation'! |
40 |
40 |
41 copyright |
41 copyright |
1185 "return the selection-background color." |
1185 "return the selection-background color." |
1186 |
1186 |
1187 ^ selectionBgColor |
1187 ^ selectionBgColor |
1188 ! |
1188 ! |
1189 |
1189 |
|
1190 selectionBackgroundColor:aColor |
|
1191 "set the selection-background color. |
|
1192 The default is defined by the styleSheet; |
|
1193 typically black-on-green for color displays and white-on-black for b&w displays." |
|
1194 |
|
1195 selectionBgColor := aColor onDevice:device. |
|
1196 self hasSelection ifTrue:[ |
|
1197 self invalidate |
|
1198 ] |
|
1199 ! |
|
1200 |
1190 selectionForegroundColor |
1201 selectionForegroundColor |
1191 "return the selection-foreground color." |
1202 "return the selection-foreground color." |
1192 |
1203 |
1193 ^ selectionFgColor |
1204 ^ selectionFgColor |
|
1205 ! |
|
1206 |
|
1207 selectionForegroundColor:aColor |
|
1208 "set the selection-foreground color. |
|
1209 The default is defined by the styleSheet; |
|
1210 typically black-on-green for color displays and white-on-black for b&w displays." |
|
1211 |
|
1212 selectionFgColor := aColor onDevice:device. |
|
1213 self hasSelection ifTrue:[ |
|
1214 self invalidate |
|
1215 ] |
1194 ! |
1216 ! |
1195 |
1217 |
1196 selectionForegroundColor:color1 backgroundColor:color2 |
1218 selectionForegroundColor:color1 backgroundColor:color2 |
1197 "set both the selection-foreground and cursor background colors. |
1219 "set both the selection-foreground and cursor background colors. |
1198 The default is defined by the styleSheet; |
1220 The default is defined by the styleSheet; |