--- a/UIObjectView.st Wed Apr 07 15:23:25 2004 +0200
+++ b/UIObjectView.st Wed Apr 07 15:45:31 2004 +0200
@@ -508,22 +508,29 @@
"any key pressed
"
<resource: #keyboard ( #CursorUp #CursorDown #CursorLeft #CursorRight
- #Delete #BackSpace #Cut #Copy #Paste #Cmdu ) >
+ #Delete #BackSpace #Cut #Copy #Paste #Cmdu #Again) >
|n sensor|
(key == #Cut or:[key == #Delete or:[key == #BackSpace]]) ifTrue: [
^ self deleteSelection
].
+ (key = #PreviousPage) ifTrue:[
+ self selectNextUpInHierarchy.
+ ].
key == #Copy ifTrue:[ ^ self copySelection].
key == #Paste ifTrue:[ ^ self pasteBuffer].
key == #Cmdu ifTrue:[ ^ self undoLast ]. "/ #Undo
- (#(CursorUp CursorDown CursorRight CursorLeft) includes:key) ifTrue:[
- sensor := self sensor.
- n := 1 + (sensor compressKeyPressEventsWithKey:key).
- sensor shiftDown ifTrue:[
- n := n * 10.
+ ( #(CursorUp CursorDown CursorRight CursorLeft)
+ includes:key) ifTrue:[
+ (sensor := self sensor) isNil ifTrue:[
+ n := 1
+ ] ifFalse:[
+ n := 1 + (sensor compressKeyPressEventsWithKey:key).
+ sensor shiftDown ifTrue:[
+ n := n * 10.
+ ].
].
key == #CursorUp ifTrue:[
@@ -707,6 +714,7 @@
motionAction := [:movePoint | nil].
releaseAction := [nil].
keyPressAction := nil.
+ doublePressAction := [:pressPoint | self doublePressed: pressPoint].
self cursor:Cursor normal.
@@ -918,9 +926,15 @@
].
self setSelection:object withRedraw:true.
+ self forEach:selection do:[:aView |
+ self recomputeShapeIfTransparentBox:aView.
+ ].
self layoutChanged.
!
+layoutChanged
+!
+
startResizeBorder:b of:selection
"resize selected view
"
@@ -966,6 +980,13 @@
!UIObjectView methodsFor:'private-resizing subviews'!
+recomputeShapeIfTransparentBox:aView
+ (aView notNil and:[aView isTBox]) ifTrue:[
+ aView computeShape.
+ aView clear; redraw
+ ].
+!
+
resize:aView bottom:aPoint
"resize a views bottom
"
@@ -1189,6 +1210,10 @@
^ 1
!
+selectNextUpInHierarchy
+ self halt.
+!
+
selection:something
"change selection to something
"
@@ -1300,6 +1325,33 @@
! !
+!UIObjectView methodsFor:'selections basic'!
+
+setSelection:aNewSelection withRedraw:doRedraw
+ "set a new selection without change notifications
+ "
+ | sel |
+
+ (sel := aNewSelection) == self ifTrue:[
+ sel := nil
+ ].
+
+ doRedraw ifTrue:[
+ self hideSelection.
+ selection := sel.
+
+ self forEach:selection do:[:aView |
+ |superView|
+
+ superView := aView superView.
+ self recomputeShapeIfTransparentBox:superView.
+ ].
+ self showSelection.
+ ] ifFalse:[
+ selection := sel
+ ]
+! !
+
!UIObjectView methodsFor:'selections-basic'!
recursiveRepair:theDamages startIn:aView
@@ -1387,24 +1439,6 @@
!
-setSelection:aNewSelection withRedraw:doRedraw
- "set a new selection without change notifications
- "
- |sel|
-
- (sel := aNewSelection) == self ifTrue:[
- sel := nil
- ].
-
- doRedraw ifTrue:[
- self hideSelection.
- selection := sel.
- self showSelection
- ] ifFalse:[
- selection := sel
- ]
-!
-
showUnselected:something
"show a component ot list of components unselected
"