UIPainter.st
changeset 794 212bc7e46765
parent 788 8f9f3c3fcf60
child 798 c1116ba57e66
equal deleted inserted replaced
793:43a9a195b0f3 794:212bc7e46765
  2592     topView := self window.
  2592     topView := self window.
  2593 
  2593 
  2594     topView label:'GUI Painter'.
  2594     topView label:'GUI Painter'.
  2595 
  2595 
  2596     painterView openInGroup:(topView windowGroup).
  2596     painterView openInGroup:(topView windowGroup).
  2597     painterView open.
       
  2598     painterView application:self.     
       
  2599 
       
  2600     painterView application:self.
  2597     painterView application:self.
       
  2598 
  2601     selectionPanel := UISelectionPanel new.
  2599     selectionPanel := UISelectionPanel new.
  2602     selectionPanel allButOpenInterface:#windowSpec.
  2600     selectionPanel allButOpenInterface:#windowSpec.
  2603     selectionPanel window openInGroup:(topView windowGroup).
  2601     selectionPanel window openInGroup:(topView windowGroup).
  2604 
       
  2605     selectionPanel openWindow.
  2602     selectionPanel openWindow.
  2606     selectionPanel masterApplication:self.
  2603     selectionPanel masterApplication:self.
  2607 
  2604 
  2608     topView iconLabel:'GUI Painter'.
  2605     topView iconLabel:'GUI Painter'.
  2609     topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2606     topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2626 !
  2623 !
  2627 
  2624 
  2628 openOnClass:aClass andSelector:aSelector
  2625 openOnClass:aClass andSelector:aSelector
  2629     "opens the GUI Painter on aClass and aSelector"
  2626     "opens the GUI Painter on aClass and aSelector"
  2630 
  2627 
  2631     |painter|
  2628     |painter window|
  2632 
  2629 
  2633     aClass isNil ifTrue:[
  2630     aClass isNil ifTrue:[
  2634         (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs)
  2631         (self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs)
  2635         ifFalse:[^ nil].
  2632         ifFalse:[^ nil].
  2636     ].
  2633     ].
  2637 
  2634 
  2638     self openInterface.
  2635     self openInterface.
  2639 
  2636 
       
  2637     window := self window.
       
  2638     [window realized] whileFalse:[Delay waitForSeconds:0.01].
       
  2639 
  2640     aClass notNil ifTrue:[
  2640     aClass notNil ifTrue:[
  2641         painter := self painter.
  2641         painter := self painter.
  2642         self setClass:aClass selector:aSelector.
  2642         self setClass:aClass selector:aSelector.
       
  2643 
  2643         (aClass respondsTo:aSelector) ifTrue:[  
  2644         (aClass respondsTo:aSelector) ifTrue:[  
  2644             painter setupFromSpec:(aClass perform:aSelector).
  2645             painter setupFromSpec:(aClass perform:aSelector).
  2645         ]
  2646         ]
  2646     ]
  2647     ].
  2647 !
  2648 !
  2648 
  2649 
  2649 postOpenWith: aBuilder
  2650 postOpenWith: aBuilder
  2650     "sets the root of the tree view as first selection;
  2651     "sets the root of the tree view as first selection;
  2651      sets the grid parameters, if defined"
  2652      sets the grid parameters, if defined"