UIPainter.st
changeset 375 b43507f222ce
parent 368 9e588f397bc9
child 394 1933896da0c3
--- a/UIPainter.st	Sun Nov 02 19:33:50 1997 +0100
+++ b/UIPainter.st	Sun Nov 02 19:38:35 1997 +0100
@@ -676,11 +676,12 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Tree-View'
-              #'layout:' #(#LayoutFrame 216 0 173 0 729 0 633 0)
+              #'layout:' #(#LayoutFrame 30 0 56 0 543 0 516 0)
               #'label:' 'Tree-View'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 216 173 730 634)
+              #'bounds:' #(#Rectangle 30 56 544 517)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -703,6 +704,7 @@
                               #'name:' 'menuChangeHierarchy'
                               #'activeHelpKey:' #menuChangeHierarchy
                               #'enableChannel:' #hasOneSelectionOtherThanCanvas
+                              #'tabable:' true
                               #'menu:' #menuChangeHierarchy
                               #'showSeparatingLines:' true
                               #'extent:' #(#Point 103 32)
@@ -727,8 +729,8 @@
                                         #'activeHelpKey:' #moveSelectionLeft
                                         #'tabable:' true
                                         #'model:' #moveSelectionLeft
+                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'isTriggerOnDown:' true
-                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'direction:' #left
                                         #'extent:' #(#Point 22 24)
                                     )
@@ -736,8 +738,8 @@
                                         #'name:' 'moveRight'
                                         #'activeHelpKey:' #moveSelectionRight
                                         #'model:' #moveSelectionRight
+                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'isTriggerOnDown:' true
-                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'direction:' #right
                                         #'extent:' #(#Point 22 24)
                                     )
@@ -745,8 +747,8 @@
                                         #'name:' 'moveDown'
                                         #'activeHelpKey:' #moveSelectionDown
                                         #'model:' #moveSelectionDown
+                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'isTriggerOnDown:' true
-                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'direction:' #down
                                         #'extent:' #(#Point 22 24)
                                     )
@@ -754,8 +756,8 @@
                                         #'name:' 'moveUp'
                                         #'activeHelpKey:' #moveSelectionUp
                                         #'model:' #moveSelectionUp
+                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'isTriggerOnDown:' true
-                                        #'enableChannel:' #canMoveOrAlignSelection
                                         #'direction:' #up
                                         #'extent:' #(#Point 22 24)
                                     )
@@ -790,6 +792,7 @@
                                    #(
                                      #(#ArbitraryComponentSpec
                                         #'name:' 'treeView'
+                                        #'tabable:' true
                                         #'menu:' #menuCanvas
                                         #'hasHorizontalScrollBar:' true
                                         #'hasVerticalScrollBar:' true
@@ -828,7 +831,7 @@
                                                             #'tabable:' true
                                                             #'model:' #cancel
                                                             #'enableChannel:' #modifiedChannel
-                                                            #'extent:' #(#Point 165 24)
+                                                            #'extent:' #(#Point 164 24)
                                                         )
                                                          #(#ActionButtonSpec
                                                             #'name:' 'acceptButton'
@@ -837,7 +840,7 @@
                                                             #'tabable:' true
                                                             #'model:' #accept
                                                             #'enableChannel:' #modifiedChannel
-                                                            #'extent:' #(#Point 166 24)
+                                                            #'extent:' #(#Point 165 24)
                                                         )
                                                       )
                                                   )
@@ -870,7 +873,7 @@
           )
       )
 
-    "Modified: / 26.10.1997 / 15:57:00 / cg"
+    "Modified: / 31.10.1997 / 18:35:20 / cg"
 ! !
 
 !UIPainter class methodsFor:'menu specs'!
@@ -1403,13 +1406,17 @@
                           #'value:' #doInstallSpec
                       )
                        #(#MenuItem
-                          #'label:' 'install help spec.'
-                          #'value:' #doInstallHelp
+                          #'label:' 'install aspects'
+                          #'value:' #doInstallAspects
                           #'enabled:' #hasSpecClass
                       )
                        #(#MenuItem
-                          #'label:' 'install aspects'
-                          #'value:' #doInstallAspects
+                          #'label:' 'install hooks'
+                          #'value:' #doInstallHooks
+                      )
+                       #(#MenuItem
+                          #'label:' 'install help spec.'
+                          #'value:' #doInstallHelp
                           #'enabled:' #hasSpecClass
                       )
                        #(#MenuItem
@@ -1484,7 +1491,7 @@
           nil
       )
 
-    "Modified: / 26.10.1997 / 14:34:13 / cg"
+    "Modified: / 31.10.1997 / 17:35:38 / cg"
 ! !
 
 !UIPainter methodsFor:'actions'!
@@ -2700,6 +2707,29 @@
     self helpTool installHelpSpecInto:specClass
 !
 
+doInstallHooks
+    "install application hooks
+    "
+    |code|
+
+    self hasSpecClassAndSelector ifFalse:[
+        self defineClassAndSelector
+    ].
+
+    self checkClassAndSelector ifFalse:[
+        ^ self
+    ].
+
+    self painter className:specClass
+        superclassName:specSuperclass
+              selector:specSelector.
+
+    code := self painter generateHookMethods.
+    (ReadStream on:code) fileIn.
+
+    "Created: / 31.10.1997 / 17:37:54 / cg"
+!
+
 doInstallSpec
     "install window specification
     "
@@ -2750,7 +2780,7 @@
 doPickAView
     "pick a view and setup specifications
     "
-    |painter view cls spec|
+    |painter view cls spec app|
 
     self painter isModified ifTrue:[
         (self confirm:'pick another interface without saving your modifications ?') ifFalse:[
@@ -2765,8 +2795,8 @@
 
          "/ ok, got it
 
-            view application notNil ifTrue:[
-                cls := view application class
+            (app := view application) notNil ifTrue:[
+                cls := app class
             ] ifFalse:[
                 cls := view class
             ].
@@ -2776,7 +2806,7 @@
         ]
     ]
 
-    "Modified: 24.6.1997 / 19:02:57 / cg"
+    "Modified: / 1.11.1997 / 13:47:49 / cg"
 !
 
 doStartApplication