[squeak-dev] The Trunk: Morphic-cmm.423.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 20 02:04:34 UTC 2010


Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.423.mcz

==================== Summary ====================

Name: Morphic-cmm.423
Author: cmm
Time: 19 April 2010, 9:03:23.928 pm
UUID: 6cf2b67a-7375-4d4f-84aa-1473de5d2920
Ancestors: Morphic-ar.422, Morphic-cmm.412

- Recovered non-blinking, dumbbell-shaped text-cursor via new preferences:  "Blinking Text Cursor" and "Dumbbell-shaped Text Cursor".

=============== Diff against Morphic-ar.422 ===============

Item was changed:
  ----- Method: TextMorphForEditView>>keyboardFocusChange: (in category 'event handling') -----
  keyboardFocusChange: aBoolean 
  	"rr 3/21/2004 22:55 : removed the #ifFalse: branch, 
  	which was responsible of the deselection of text when the 
  	paragraph lost focus. This way selection works in a more standard 
  	way, and this permits the menu keyboard control to be really effective"
  	paragraph isNil ifFalse:[paragraph focused: aBoolean].
  	aBoolean ifTrue:["A hand is wanting to send us characters..."
  		self hasFocus ifFalse: [self editor	"Forces install"].
+ 		Editor blinkingCursor ifTrue: [self startBlinking].
- 		self startBlinking.
  	] ifFalse:[
  		self stopBlinking.
  	].
  	self changed.
  !

Item was added:
+ ----- Method: Editor class>>blinkingCursor: (in category 'preferences') -----
+ blinkingCursor: aBoolean
+ 	BlinkingCursor := aBoolean!

Item was changed:
  ----- Method: NewParagraph>>caretWidth (in category 'access') -----
  caretWidth
+ 	^ Editor dumbbellCursor
+ 		ifTrue: [ 2 ]
+ 		ifFalse: [ 0 ]!
- 	^ 0!

Item was changed:
  ----- Method: SmalltalkEditor>>methodArgument: (in category 'private') -----
+ methodArgument: anInteger 
+ 	^ (ReadStream on: self text asString) nextLine
+ 		ifNil: [ String empty ]
+ 		ifNotNilDo:
+ 			[ : line | 
+ 			line substrings
+ 				at: 2 * anInteger
+ 				ifAbsent: [ String empty ] ]!
- methodArgument: anInteger
- 	^ (ReadStream on: self text asString) nextLine substrings 
- 		at: 2*anInteger
- 		ifAbsent: [ String empty ]!

Item was added:
+ ----- Method: Editor class>>dumbbellCursor (in category 'preferences') -----
+ dumbbellCursor
+ 	<preference: 'Dumbbell-shaped Text Cursor'
+ 		category: 'Morphic'
+ 		description: 'When true, the text cursor assumes the shape of a dumbbell, otherwise a vertical bar..'
+ 		type: #Boolean>
+ 	^ DumbbellCursor ifNil: [ false ]!

Item was added:
+ ----- Method: Editor class>>dumbbellCursor: (in category 'preferences') -----
+ dumbbellCursor: aBoolean
+ 	DumbbellCursor := aBoolean!

Item was changed:
  ----- Method: TextMorph>>keyboardFocusChange: (in category 'event handling') -----
  keyboardFocusChange: aBoolean 
  	| w |
  	paragraph isNil ifFalse:[paragraph focused: aBoolean].
  	aBoolean ifTrue:["A hand is wanting to send us characters..."
  			self hasFocus ifFalse: [self editor	"Forces install"].
+ 			Editor blinkingCursor ifTrue: [ self startBlinking ].
- 			self startBlinking.
  	] ifFalse:["A hand has clicked elsewhere..."
  		(w := self world) ifNotNil:[
  			w handsDo: [:h | h keyboardFocus == self ifTrue: [^self]].
  			"Release control unless some hand is still holding on"
  			self releaseEditor].
  		self stopBlinking.
  	].
  !

Item was changed:
  Object subclass: #Editor
  	instanceVariableNames: 'sensor morph selectionShowing'
+ 	classVariableNames: 'BlinkingCursor DestructiveBackWord DumbbellCursor SelectionsMayShrink'
- 	classVariableNames: 'DestructiveBackWord SelectionsMayShrink'
  	poolDictionaries: ''
  	category: 'Morphic-Text Support'!
  
  !Editor commentStamp: '<historical>' prior: 0!
  New text editors.
  TextEditor provides most of the functionality that used to be in TextMorphEditor. This class is no longer a Controller!!
  SmalltalkEditor is has Smalltalk code specific features.
  SimpleEditor provides basic functionality for single line text editing. It does not handle fonts and styles, aligning and Smalltalk utilities. It handles one single line.
  CellStyleEditor allows entering alphabetic characters using only number keys, like most cell phones do.!

Item was added:
+ ----- Method: Editor class>>blinkingCursor (in category 'preferences') -----
+ blinkingCursor
+ 	<preference: 'Blinking Text Cursor'
+ 		category: 'Morphic'
+ 		description: 'When true, the text cursor will blink.'
+ 		type: #Boolean>
+ 	^ BlinkingCursor ifNil: [ true ]!




More information about the Squeak-dev mailing list