UISelectionPanel.st
changeset 207 a31cc933368a
parent 190 8110fbe94104
child 216 2bfcf491429e
--- a/UISelectionPanel.st	Thu Jul 03 12:45:29 1997 +0200
+++ b/UISelectionPanel.st	Thu Jul 03 12:47:00 1997 +0200
@@ -19,6 +19,13 @@
 	category:'Interface-UIPainter'
 !
 
+Object subclass:#ExampleUserDefinedGallery
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:UISelectionPanel
+!
+
 !UISelectionPanel class methodsFor:'documentation'!
 
 copyright
@@ -59,6 +66,15 @@
 
 ! !
 
+!UISelectionPanel class methodsFor:'initialization'!
+
+initialize
+    super initialize.
+    UserClass  := UISelectionPanel::ExampleUserDefinedGallery.
+    UserSpecs  := #listOfSelectors.
+    UserLabels := #listOfLabels.
+! !
+
 !UISelectionPanel class methodsFor:'accessing'!
 
 specifications
@@ -1418,7 +1434,6 @@
 
 userDefined
     |cls lbl sel builder|
-
     (cls := userClass) notNil ifTrue:[
         cls isBehavior ifFalse:[
             cls := Smalltalk at:cls asSymbol
@@ -1428,6 +1443,7 @@
             sel := Array new:(lbl size) withAll:#userDefinedSpec.
             self galleryList value:lbl.
             self minorKeys   value:sel.
+          ^ self
         ]
     ].
     builder := UIBuilder new.
@@ -1468,8 +1484,116 @@
   ^ nil
 ! !
 
+!UISelectionPanel::ExampleUserDefinedGallery class methodsFor:'user defined gallery'!
+
+clocksSpec
+    "this window spec was automatically generated by the ST/X UIPainter"
+
+    "do not manually edit this - the painter/builder may not be able to
+     handle the specification if its corrupted."
+
+    "
+     UIPainter new openOnClass:UISelectionPanel::ExampleUserDefinedGallery andSelector:#clocksSpec
+     UISelectionPanel::ExampleUserDefinedGallery new openInterface:#clocksSpec
+    "
+
+    <resource: #canvas>
+
+    ^
+     
+       #(#FullSpec
+          #'window:' 
+           #(#WindowSpec
+              #'name:' 'uIPainterView'
+              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'label:' 'Interface Builder'
+              #'bounds:' #(#Rectangle 0 0 380 271)
+          )
+          #'component:' 
+           #(#SpecCollection
+              #'collection:' 
+               #(
+                 #(#ArbitraryComponentSpec
+                    #'name:' 'arbitraryComponent1'
+                    #'layout:' #(#LayoutFrame 11 0 11 0 125 0 123 0)
+                    #'component:' #ClockView
+                    #'hasHorizontalScrollBar:' false
+                    #'hasVerticalScrollBar:' false
+                    #'hasBorder:' false
+                    #'miniScrollerHorizontal:' false
+                    #'miniScrollerVertical:' false
+                )
+                 #(#ArbitraryComponentSpec
+                    #'name:' 'arbitraryComponent2'
+                    #'layout:' #(#LayoutFrame 136 0 10 0 240 0 33 0)
+                    #'component:' #DigitalClockView
+                    #'hasHorizontalScrollBar:' false
+                    #'hasVerticalScrollBar:' false
+                    #'hasBorder:' false
+                    #'miniScrollerHorizontal:' false
+                    #'miniScrollerVertical:' false
+                )
+              )
+          )
+      )
+!
+
+funSpec
+    "this window spec was automatically generated by the ST/X UIPainter"
+
+    "do not manually edit this - the painter/builder may not be able to
+     handle the specification if its corrupted."
+
+    "
+     UIPainter new openOnClass:UISelectionPanel::ExampleUserDefinedGallery andSelector:#funSpec
+     UISelectionPanel::ExampleUserDefinedGallery new openInterface:#funSpec
+    "
+
+    <resource: #canvas>
+
+    ^
+     
+       #(#FullSpec
+          #'window:' 
+           #(#WindowSpec
+              #'name:' 'uIPainterView'
+              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'label:' 'Interface Builder'
+              #'bounds:' #(#Rectangle 0 0 393 182)
+          )
+          #'component:' 
+           #(#SpecCollection
+              #'collection:' 
+               #(
+                 #(#ArbitraryComponentSpec
+                    #'name:' 'arbitraryComponent1'
+                    #'layout:' #(#LayoutFrame 54 0 27 0 287 0 145 0)
+                    #'hasHorizontalScrollBar:' false
+                    #'hasVerticalScrollBar:' false
+                    #'hasBorder:' false
+                    #'miniScrollerHorizontal:' false
+                    #'miniScrollerVertical:' false
+                )
+              )
+          )
+      )
+!
+
+listOfLabels
+    ^ #( 'clocks' 'fun')
+
+
+!
+
+listOfSelectors
+    ^ #( clocksSpec funSpec )
+
+
+! !
+
 !UISelectionPanel class methodsFor:'documentation'!
 
 version
     ^ '$Header$'
 ! !
+UISelectionPanel initialize!