7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
|
13 'From Smalltalk/X, Version:3.2.1 on 20-oct-1997 at 2:09:41 pm' ! |
|
14 |
12 |
15 TextView subclass:#EditTextView |
13 TextView subclass:#EditTextView |
16 instanceVariableNames:'cursorLine cursorVisibleLine cursorCol cursorShown |
14 instanceVariableNames:'cursorLine cursorVisibleLine cursorCol cursorShown |
17 prevCursorState readOnly modifiedChannel fixedSize exceptionBlock |
15 prevCursorState readOnly modifiedChannel fixedSize exceptionBlock |
18 cursorFgColor cursorBgColor cursorNoFocusFgColor cursorType |
16 cursorFgColor cursorBgColor cursorNoFocusFgColor cursorType |
336 !EditTextView class methodsFor:'defaults'! |
334 !EditTextView class methodsFor:'defaults'! |
337 |
335 |
338 updateStyleCache |
336 updateStyleCache |
339 "extract values from the styleSheet and cache them in class variables" |
337 "extract values from the styleSheet and cache them in class variables" |
340 |
338 |
341 <resource: #style (#'textCursor.foregroundColor' #'textCursorBackgroundColor' |
339 <resource: #style (#'textCursor.foregroundColor' #'textCursor.backgroundColor' |
342 #'textCursor.noFocusForegroundColor' |
340 #'textCursor.noFocusForegroundColor' |
343 #'textCursor.type' )> |
341 #'textCursor.type' )> |
344 |
342 |
345 DefaultCursorForegroundColor := StyleSheet colorAt:'textCursor.foregroundColor'. |
343 DefaultCursorForegroundColor := StyleSheet colorAt:'textCursor.foregroundColor'. |
346 DefaultCursorBackgroundColor := StyleSheet colorAt:'textCursor.backgroundColor'. |
344 DefaultCursorBackgroundColor := StyleSheet colorAt:'textCursor.backgroundColor'. |
347 DefaultCursorNoFocusForegroundColor := StyleSheet colorAt:'textCursor.noFocusForegroundColor'. |
345 DefaultCursorNoFocusForegroundColor := StyleSheet colorAt:'textCursor.noFocusForegroundColor'. |
348 DefaultCursorType := StyleSheet at:'textCursor.type' default:#block. |
346 DefaultCursorType := StyleSheet at:'textCursor.type' default:#block. |
349 |
347 |
350 ST80Mode := false. |
348 ST80Mode := false. |
351 |
349 |
352 "Modified: 20.10.1997 / 13:54:30 / cg" |
350 "Modified: / 31.10.1997 / 13:13:51 / cg" |
353 ! ! |
351 ! ! |
354 |
352 |
355 !EditTextView methodsFor:'ST-80 compatibility editing'! |
353 !EditTextView methodsFor:'ST-80 compatibility editing'! |
|
354 |
|
355 cutSelection |
|
356 self cut |
|
357 |
|
358 "Created: / 31.10.1997 / 03:29:50 / cg" |
|
359 ! |
356 |
360 |
357 insert:aString at:aCharacterPosition |
361 insert:aString at:aCharacterPosition |
358 "insert a string at aCharacterPosition." |
362 "insert a string at aCharacterPosition." |
359 |
363 |
360 |line col| |
364 |line col| |
3523 ! ! |
3533 ! ! |
3524 |
3534 |
3525 !EditTextView methodsFor:'queries'! |
3535 !EditTextView methodsFor:'queries'! |
3526 |
3536 |
3527 specClass |
3537 specClass |
|
3538 "redefined, since the name of my specClass is nonStandard (i.e. not EditTextSpec)" |
|
3539 |
3528 self class == EditTextView ifTrue:[^ TextEditorSpec]. |
3540 self class == EditTextView ifTrue:[^ TextEditorSpec]. |
3529 ^ super specClass |
3541 ^ super specClass |
3530 |
3542 |
3531 "Modified: 25.2.1997 / 14:54:16 / cg" |
3543 "Modified: / 31.10.1997 / 19:48:19 / cg" |
3532 ! |
3544 ! |
3533 |
3545 |
3534 tabMeansNextField |
3546 tabMeansNextField |
3535 "return true, if a Tab character should shift focus." |
3547 "return true, if a Tab character should shift focus." |
3536 |
3548 |