UISelectionPanel.st
changeset 104 da9db8500b67
parent 98 b913c0f095ab
child 105 23c7896c2e49
--- a/UISelectionPanel.st	Thu Apr 10 10:06:33 1997 +0200
+++ b/UISelectionPanel.st	Thu Apr 17 12:56:48 1997 +0200
@@ -54,6 +54,10 @@
     [see also:]
         TabView
         UIPainter
+
+    [start with:]
+        UISelectionPanel defaultPanel
+
 "
 
 !
@@ -79,11 +83,11 @@
 
     view labels:#( 'Button & Toggles'
                    'Panels'
-                   'Scroller'
+                   'Slider'
                  )
       selectors:#( #buttonToggleSpec
-                   #scrollerSpec
                    #panelSpec
+                   #sliderSpec
                  )
        receiver:self.
 
@@ -99,7 +103,7 @@
 
     top := StandardSystemView new
         label:'UI-Selection Panel';
-        extent:480@280.
+        extent:480@255.
 
     view := self origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:top.
 
@@ -108,23 +112,22 @@
                    'Text'
                    'View'
                    'Menu & Combo'
-                   'Scroller'
+                   'Slider'
                  )
       selectors:#( #buttonToggleSpec
                    #panelSpec
                    #textSpec
                    #viewsSpec
                    #menuComboSpec
-                   #scrollerSpec
+                   #sliderSpec
                  )
        receiver:self.
 
     top open.
 
-    "Modified: 8.4.1997 / 01:13:53 / cg"
 ! !
 
-!UISelectionPanel class methodsFor:'default specifications'!
+!UISelectionPanel class methodsFor:'interface specs'!
 
 buttonToggleSpec
     "this window spec was automatically generated by the ST/X UIPainter"
@@ -314,7 +317,7 @@
               #'name:' 'uIPainterView'
               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
               #'label:' 'unnamed'
-              #'bounds:' #(#Rectangle 0 0 450 100)
+              #'bounds:' #(#Rectangle 0 0 456 137)
           )
           #'component:' 
            #(#SpecCollection
@@ -322,7 +325,7 @@
                #(
                  #(#HorizontalPanelViewSpec
                     #'name:' 'HorizontalPanelView'
-                    #'layout:' #(#LayoutFrame 20 0 17 0 104 0 81 0)
+                    #'layout:' #(#LayoutFrame 9 0 16 0 93 0 101 0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -333,7 +336,7 @@
                               #'translateLabel:' false
                               #'tabable:' false
                               #'isTriggerOnDown:' false
-                              #'extent:' #(#Point 34 23)
+                              #'extent:' #(#Point 22 23)
                               #'canUIDrag:' false
                           )
                            #(#ActionButtonSpec
@@ -342,7 +345,16 @@
                               #'translateLabel:' false
                               #'tabable:' false
                               #'isTriggerOnDown:' false
-                              #'extent:' #(#Point 32 41)
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                           #(#ActionButtonSpec
+                              #'name:' 'button9'
+                              #'label:' 'C'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
                               #'canUIDrag:' false
                           )
                         )
@@ -355,7 +367,7 @@
                 )
                  #(#VariableHorizontalPanelSpec
                     #'name:' 'VariableHorizontalPanel'
-                    #'layout:' #(#LayoutFrame 128 0 17 0 212 0 81 0)
+                    #'layout:' #(#LayoutFrame 277 0 16 0 361 0 101 0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -381,7 +393,7 @@
                 )
                  #(#VerticalPanelViewSpec
                     #'name:' 'VerticalPanelView'
-                    #'layout:' #(#LayoutFrame 236 0 17 0 320 0 81 0)
+                    #'layout:' #(#LayoutFrame 99 0 16 0 180 0 101 0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -392,7 +404,7 @@
                               #'translateLabel:' false
                               #'tabable:' false
                               #'isTriggerOnDown:' false
-                              #'extent:' #(#Point 19 18)
+                              #'extent:' #(#Point 22 23)
                               #'canUIDrag:' false
                           )
                            #(#ActionButtonSpec
@@ -401,7 +413,16 @@
                               #'translateLabel:' false
                               #'tabable:' false
                               #'isTriggerOnDown:' false
-                              #'extent:' #(#Point 63 30)
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                           #(#ActionButtonSpec
+                              #'name:' 'button10'
+                              #'label:' 'C'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
                               #'canUIDrag:' false
                           )
                         )
@@ -414,7 +435,7 @@
                 )
                  #(#VariableVerticalPanelSpec
                     #'name:' 'VariableVerticalPanel'
-                    #'layout:' #(#LayoutFrame 344 0 17 0 428 0 81 0)
+                    #'layout:' #(#LayoutFrame 370 0 16 0 454 0 101 0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -438,20 +459,80 @@
                         )
                     )
                 )
+                 #(#PanelViewSpec
+                    #'name:' 'PanelView'
+                    #'layout:' #(#LayoutFrame 186 0 17 0 247 0 102 0)
+                    #'component:' 
+                     #(#SpecCollection
+                        #'collection:' 
+                         #(
+                           #(#ActionButtonSpec
+                              #'name:' 'button11'
+                              #'label:' 'A'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                           #(#ActionButtonSpec
+                              #'name:' 'button12'
+                              #'label:' 'B'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                           #(#ActionButtonSpec
+                              #'name:' 'button13'
+                              #'label:' 'C'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                           #(#ActionButtonSpec
+                              #'name:' 'button14'
+                              #'label:' 'D'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                           #(#ActionButtonSpec
+                              #'name:' 'button15'
+                              #'label:' 'E'
+                              #'translateLabel:' false
+                              #'tabable:' false
+                              #'isTriggerOnDown:' false
+                              #'extent:' #(#Point 22 23)
+                              #'canUIDrag:' false
+                          )
+                        )
+                    )
+                    #'level:' 0
+                    #'horizontalLayout:' #fitSpace
+                    #'verticalLayout:' #fitSpace
+                    #'horizontalSpace:' 3
+                    #'verticalSpace:' 3
+                )
               )
           )
       )
 !
 
-scrollerSpec
+sliderSpec
     "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 andSelector:#scrollerSpec
-     UISelectionPanel new openInterface:#scrollerSpec
+     UIPainter new openOnClass:UISelectionPanel andSelector:#sliderSpec
+     UISelectionPanel new openInterface:#sliderSpec
     "
 
     <resource: #canvas>
@@ -470,75 +551,31 @@
            #(#SpecCollection
               #'collection:' 
                #(
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'HorizontalMiniScroller'
-                    #'layout:' #(#LayoutFrame 4 0 10 0 105 0 16 0)
-                    #'component:' ''
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
-                )
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'HorizontalScrollBar'
-                    #'layout:' #(#LayoutFrame 4 0 23 0 105 0 42 0)
-                    #'component:' ''
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
-                )
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'HorizontalScroller'
-                    #'layout:' #(#LayoutFrame 4 0 49 0 105 0 66 0)
-                    #'component:' ''
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
+                 #(#SliderSpec
+                    #'name:' 'Vertical Slider'
+                    #'layout:' #(#LayoutFrame 17 0 9 0 35 0 97 0)
+                    #'orientation:' #vertical
                 )
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'HorizontalSlider'
-                    #'layout:' #(#LayoutFrame 4 0 73 0 105 0 90 0)
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
+                 #(#ThumbWheelSpec
+                    #'name:' 'Vertical ThumbWheel'
+                    #'layout:' #(#LayoutFrame 45 0 9 0 60 0 97 0)
+                    #'orientation:' #vertical
+                    #'start:' 0
+                    #'stop:' 360
                 )
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'MiniScroller'
-                    #'layout:' #(#LayoutFrame 137 0 11 0 143 0 90 0)
-                    #'component:' ''
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
-                )
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'ScrollBar'
-                    #'layout:' #(#LayoutFrame 153 0 11 0 172 0 90 0)
-                    #'component:' ''
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
-                )
-                 #(#ScrollerSpec
-                    #'name:' 'Scroller'
-                    #'layout:' #(#LayoutFrame 182 0 11 0 212 0 90 0)
+                 #(#ThumbWheelSpec
+                    #'name:' 'Horizontal ThumbWheel'
+                    #'layout:' #(#LayoutFrame 99 0 9 0 188 0 24 0)
+                    #'orientation:' #horizontal
+                    #'start:' 0
+                    #'stop:' 360
                 )
                  #(#SliderSpec
-                    #'name:' 'Slider'
-                    #'layout:' #(#LayoutFrame 222 0 11 0 252 0 90 0)
-                )
-                 #(#ArbitraryComponentSpec
-                    #'name:' 'ThumbWheel'
-                    #'layout:' #(#LayoutFrame 270 0 11 0 285 0 90 0)
-                    #'component:' ''
-                    #'tabable:' false
-                    #'hasHorizontalScrollBar:' false
-                    #'hasVerticalScrollBar:' false
-                    #'hasBorder:' false
+                    #'name:' 'Horizontal Slider'
+                    #'layout:' #(#LayoutFrame 99 0 36 0 188 0 54 0)
+                    #'orientation:' #horizontal
+                    #'start:' 0
+                    #'stop:' 100
                 )
               )
           )
@@ -559,7 +596,7 @@
     <resource: #canvas>
 
     ^
-
+     
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
@@ -582,6 +619,16 @@
                     #'acceptOnLostFocus:' true
                     #'hasBorder:' false
                 )
+
+
+
+
+
+
+
+
+
+
                  #(#LabelSpec
                     #'name:' 'Text Label'
                     #'layout:' #(#LayoutFrame 13 0 41 0 117 0 57 0)
@@ -643,8 +690,6 @@
               )
           )
       )
-
-    "Modified: 8.4.1997 / 01:17:28 / cg"
 !
 
 viewsSpec
@@ -668,7 +713,7 @@
               #'name:' 'uIPainterView'
               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
               #'label:' 'unnamed'
-              #'bounds:' #(#Rectangle 0 0 450 100)
+              #'bounds:' #(#Rectangle 0 0 457 177)
           )
           #'component:' 
            #(#SpecCollection
@@ -676,14 +721,14 @@
                #(
                  #(#FramedBoxSpec
                     #'name:' 'FramedBox'
-                    #'layout:' #(#LayoutFrame 4 0 11 0 109 0 81 0)
-                    #'label:' 'Frame'
+                    #'layout:' #(#LayoutFrame 4 0 11 0 109 0 66 0)
+                    #'label:' 'FramedBox'
                     #'labelPosition:' #topCenter
                     #'showFrame:' true
                 )
                  #(#ViewSpec
                     #'name:' 'View'
-                    #'layout:' #(#LayoutFrame 118 0 11 0 223 0 81 0)
+                    #'layout:' #(#LayoutFrame 118 0 11 0 223 0 66 0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -704,11 +749,11 @@
                 )
                  #(#SubCanvasSpec
                     #'name:' 'SubCanvas'
-                    #'layout:' #(#LayoutFrame 232 0 11 0 337 0 81 0)
+                    #'layout:' #(#LayoutFrame 118 0 78 0 223 0 133 0)
                 )
                  #(#LabelSpec
                     #'name:' 'label2'
-                    #'layout:' #(#Point 246 20)
+                    #'layout:' #(#Point 120 78)
                     #'label:' 'SubCanvas'
                     #'initiallyInvisible:' false
                     #'translateLabel:' false
@@ -719,19 +764,33 @@
                 )
                  #(#DividerSpec
                     #'name:' 'Horizontal Seperator'
-                    #'layout:' #(#LayoutFrame 373 0 11 0 437 0 28 0)
+                    #'layout:' #(#LayoutFrame 276 0 11 0 340 0 28 0)
                     #'orientation:' #horizontal
                 )
                  #(#DividerSpec
                     #'name:' 'Vertical Seperator'
-                    #'layout:' #(#LayoutFrame 345 0 11 0 364 0 81 0)
+                    #'layout:' #(#LayoutFrame 251 0 11 0 270 0 66 0)
                     #'orientation:' #vertical
                 )
+                 #(#TabViewSpec
+                    #'name:' 'TabView'
+                    #'layout:' #(#LayoutFrame 4 0 78 0 109 0 133 0)
+                    #'tabWidget:' #Folder
+                )
+                 #(#LabelSpec
+                    #'name:' 'label3'
+                    #'layout:' #(#Point 7 78)
+                    #'label:' 'TabView'
+                    #'initiallyInvisible:' false
+                    #'translateLabel:' false
+                    #'level:' 0
+                    #'adjust:' #center
+                    #'hasCharacterOrientedLabel:' true
+                    #'canUIDrag:' false
+                )
               )
           )
       )
-
-    "Modified: 8.4.1997 / 01:15:10 / cg"
 ! !
 
 !UISelectionPanel methodsFor:'accessing'!
@@ -824,7 +883,6 @@
         self showUnselected.
         dragObj := DropSpecification for:selection specification:spec.
         self showSelected.
-
         DragAndDropManager startDrag:dragObj from:inputView.
     ]
 
@@ -837,7 +895,7 @@
     "
     |obj sensor|
 
-    selection notNil ifTrue:[
+    (state ~~ 0 and:[selection notNil]) ifTrue:[
         sensor := self sensor.
         sensor anyButtonPressed ifTrue:[
             (lastClickPoint dist:(x@y)) > 10.0 ifTrue:[
@@ -898,7 +956,9 @@
     inputView enableMotionEvents.
     inputView delegate:(KeyboardForwarder from:inputView toView:tabView).
 
+
     tabView tabWidget:#Window.
+    tabView useIndex:true.
 
     tabView styleAt:#expandSelection   put:6@2.
     tabView styleAt:#labelBottomInset  put:4.
@@ -910,7 +970,6 @@
     window     viewBackground:(tabView styleAt:#selectedColor).
     labelView backgroundColor:(tabView styleAt:#unselectedColor).
 
-    "Modified: 8.4.1997 / 01:13:15 / cg"
 ! !
 
 !UISelectionPanel methodsFor:'searching'!