UIPainter.st
changeset 2208 4e1c31df6014
parent 2206 1a7921b6c104
child 2210 0a2c19976d82
--- a/UIPainter.st	Wed Dec 05 12:51:40 2007 +0100
+++ b/UIPainter.st	Wed Dec 05 19:00:01 2007 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1995-1998 by eXept Software AG
-	      All Rights Reserved
+              All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -12,18 +12,18 @@
 "{ Package: 'stx:libtool2' }"
 
 ResourceSpecEditor subclass:#UIPainter
-	instanceVariableNames:'specSuperclassName treeView selectionPanel specTool layoutTool
-		helpTool painterView painter'
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Interface-UIPainter'
+        instanceVariableNames:'specSuperclassName treeView selectionPanel specTool layoutTool
+                helpTool painterView painter'
+        classVariableNames:''
+        poolDictionaries:''
+        category:'Interface-UIPainter'
 !
 
 SelectionInTreeView subclass:#TreeView
-	instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec windowSpecClass'
-	classVariableNames:''
-	poolDictionaries:''
-	privateIn:UIPainter
+        instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec windowSpecClass'
+        classVariableNames:''
+        poolDictionaries:''
+        privateIn:UIPainter
 !
 
 !UIPainter class methodsFor:'documentation'!
@@ -31,7 +31,7 @@
 copyright
 "
  COPYRIGHT (c) 1995-1998 by eXept Software AG
-	      All Rights Reserved
+              All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -53,17 +53,17 @@
     opening the application.
 
     [start with:]
-	UIPainter open
+        UIPainter open
 
     [author:]
-	Claus Gittinger, eXept Software AG
-	Claus Atzkern, eXept Software AG
-	Thomas Zwick, eXept Software AG
+        Claus Gittinger, eXept Software AG
+        Claus Atzkern, eXept Software AG
+        Thomas Zwick, eXept Software AG
 
     [see also:]
-	UIBuilder
-	ApplicationModel
-	UISpecification
+        UIBuilder
+        ApplicationModel
+        UISpecification
 "
 
 ! !
@@ -91,8 +91,7 @@
 defaultNameOfCanvas
     "returns the default name of the application"
 
-    ^'NewApplication'
-
+    ^ 'NewApplication'
 ! !
 
 !UIPainter class methodsFor:'help specs'!
@@ -326,19 +325,19 @@
      per line
     "
     |stream
-	max     "{ Class:SmallInteger }"
-	size    "{ Class:SmallInteger }"
-	start   "{ Class:SmallInteger }"
-	stop    "{ Class:SmallInteger }"
-	cpySz   "{ Class:SmallInteger }"
-	lnSz    "{ Class:SmallInteger }"
-	atBeginOfLine|
+        max     "{ Class:SmallInteger }"
+        size    "{ Class:SmallInteger }"
+        start   "{ Class:SmallInteger }"
+        stop    "{ Class:SmallInteger }"
+        cpySz   "{ Class:SmallInteger }"
+        lnSz    "{ Class:SmallInteger }"
+        atBeginOfLine|
 
     maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1]
-			       ifTrue:[max := 20].
+                               ifTrue:[max := 20].
 
     (size := aString size) <= max ifTrue:[
-	^ aString
+        ^ aString
     ].
     start  := 1.
     lnSz   := 0.
@@ -347,35 +346,35 @@
     atBeginOfLine := true.
 
     [start <= size] whileTrue:[
-	(start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[
-	    ^ stream contents
-	].
-	(aString at:start) == $\ ifTrue:[
-	    skipLineFeed ifFalse:[
-		stream nextPut:$\
-	    ].
-	    start := start + 1.
-	    stream cr.
-	    start := start + 1.
-	    lnSz := 0.
-	] ifFalse:[
-	    (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[
-		stop := size + 1
-	    ].
-	    (aString at:(stop - 1)) == $\ ifTrue:[
-		stop := stop - 1
-	    ].
-	    cpySz := stop - start.
-
-	    lnSz == 0 ifFalse:[
-		(lnSz := lnSz + cpySz) >= max ifTrue:[stream cr.    lnSz := cpySz. atBeginOfLine := true. ]
-					     ifFalse:[stream space. lnSz := lnSz + 1]
-	    ] ifTrue:[
-		lnSz := cpySz
-	    ].
-	    stream nextPutAll:aString startingAt:start to:(stop - 1).
-	    start := stop.
-	]
+        (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[
+            ^ stream contents
+        ].
+        (aString at:start) == $\ ifTrue:[
+            skipLineFeed ifFalse:[
+                stream nextPut:$\
+            ].
+            start := start + 1.
+            stream cr.
+            start := start + 1.
+            lnSz := 0.
+        ] ifFalse:[
+            (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[
+                stop := size + 1
+            ].
+            (aString at:(stop - 1)) == $\ ifTrue:[
+                stop := stop - 1
+            ].
+            cpySz := stop - start.
+
+            lnSz == 0 ifFalse:[
+                (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr.    lnSz := cpySz. atBeginOfLine := true. ]
+                                             ifFalse:[stream space. lnSz := lnSz + 1]
+            ] ifTrue:[
+                lnSz := cpySz
+            ].
+            stream nextPutAll:aString startingAt:start to:(stop - 1).
+            start := stop.
+        ]
     ].
     ^ stream contents
 
@@ -489,8 +488,8 @@
     <resource: #image>
 
     ^Icon
-	constantNamed:#'UIPainter iconAlignB'
-	ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself]
+        constantNamed:#'UIPainter iconAlignB'
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself]
 !
 
 iconAlignL
@@ -507,8 +506,8 @@
     <resource: #image>
 
     ^Icon
-	constantNamed:#'UIPainter iconAlignL'
-	ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself]
+        constantNamed:#'UIPainter iconAlignL'
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself]
 !
 
 iconAlignLR
@@ -525,8 +524,8 @@
     <resource: #image>
 
     ^Icon
-	constantNamed:#'UIPainter iconAlignLR'
-	ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself]
+        constantNamed:#'UIPainter iconAlignLR'
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself]
 !
 
 iconAlignR
@@ -543,8 +542,8 @@
     <resource: #image>
 
     ^Icon
-	constantNamed:#'UIPainter iconAlignR'
-	ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]
+        constantNamed:#'UIPainter iconAlignR'
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]
 !
 
 iconAlignT
@@ -561,8 +560,8 @@
     <resource: #image>
 
     ^Icon
-	constantNamed:#'UIPainter iconAlignT'
-	ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself]
+        constantNamed:#'UIPainter iconAlignT'
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself]
 !
 
 iconAlignTB
@@ -579,8 +578,8 @@
     <resource: #image>
 
     ^Icon
-	constantNamed:#'UIPainter iconAlignTB'
-	ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself]
+        constantNamed:#'UIPainter iconAlignTB'
+        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself]
 !
 
 iconCenterH
@@ -734,86 +733,86 @@
     ^
      
        #(#FullSpec
-	  #window: 
-	   #(#WindowSpec
-	      #name: 'GUI Painter'
-	      #layout: #(#LayoutFrame 291 0 130 0 637 0 289 0)
-	      #label: 'GUI Painter'
-	      #min: #(#Point 350 160)
-	      #max: #(#Point 500 160)
-	      #bounds: #(#Rectangle 291 130 638 290)
-	      #usePreferredExtent: false
-	  )
-	  #component: 
-	   #(#SpecCollection
-	      #collection: 
-	       #(
-		 #(#FramedBoxSpec
-		    #name: 'FramedBox'
-		    #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
-		    #component: 
-		     #(#SpecCollection
-			#collection: 
-			 #(
-			   #(#LabelSpec
-			      #name: 'selectorLabel'
-			      #layout: #(#AlignmentOrigin 67 0.11 29 0 1 0.5)
-			      #label: 'Selector:'
-			      #translateLabel: true
-			      #adjust: #right
-			      #resizeForLabel: true
-			  )
-			   #(#InputFieldSpec
-			      #name: 'methodNameField'
-			      #layout: #(#LayoutFrame 70 0.11 18 0 4 1.0 40 0)
-			      #tabable: true
-			      #model: #methodNameChannel
-			      #group: #inputGroup
-			  )
-			   #(#LabelSpec
-			      #name: 'classLabel'
-			      #layout: #(#AlignmentOrigin 67 0.11 54 0 1 0.5)
-			      #label: 'Class:'
-			      #translateLabel: true
-			      #adjust: #right
-			      #resizeForLabel: true
-			  )
-			   #(#InputFieldSpec
-			      #name: 'classNameField'
-			      #layout: #(#LayoutFrame 70 0.11 43 0 4 1.0 65 0)
-			      #tabable: true
-			      #model: #classNameChannel
-			      #group: #inputGroup
-			  )
-			   #(#LabelSpec
-			      #name: 'superClassLabel'
-			      #layout: #(#AlignmentOrigin 67 0.11 79 0 1 0.5)
-			      #label: 'Superclass:'
-			      #translateLabel: true
-			      #adjust: #right
-			      #resizeForLabel: true
-			  )
-			   #(#ComboBoxSpec
-			      #name: 'superclassNameComboBox'
-			      #layout: #(#LayoutFrame 70 0.11 68 0 4 1.0 90 0)
-			      #tabable: true
-			      #model: #superclassNameChannel
-			      #comboList: #superclassNameDefaults
-			  )
-			)
-		    )
-		    #label: 'Define Class And Selector'
-		    #labelPosition: #topLeft
-		    #translateLabel: true
-		)
-		 #(#UISubSpecification
-		    #name: 'subSpec'
-		    #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
-		    #majorKey: #ToolApplicationModel
-		    #minorKey: #windowSpecForCommitWithoutChannels
-		)
-	      )
-	  )
+          #window: 
+           #(#WindowSpec
+              #name: 'GUI Painter'
+              #layout: #(#LayoutFrame 291 0 130 0 637 0 289 0)
+              #label: 'GUI Painter'
+              #min: #(#Point 350 160)
+              #max: #(#Point 500 160)
+              #bounds: #(#Rectangle 291 130 638 290)
+              #usePreferredExtent: false
+          )
+          #component: 
+           #(#SpecCollection
+              #collection: 
+               #(
+                 #(#FramedBoxSpec
+                    #name: 'FramedBox'
+                    #layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0)
+                    #component: 
+                     #(#SpecCollection
+                        #collection: 
+                         #(
+                           #(#LabelSpec
+                              #name: 'selectorLabel'
+                              #layout: #(#AlignmentOrigin 67 0.11 29 0 1 0.5)
+                              #label: 'Selector:'
+                              #translateLabel: true
+                              #adjust: #right
+                              #resizeForLabel: true
+                          )
+                           #(#InputFieldSpec
+                              #name: 'methodNameField'
+                              #layout: #(#LayoutFrame 70 0.11 18 0 4 1.0 40 0)
+                              #tabable: true
+                              #model: #methodNameChannel
+                              #group: #inputGroup
+                          )
+                           #(#LabelSpec
+                              #name: 'classLabel'
+                              #layout: #(#AlignmentOrigin 67 0.11 54 0 1 0.5)
+                              #label: 'Class:'
+                              #translateLabel: true
+                              #adjust: #right
+                              #resizeForLabel: true
+                          )
+                           #(#InputFieldSpec
+                              #name: 'classNameField'
+                              #layout: #(#LayoutFrame 70 0.11 43 0 4 1.0 65 0)
+                              #tabable: true
+                              #model: #classNameChannel
+                              #group: #inputGroup
+                          )
+                           #(#LabelSpec
+                              #name: 'superClassLabel'
+                              #layout: #(#AlignmentOrigin 67 0.11 79 0 1 0.5)
+                              #label: 'Superclass:'
+                              #translateLabel: true
+                              #adjust: #right
+                              #resizeForLabel: true
+                          )
+                           #(#ComboBoxSpec
+                              #name: 'superclassNameComboBox'
+                              #layout: #(#LayoutFrame 70 0.11 68 0 4 1.0 90 0)
+                              #tabable: true
+                              #model: #superclassNameChannel
+                              #comboList: #superclassNameDefaults
+                          )
+                        )
+                    )
+                    #label: 'Define Class And Selector'
+                    #labelPosition: #topLeft
+                    #translateLabel: true
+                )
+                 #(#UISubSpecification
+                    #name: 'subSpec'
+                    #layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
+                    #majorKey: #ToolApplicationModel
+                    #minorKey: #windowSpecForCommitWithoutChannels
+                )
+              )
+          )
       )
 
     "Modified: / 13.8.1998 / 19:59:44 / cg"
@@ -1819,41 +1818,41 @@
      
        #(#Menu
           
-	   #(
-	     #(#MenuItem
-		#label: 'Up'
-		#translateLabel: true
-		#value: #doStepUp
-		#activeHelpKey: #moveWidgetUp
-		#enabled: #canChangeOrderInContainer
-		#labelImage: #(#ResourceRetriever #Icon #upIcon 'Up')
-	    )
-	     #(#MenuItem
-		#label: 'Down'
-		#translateLabel: true
-		#value: #doStepDown
-		#activeHelpKey: #moveWidgetDown
-		#enabled: #canChangeOrderInContainer
-		#labelImage: #(#ResourceRetriever #Icon #downIcon 'Down')
-	    )
-	     #(#MenuItem
-		#label: 'Into'
-		#translateLabel: true
-		#value: #doStepIn
-		#activeHelpKey: #moveWidgetInto
-		#enabled: #canMoveSelectionIntoContainer
-		#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into')
-	    )
-	     #(#MenuItem
-		#label: 'Out'
-		#translateLabel: true
-		#value: #doStepOut
-		#activeHelpKey: #moveWidgetOut
-		#enabled: #canMoveSelectionOutOfContainer
-		#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out')
-	    )
-	  ) nil
-	  nil
+           #(
+             #(#MenuItem
+                #label: 'Up'
+                #translateLabel: true
+                #value: #doStepUp
+                #activeHelpKey: #moveWidgetUp
+                #enabled: #canChangeOrderInContainer
+                #labelImage: #(#ResourceRetriever #Icon #upIcon 'Up')
+            )
+             #(#MenuItem
+                #label: 'Down'
+                #translateLabel: true
+                #value: #doStepDown
+                #activeHelpKey: #moveWidgetDown
+                #enabled: #canChangeOrderInContainer
+                #labelImage: #(#ResourceRetriever #Icon #downIcon 'Down')
+            )
+             #(#MenuItem
+                #label: 'Into'
+                #translateLabel: true
+                #value: #doStepIn
+                #activeHelpKey: #moveWidgetInto
+                #enabled: #canMoveSelectionIntoContainer
+                #labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into')
+            )
+             #(#MenuItem
+                #label: 'Out'
+                #translateLabel: true
+                #value: #doStepOut
+                #activeHelpKey: #moveWidgetOut
+                #enabled: #canMoveSelectionOutOfContainer
+                #labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out')
+            )
+          ) nil
+          nil
       )
 !
 
@@ -2268,8 +2267,8 @@
     |holder|
 
     (holder := builder bindingAt:#galleryShown) isNil ifTrue:[
-	builder aspectAt:#galleryShown put:(holder :=  true asValue).
-	holder addDependent:self
+        builder aspectAt:#galleryShown put:(holder :=  true asValue).
+        holder addDependent:self
     ].
     ^ holder
 
@@ -2321,8 +2320,8 @@
     |holder|
 
     (holder := builder bindingAt:#painterShown) isNil ifTrue:[
-	builder aspectAt:#painterShown put:(holder :=  true asValue).
-	holder addDependent:self
+        builder aspectAt:#painterShown put:(holder :=  true asValue).
+        holder addDependent:self
     ].
     ^ holder
 
@@ -2346,8 +2345,8 @@
     |holder|
 
     (holder := builder bindingAt:#tabModel) isNil ifTrue:[
-	holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
-	builder aspectAt:#tabModel put:holder.
+        holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
+        builder aspectAt:#tabModel put:holder.
     ].
     ^ holder
 !
@@ -2479,12 +2478,12 @@
     |selector editor spec|
 
     (self resolveName:specClassName) isNil ifTrue:[
-	self askForSaving ifFalse: [^self]
+        self askForSaving ifFalse: [^self]
     ].
 
     spec := self specTool specification.
     (selector := spec hierarchicalList) notNil ifTrue:[
-	selector := selector asSymbol
+        selector := selector asSymbol
     ].
 
     editor := HierarchicalListEditor new.
@@ -2492,11 +2491,11 @@
     editor openModalOnClass:specClassName andSelector:selector.
 
     editor specSelector ~= selector ifTrue:[
-	editor hasSaved ifTrue:[
-	    spec hierarchicalList:editor specSelector.
-	    self modifiedChannel value:true.
-	    self accept
-	]
+        editor hasSaved ifTrue:[
+            spec hierarchicalList:editor specSelector.
+            self modifiedChannel value:true.
+            self accept
+        ]
     ]
 
     "Modified: / 16.7.1998 / 18:15:46 / cg"
@@ -2898,10 +2897,10 @@
     self askForSectionModification.    
 
     ((YesNoBox title:'No application class defined yet!!')        
-	noText:'Cancel';
-	yesText:'Define';
-	showAtPointer;
-	accepted) ifFalse: [^false].
+        noText:'Cancel';
+        yesText:'Define';
+        showAtPointer;
+        accepted) ifFalse: [^false].
 
     self doSave.
 
@@ -2912,11 +2911,11 @@
     "asks for section modification in the notebook"
 
     self isModified ifTrue:[
-	(self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[
-	    self accept
-	] ifFalse: [
-	    self cancel
-	]
+        (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[
+            self accept
+        ] ifFalse: [
+            self cancel
+        ]
     ]
 !
 
@@ -3082,7 +3081,7 @@
     |type|
 
     self painter topView == aView ifTrue:[
-	type := #Extent
+        type := #Extent
     ].
     self layoutTool layoutView:aView type:type spec:aSpec
 
@@ -3160,7 +3159,7 @@
      the window spec is stored is defined"
 
     specSelector size > 1 ifTrue:[
-	^ self hasSpecClass
+        ^ self hasSpecClass
     ].
     ^ false
 !
@@ -3410,18 +3409,18 @@
     |topView|
 
     (topView := self window) == aTopView ifTrue:[
-	super closeRequestFor:aTopView
+        super closeRequestFor:aTopView
     ] ifFalse:[
-	aTopView = selectionPanel window ifTrue:[
-	    self galleryShown value:false
-	] ifFalse:[
-	    aTopView == (self painter topView) ifTrue:[
-		self painterShown value:false
-	    ] ifFalse:[
-		aTopView closeRequest
-	    ]
-	].
-	topView raise.
+        aTopView = selectionPanel window ifTrue:[
+            self galleryShown value:false
+        ] ifFalse:[
+            aTopView == (self painter topView) ifTrue:[
+                self painterShown value:false
+            ] ifFalse:[
+                aTopView closeRequest
+            ]
+        ].
+        topView raise.
     ].
 !
 
@@ -4101,9 +4100,9 @@
     |selection|
 
     ((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[
-	selection first inspect
+        selection first inspect
     ] ifFalse: [
-	selection inspect
+        selection inspect
     ]
 
 !
@@ -4195,9 +4194,9 @@
     self askForModification ifFalse: [^nil].
 
     (view := Screen current viewFromUser) notNil ifTrue:[
-	view == Screen current rootView ifFalse:[
-	    self painter setupFromSpec:(UISpecification fromView:view topView).
-	]
+        view == Screen current rootView ifFalse:[
+            self painter setupFromSpec:(UISpecification fromView:view topView).
+        ]
     ].
 
     self updateInfoLabel
@@ -4342,8 +4341,8 @@
     self askForSectionModification.
 
     CodeView 
-	openWith: self painter generateWindowSpecMethodSource 
-	title: 'Window Spec'
+        openWith: self painter generateWindowSpecMethodSource 
+        title: 'Window Spec'
 
 !
 
@@ -4382,13 +4381,13 @@
     selection in tree view; only used by the UIPainter
 
     [see also:]
-	SelectionInTreeView
-	SelectionInTree
-	TreeItem
-	UIPainter
+        SelectionInTreeView
+        SelectionInTree
+        TreeItem
+        UIPainter
 
     [author:]
-	Claus Atzkern
+        Claus Atzkern
 "
 
 
@@ -4484,9 +4483,9 @@
     "returns item assigned to view or nil"
 
     aView notNil ifTrue:[
-	self allItemsDo:[:anItem|
-	    (anItem contents view == aView) ifTrue:[^ anItem]
-	]
+        self allItemsDo:[:anItem|
+            (anItem contents view == aView) ifTrue:[^ anItem]
+        ]
     ].
     ^ nil
 
@@ -4527,7 +4526,7 @@
     "evaluates the block on each property"
 
     self allItemsDo:[:anItem|
-	(aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents]
+        (aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents]
     ].
     ^ nil
 
@@ -4540,9 +4539,9 @@
     |idx|
 
     selection size == 1 ifTrue:[
-	(idx := selection first) ~~ 1 ifTrue:[          "canvas: not yet supported"
-	    ^ (listOfNodes at:idx) contents
-	]
+        (idx := selection first) ~~ 1 ifTrue:[          "canvas: not yet supported"
+            ^ (listOfNodes at:idx) contents
+        ]
     ].
     ^ nil
 
@@ -4569,8 +4568,8 @@
     windowSpec := nil.
 
     self canvas subViews copy do:[:aView|
-	"/ care to not destroy the transparent input view
-	(aView isInputOnly) ifFalse:[aView destroy]
+        "/ care to not destroy the transparent input view
+        (aView isInputOnly) ifFalse:[aView destroy]
     ].
     model root name: UIPainter defaultNameOfCanvas asBoldText.
     model removeAllOtherThanRoot.
@@ -4583,9 +4582,9 @@
     |item prnt|
 
     ((item := self itemOfView:aView) notNil and:[(prnt := item parent) notNil]) ifTrue:[
-	aView destroy.
-	prnt contents view sizeChanged:nil.
-	model remove:item
+        aView destroy.
+        prnt contents view sizeChanged:nil.
+        model remove:item
     ]
 
 
@@ -4602,12 +4601,12 @@
     fullSpec name:specNameSymbol.
 
     fullSpec fromBuilder:(self canvas topView)
-	      components:(SpecCollection new collection:aSpecArray).
+              components:(SpecCollection new collection:aSpecArray).
 
     windowSpec notNil ifTrue:[
-	winSpec := fullSpec window.
-	winSpec copyValuesFromSpec:windowSpec.
-	winSpec name: winSpec label.
+        winSpec := fullSpec window.
+        winSpec copyValuesFromSpec:windowSpec.
+        winSpec name: winSpec label.
     ].    
     ^ fullSpec literalArrayEncoding.
 
@@ -4639,19 +4638,19 @@
     |sel list size|
 
     ((sel := aSelection) isNil or:[sel isCollection]) ifFalse:[
-	sel := Array with:sel
+        sel := Array with:sel
     ].
 
     (size := sel size) ~~ 0 ifTrue:[
-	list := OrderedCollection new:size.
-
-	sel do:[:aView||item|
-	    (item := self itemOfView:aView) notNil ifTrue:[
-		list add:item.
-		model doMakeVisible:item.
-	    ]
-	].
-	sel := list collect:[:anItem| self indexOfNode:anItem ].
+        list := OrderedCollection new:size.
+
+        sel do:[:aView||item|
+            (item := self itemOfView:aView) notNil ifTrue:[
+                list add:item.
+                model doMakeVisible:item.
+            ]
+        ].
+        sel := list collect:[:anItem| self indexOfNode:anItem ].
     ].
     self cvsEventsDisabledDo:[ self selection:sel ].            
 
@@ -4668,13 +4667,13 @@
     item := self itemOfView:aView.
 
     item notNil ifTrue:[
-	model doMakeVisible:item.
-
-	(index := self indexOfNode:item) ~~ 0 ifTrue:[
-	    oldSel := selection copy.
-	    self addToSelection:index.
-	    self selectionChangedFrom:oldSel
-	]        
+        model doMakeVisible:item.
+
+        (index := self indexOfNode:item) ~~ 0 ifTrue:[
+            oldSel := selection copy.
+            self addToSelection:index.
+            self selectionChangedFrom:oldSel
+        ]        
     ]            
 
 
@@ -4690,9 +4689,9 @@
      and:[(index := self indexOfNode:item) ~~ 0
      and:[self isInSelection:index]]
     ) ifTrue:[
-	oldSel := selection copy.
-	self removeFromSelection:index.
-	self selectionChangedFrom:oldSel.
+        oldSel := selection copy.
+        self removeFromSelection:index.
+        self selectionChangedFrom:oldSel.
     ].
 
 
@@ -4712,8 +4711,8 @@
      and:[(self propertyDetect:[:p| p name = name]) isNil
      and:[node name ~= name]]]
     ) ifTrue:[
-	node name: name asBoldText.
-	node changed.   
+        node name: name asBoldText.
+        node changed.   
     ].
 !
 
@@ -4722,7 +4721,7 @@
      application will be informed to update its layout
     "
     selection size == 1 ifTrue:[
-	self application layoutChanged
+        self application layoutChanged
     ]
 
 
@@ -4736,29 +4735,29 @@
     item := self itemOfView:(aProperty view).
 
     item notNil ifTrue:[
-	item contents:aProperty.
-
-	item name = aProperty name ifFalse:[
-	    idx := self firstLineShown.
-
-	    (end := self lastLineShown) > listOfNodes size ifTrue:[
-		end := listOfNodes size
-	    ].                          
-	    item changed.   
-
-	    [idx <= end] whileTrue:[
-		(listOfNodes at:idx) == item ifTrue:[
-		    self redrawLine:idx.                "/ is visible; redraw line
-		    end := 0
-		] ifFalse:[
-		    idx := idx + 1
-		]
-	    ]
-	].
-
-	self selectedNode == item ifTrue:[              "/ inform application
-	    self application propertyChanged
-	]
+        item contents:aProperty.
+
+        item name = aProperty name ifFalse:[
+            idx := self firstLineShown.
+
+            (end := self lastLineShown) > listOfNodes size ifTrue:[
+                end := listOfNodes size
+            ].                          
+            item changed.   
+
+            [idx <= end] whileTrue:[
+                (listOfNodes at:idx) == item ifTrue:[
+                    self redrawLine:idx.                "/ is visible; redraw line
+                    end := 0
+                ] ifFalse:[
+                    idx := idx + 1
+                ]
+            ]
+        ].
+
+        self selectedNode == item ifTrue:[              "/ inform application
+            self application propertyChanged
+        ]
     ].
 
 
@@ -4862,7 +4861,7 @@
     "disables collapsing of the root item"
 
     self selectedNode == model root ifFalse:[
-	super doubleClicked
+        super doubleClicked
     ]
 
 
@@ -4876,12 +4875,12 @@
     super redrawLabelAt:x y:yTop index:anIndex.
 
     ((selection size > 1) and: [selection first == anIndex]) ifTrue:[
-	dX := textInset - 1.
-	self paint:(Color red). "/ self application painter handleMasterColor.
-	self fillRectangleX:(x - dX - 2)
-			  y:yTop + ((fontHeight - dX) // 2)
-		      width:dX
-		     height:dX
+        dX := textInset - 1.
+        self paint:(Color red). "/ self application painter handleMasterColor.
+        self fillRectangleX:(x - dX - 2)
+                          y:yTop + ((fontHeight - dX) // 2)
+                      width:dX
+                     height:dX
     ]
 ! !
 
@@ -4899,18 +4898,18 @@
 
     self model iconAction: 
     [:aNode|
-	|specClass|       
-	(specClass := aNode contents spec) isNil 
-	    ifTrue: [WindowSpec icon]
-	    ifFalse:[specClass class icon]
+        |specClass|       
+        (specClass := aNode contents spec) isNil 
+            ifTrue: [WindowSpec icon]
+            ifFalse:[specClass class icon]
     ].
 
     self model labelAction: 
     [:aNode|
-	|spec|
-	(spec := aNode contents spec) notNil
-	    ifTrue: [self nameForSpecInList:spec] 
-	    ifFalse:[aNode name]
+        |spec|
+        (spec := aNode contents spec) notNil
+            ifTrue: [self nameForSpecInList:spec] 
+            ifFalse:[aNode name]
     ]
 ! !
 
@@ -4932,32 +4931,32 @@
     size := selection size.
 
     cvsEventsDisabled ifFalse:[
-	(size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[
-	    sel := OrderedCollection new.
-
-	    selection do:[:i|
-		i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view]
-	    ]
-	].
-	self canvas updateSelectionFromModel:sel
+        (size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[
+            sel := OrderedCollection new.
+
+            selection do:[:i|
+                i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view]
+            ]
+        ].
+        self canvas updateSelectionFromModel:sel
     ].             
     size = 1 ifTrue:[
-	oldSelection size > 1 ifTrue: [
-	    (listOfNodes at:lastDrawnMaster) retrieveLabel.
-	    self redrawLine: lastDrawnMaster. 
-	    lastDrawnMaster := selection first
-	]
+        oldSelection size > 1 ifTrue: [
+            (listOfNodes at:lastDrawnMaster) retrieveLabel.
+            self redrawLine: lastDrawnMaster. 
+            lastDrawnMaster := selection first
+        ]
     ].
     size > 1 ifTrue:[
-	selection first ~~ lastDrawnMaster ifTrue: [
-	    (listOfNodes at:selection first) retrieveLabel.
-	    lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel].
-	    self redrawLine: lastDrawnMaster. 
-	    self redrawLine: (lastDrawnMaster := selection first)
-	]
+        selection first ~~ lastDrawnMaster ifTrue: [
+            (listOfNodes at:selection first) retrieveLabel.
+            lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel].
+            self redrawLine: lastDrawnMaster. 
+            self redrawLine: (lastDrawnMaster := selection first)
+        ]
     ]         
     ifFalse: [
-	lastDrawnMaster := nil
+        lastDrawnMaster := nil
     ] 
 ! !
 
@@ -4990,15 +4989,15 @@
      can change their layout through to a move or align operation"
 
     selection size == 0 ifTrue:[
-	^ false
+        ^ false
     ].
 
     selection do:[:i|
-	i == 1 ifTrue:[^ false].
-
-	(self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[
-	    ^ false
-	]
+        i == 1 ifTrue:[^ false].
+
+        (self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[
+            ^ false
+        ]
     ].
     ^ true
 !
@@ -5029,7 +5028,7 @@
       or:[(prnt := item parent) isNil
       or:[prnt parent isNil]]
     ) ifTrue:[
-	^ false
+        ^ false
     ].
     ^ true
 !
@@ -5041,9 +5040,9 @@
     |selectedNode|
 
     (selectedNode := self selectedNode) notNil ifTrue:[
-	(selectedNode := selectedNode parent) notNil ifTrue:[
-	    ^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents])
-	]
+        (selectedNode := selectedNode parent) notNil ifTrue:[
+            ^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents])
+        ]
     ].
     ^ false
 !
@@ -5111,7 +5110,7 @@
       or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil
       or:[prnt contents spec class supportsSubComponents not]]]
     ) ifFalse:[
-	self doChangeHierarchyOf:prnt
+        self doChangeHierarchyOf:prnt
     ]
 !
 
@@ -5119,7 +5118,7 @@
     |item|
 
     ((item := self selectedNode) notNil and:[(item := item parent) notNil]) ifTrue:[
-	self doChangeHierarchyOf:(item parent)
+        self doChangeHierarchyOf:(item parent)
     ].
 !