UIPainter.st
changeset 572 ac2a1dd83d28
parent 565 8fdeb11c72fd
child 587 dd545d089d95
equal deleted inserted replaced
571:1e362121fe32 572:ac2a1dd83d28
   501      
   501      
   502        #(#FullSpec
   502        #(#FullSpec
   503           #'window:' 
   503           #'window:' 
   504            #(#WindowSpec
   504            #(#WindowSpec
   505               #'name:' 'Tree-View'
   505               #'name:' 'Tree-View'
   506               #'layout:' #(#LayoutFrame 251 0 316 0 803 0 841 0)
   506               #'layout:' #(#LayoutFrame 340 0 328 0 892 0 853 0)
   507               #'label:' 'Tree-View'
   507               #'label:' 'Tree-View'
   508               #'min:' #(#Point 10 10)
   508               #'min:' #(#Point 10 10)
   509               #'max:' #(#Point 1160 870)
   509               #'max:' #(#Point 1160 870)
   510               #'bounds:' #(#Rectangle 251 316 804 842)
   510               #'bounds:' #(#Rectangle 340 328 893 854)
   511               #'menu:' #menu
   511               #'menu:' #menu
   512               #'usePreferredExtent:' false
   512               #'usePreferredExtent:' false
   513           )
   513           )
   514           #'component:' 
   514           #'component:' 
   515            #(#SpecCollection
   515            #(#SpecCollection
   522                     #'menu:' #menuToolbar
   522                     #'menu:' #menuToolbar
   523                     #'showSeparatingLines:' true
   523                     #'showSeparatingLines:' true
   524                 )
   524                 )
   525                  #(#VariableVerticalPanelSpec
   525                  #(#VariableVerticalPanelSpec
   526                     #'name:' 'vpanel'
   526                     #'name:' 'vpanel'
   527                     #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0)
   527                     #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
   528                     #'component:' 
   528                     #'component:' 
   529                      #(#SpecCollection
   529                      #(#SpecCollection
   530                         #'collection:' 
   530                         #'collection:' 
   531                          #(
   531                          #(
   532                            #(#VariableHorizontalPanelSpec
   532                            #(#VariableHorizontalPanelSpec
   662                                                             #'activeHelpKey:' #cancel
   662                                                             #'activeHelpKey:' #cancel
   663                                                             #'label:' 'Cancel'
   663                                                             #'label:' 'Cancel'
   664                                                             #'tabable:' true
   664                                                             #'tabable:' true
   665                                                             #'model:' #cancel
   665                                                             #'model:' #cancel
   666                                                             #'enableChannel:' #modifiedChannel
   666                                                             #'enableChannel:' #modifiedChannel
   667                                                             #'extent:' #(#Point 180 24)
   667                                                             #'extent:' #(#Point 179 24)
   668                                                         )
   668                                                         )
   669                                                          #(#ActionButtonSpec
   669                                                          #(#ActionButtonSpec
   670                                                             #'name:' 'acceptButton'
   670                                                             #'name:' 'acceptButton'
   671                                                             #'activeHelpKey:' #accept
   671                                                             #'activeHelpKey:' #accept
   672                                                             #'label:' 'OK'
   672                                                             #'label:' 'OK'
   702                     )
   702                     )
   703                     #'handles:' #(#Any 0.880597 1.0)
   703                     #'handles:' #(#Any 0.880597 1.0)
   704                 )
   704                 )
   705                  #(#UISubSpecification
   705                  #(#UISubSpecification
   706                     #'name:' 'infoBarSubSpec'
   706                     #'name:' 'infoBarSubSpec'
   707                     #'layout:' #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0)
   707                     #'layout:' #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
   708                     #'majorKey:' #ToolApplicationModel
   708                     #'majorKey:' #ToolApplicationModel
   709                     #'minorKey:' #windowSpecForInfoBarWithClock
   709                     #'minorKey:' #windowSpecForInfoBarWithClock
   710                 )
   710                 )
   711               )
   711               )
   712           )
   712           )
  2297 
  2297 
  2298 ! !
  2298 ! !
  2299 
  2299 
  2300 !UIPainter methodsFor:'help'!
  2300 !UIPainter methodsFor:'help'!
  2301 
  2301 
       
  2302 defaultInfoLabel
       
  2303 
       
  2304     specClass isNil ifTrue: [^'No class and selector defined'].
       
  2305     ^specClass printString, ' >> ', specSelector
       
  2306 !
       
  2307 
  2302 openTutorial
  2308 openTutorial
  2303 
  2309 
  2304     self openTutorial: 'doc/online/english/tools/uipainter/TOP.html'
  2310     self openTutorial: 'tools/uipainter/TOP.html'
  2305 !
  2311 !
  2306 
  2312 
  2307 showHelp:aHelpText for:view
  2313 showHelp:aHelpText for:view
  2308     "display active help texts in my own info area."
  2314     "display active help texts in my own info area."
  2309 
  2315 
  2406         |className message|
  2412         |className message|
  2407         specClass isClass ifTrue: [className := specClass name].
  2413         specClass isClass ifTrue: [className := specClass name].
  2408         specClass isString ifTrue: [className := specClass].
  2414         specClass isString ifTrue: [className := specClass].
  2409         message := className, ' ', specSelector.
  2415         message := className, ' ', specSelector.
  2410         self addToHistory: message -> #loadFromMessage:.
  2416         self addToHistory: message -> #loadFromMessage:.
  2411         self valueOfInfoLabel value: className, ' >> ', specSelector
  2417         self updateInfoLabel
  2412     ].
  2418     ].
  2413     "Modified: 24.6.1997 / 19:07:01 / cg"
       
  2414 !
  2419 !
  2415 
  2420 
  2416 setViewInLayoutTool:aView
  2421 setViewInLayoutTool:aView
  2417     "set view for layout tool
  2422     "set view for layout tool
  2418     "
  2423     "
  2725 
  2730 
  2726     selectionPanel window iconLabel:'GUI Painter'.
  2731     selectionPanel window iconLabel:'GUI Painter'.
  2727     selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2732     selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2728 
  2733 
  2729     ActiveHelp startFor:self.
  2734     ActiveHelp startFor:self.
  2730 
       
  2731     self valueOfHavingTutorial value: true
       
  2732                                            
       
  2733 !
  2735 !
  2734 
  2736 
  2735 openNewWindowCanvas
  2737 openNewWindowCanvas
  2736     "open new
  2738     "open new
  2737     "
  2739     "
  2926     self painter isModified ifTrue:[
  2928     self painter isModified ifTrue:[
  2927         (self confirm:'Edit a new interface without saving current?') ifFalse:[
  2929         (self confirm:'Edit a new interface without saving current?') ifFalse:[
  2928             ^ self
  2930             ^ self
  2929         ]
  2931         ]
  2930     ].
  2932     ].
  2931     self painter removeAll
  2933     self painter removeAll.
  2932 !
  2934 !
  2933 
  2935 
  2934 doPickAView
  2936 doPickAView
  2935     "pick a view and setup specifications
  2937     "pick a view and setup specifications
  2936     "
  2938     "