UISpecificationTool.st
changeset 3107 985c4b07da6a
parent 2902 2a7a9d68d16c
child 3214 eceb5d2c5526
equal deleted inserted replaced
3106:148a01b7abc0 3107:985c4b07da6a
   134     "
   134     "
   135 
   135 
   136     <resource: #canvas>
   136     <resource: #canvas>
   137 
   137 
   138     ^ 
   138     ^ 
   139      #(#FullSpec
   139     #(FullSpec
   140         #name: #windowSpec
   140        name: windowSpec
   141         #window: 
   141        window: 
   142        #(#WindowSpec
   142       (WindowSpec
   143           #label: 'unnamed canvas'
   143          label: 'unnamed canvas'
   144           #name: 'unnamed canvas'
   144          name: 'unnamed canvas'
   145           #bounds: #(#Rectangle 12 22 312 322)
   145          bounds: (Rectangle 0 0 300 300)
   146         )
   146        )
   147         #component: 
   147        component: 
   148        #(#SpecCollection
   148       (SpecCollection
   149           #collection: #(
   149          collection: (
   150            #(#ArbitraryComponentSpec
   150           (ArbitraryComponentSpec
   151               #name: 'BuildInView'
   151              name: 'BuildInView'
   152               #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   152              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   153               #hasVerticalScrollBar: true
   153              hasVerticalScrollBar: false
   154               #miniScrollerVertical: true
   154              miniScrollerVertical: false
   155               #autoHideScrollBars: true
   155              autoHideScrollBars: true
   156               #hasBorder: false
   156              hasBorder: false
   157               #component: #buildInView
   157              component: buildInView
   158             )
       
   159            )
   158            )
   160          
   159           )
   161         )
   160         
   162       )
   161        )
       
   162      )
   163 ! !
   163 ! !
   164 
   164 
   165 !UISpecificationTool class methodsFor:'resources'!
   165 !UISpecificationTool class methodsFor:'resources'!
   166 
   166 
   167 classResources
   167 classResources
   446     scrolledView notNil ifTrue:[
   446     scrolledView notNil ifTrue:[
   447         scrolledView unmap.
   447         scrolledView unmap.
   448     ].
   448     ].
   449     (scrolledView := aView) notNil ifTrue:[
   449     (scrolledView := aView) notNil ifTrue:[
   450         scrolledView superView ~~ frame ifTrue:[
   450         scrolledView superView ~~ frame ifTrue:[
       
   451             frame addSubView:scrolledView.
       
   452         ].
       
   453         true ifTrue:[
   451             scrolledView borderWidth:0; level:0.
   454             scrolledView borderWidth:0; level:0.
   452 
       
   453             frame addSubView:scrolledView.
       
   454 
       
   455             scrolledView subViews size == 1 ifTrue:[
   455             scrolledView subViews size == 1 ifTrue:[
   456                 wrapper := scrolledView subViews first.
   456                 wrapper := scrolledView subViews first.
   457                 wrapper isScrollWrapper ifTrue:[
   457                 wrapper isScrollWrapper ifTrue:[
   458                     "/ give it a full-relative size, and let it do
   458                     "/ give it a full-relative size, and let it do
   459                     "/ the scrolling itself.
   459                     "/ the scrolling itself.
   461                 ]
   461                 ]
   462             ].
   462             ].
   463             y isNil ifTrue:[
   463             y isNil ifTrue:[
   464                 y := scrolledView preferredHeight
   464                 y := scrolledView preferredHeight
   465             ].
   465             ].
       
   466             scrolledView allViewBackground:(self viewBackground).
   466             scrolledView origin:0@0 corner:1.0 @ y.
   467             scrolledView origin:0@0 corner:1.0 @ y.
   467             scrolledView allViewBackground:(self viewBackground).
       
   468         ].
   468         ].
   469     ].    
   469     ].    
   470     shown ifTrue:[
   470     shown ifTrue:[
   471         scrolledView beVisible.
   471         scrolledView beVisible.
   472         scrolledView raise.
   472         scrolledView raise.
   475     model value:scrolledView.
   475     model value:scrolledView.
   476 ! !
   476 ! !
   477 
   477 
   478 !UISpecificationTool::BuildInView methodsFor:'initialization'!
   478 !UISpecificationTool::BuildInView methodsFor:'initialization'!
   479 
   479 
   480 level:aLevel
   480 initialize
   481     super level:0
   481     super initialize.
       
   482     resizeScrolledViewHorizontal := true.
       
   483     resizeScrolledViewVertical   := true.
   482 !
   484 !
   483 
   485 
   484 realize
   486 realize
   485 
   487 
   486     super realize.
   488     super realize.
   487     superView notNil ifTrue:[superView level:0].
   489    superView notNil ifTrue:[superView level:0].
   488 ! !
   490 ! !
   489 
   491 
   490 !UISpecificationTool class methodsFor:'documentation'!
   492 !UISpecificationTool class methodsFor:'documentation'!
   491 
   493 
   492 version
   494 version
   494 !
   496 !
   495 
   497 
   496 version_CVS
   498 version_CVS
   497     ^ '$Header$'
   499     ^ '$Header$'
   498 ! !
   500 ! !
       
   501