--- a/Tools__ViewTreeApplication.st Thu Feb 04 11:18:16 2010 +0100
+++ b/Tools__ViewTreeApplication.st Thu Feb 04 11:31:44 2010 +0100
@@ -753,8 +753,6 @@
!ViewTreeInspectorApplication methodsFor:'change & update'!
selectionChanged
- "called if the selection changed"
-
|info view item|
item := model selectedItem.
@@ -802,8 +800,6 @@
!ViewTreeInspectorApplication methodsFor:'event processing'!
processButtonMotionEvent:ev
- "handle a button motion event"
-
|click rootView|
motionAction isNil ifTrue:[^ self].
@@ -826,8 +822,6 @@
!
processButtonPressEvent:ev
- "handle a buttopn press event"
-
|rootView sensor lastRectangle|
rootView := model rootView.
@@ -870,8 +864,6 @@
!
processButtonReleaseEvent:anEvent
- "handle a button release event"
-
|rootView rectangle newItems widget origin|
(rootView := model rootView) isNil ifTrue:[
@@ -898,11 +890,9 @@
!
processEvent:anEvent
- "process an event"
-
|button menu|
- anEvent isKeyPressEvent ifTrue:[ ^ self processKeyPressEvent:anEvent ].
+ anEvent isKeyPressEvent ifTrue:[ self processKeyPressEvent:anEvent. ^ self ].
anEvent isButtonEvent ifFalse:[ ^ self ].
button := anEvent button.
@@ -913,8 +903,9 @@
self selectOnClickHolder value ifTrue:[
menu := self middleButtonMenu value.
menu notNil ifTrue:[
- menu := MenuPanel menu:(Menu new fromLiteralArrayEncoding:menu)
- receiver:self.
+ menu := MenuPanel
+ menu:(Menu new fromLiteralArrayEncoding:menu)
+ receiver:self.
menu startUp.
]
].
@@ -924,8 +915,8 @@
^ self
].
- anEvent isButtonPressEvent ifTrue:[ ^ self processButtonPressEvent:anEvent ].
- anEvent isButtonMotionEvent ifTrue:[ ^ self processButtonMotionEvent:anEvent ].
+ anEvent isButtonPressEvent ifTrue:[ self processButtonPressEvent:anEvent. ^ self ].
+ anEvent isButtonMotionEvent ifTrue:[ self processButtonMotionEvent:anEvent. ^ self ].
anEvent isButtonReleaseEvent ifTrue:[
self selectOnClickHolder value ifTrue:[
@@ -942,8 +933,6 @@
!
processKeyPressEvent:anEvent
- "process an key press event"
-
|item prnt idx key max next|
key := anEvent key.
@@ -971,14 +960,14 @@
(key == #CursorUp or:[key == #CursorLeft]) ifTrue:[item := model listOfItems last]
ifFalse:[item := item at:1 ifAbsent:item].
- ^ model selectedItem:item
+ ^ model selectedItem:item
].
key == #CursorLeft ifTrue:[ ^ model selectedItem:prnt ].
key == #CursorRight ifTrue:[
next := item at:1 ifAbsent:nil.
next notNil ifTrue:[ model selectedItem:next ].
- ^ self
+ ^ self
].
max := prnt size.
@@ -987,20 +976,18 @@
idx := prnt identityIndexOf:item.
idx == 1 ifTrue:[idx := max + 1].
model selectedItem:(prnt at:idx - 1).
- ^ self.
+ ^ self.
].
key == #CursorDown ifTrue:[
idx := prnt identityIndexOf:item.
idx == max ifTrue:[idx := 0].
model selectedItem:(prnt at:idx + 1).
- ^ self.
+ ^ self.
].
!
processMappedView:aView
- "process a mapped event"
-
|parent anchor|
parent := self listOfItems detectItemRespondsToView:aView.
@@ -1093,8 +1080,10 @@
middleButtonMenu
"returns the middleButton menu for the single selected item or nil"
- ^ [ model selectedItem notNil ifTrue:[self class middleButtonMenu]
- ifFalse:[nil]
+ ^ [
+ model selectedItem notNil
+ ifTrue:[self class middleButtonMenu]
+ ifFalse:[nil]
]
!
@@ -1282,10 +1271,12 @@
inst isNil ifTrue:[
label := nil
] ifFalse:[
- inst == view ifTrue:[ label := '== view itself' ]
- ifFalse:[ label := inst displayString.
- value := [view controller inspect].
- ].
+ inst == view ifTrue:[
+ label := '== view itself'
+ ] ifFalse:[
+ label := inst displayString.
+ value := [view controller inspect].
+ ].
].
list add:(MenuDesc title:'controller' value:label action:value).
@@ -1296,7 +1287,9 @@
inst := view application.
- inst notNil ifTrue:[ |topAppl|
+ inst notNil ifTrue:[
+ |topAppl|
+
list add:(MenuDesc title:'application' value:inst action:[ view application inspect ]).
topAppl := inst topApplication.
@@ -1396,8 +1389,7 @@
action:[view visibilityChannel inspect]).
].
-
- ^ MenuDesc buildFromList:list onGC:aMenu
+ ^ MenuDesc buildFromList:list onGC:aMenu
! !
!ViewTreeInspectorApplication methodsFor:'private'!
@@ -1770,8 +1762,9 @@
array at:2 put:(value printString, ' ')
].
- ^ MenuItem label:(MultiColListEntry fromStrings:array tabulatorSpecification:aTabSpec)
- value:action
+ ^ MenuItem
+ label:(MultiColListEntry fromStrings:array tabulatorSpecification:aTabSpec)
+ value:action
! !
!ViewTreeInspectorApplication::MenuDesc methodsFor:'instance creation'!
@@ -1800,7 +1793,7 @@
widthOn:aGC
title isNil ifTrue:[^ 5]. "/ separator
- ^ title widthOn:aGC
+ ^ title widthOn:aGC
! !
!ViewTreeInspectorApplication::ViewTreeItem class methodsFor:'building'!