ExternalTopView.st
changeset 1102 1ee9a1bc9241
parent 1101 712810d0e8a9
child 1103 b98a73cd2ed1
equal deleted inserted replaced
1101:712810d0e8a9 1102:1ee9a1bc9241
   126      control of the host application ..."
   126      control of the host application ..."
   127 
   127 
   128 
   128 
   129 ! !
   129 ! !
   130 
   130 
       
   131 !ExternalTopView methodsFor:'special'!
       
   132 
       
   133 becomeParentOf:anSTXWindow
       
   134     "add myself to the windowGroup of anSTXWindow ...
       
   135      and reparent anSTXWindow to be the (only) child of myself"
       
   136 
       
   137     |wg oldTopView|
       
   138 
       
   139     anSTXWindow createWithAllSubViews.
       
   140 
       
   141     oldTopView := anSTXWindow topView.
       
   142 
       
   143     wg := anSTXWindow windowGroup.
       
   144     wg notNil ifTrue:[
       
   145         wg addTopView:self.
       
   146     ].
       
   147 
       
   148     oldTopView == anSTXWindow ifTrue:[
       
   149         oldTopView container:self.
       
   150     ].
       
   151 
       
   152     self open. "/ not really an open; however it starts its event handler
       
   153 
       
   154     wg isNil ifTrue:[
       
   155         oldTopView windowGroup:self windowGroup.
       
   156     ].
       
   157 
       
   158     anSTXWindow device 
       
   159         reparentWindow:anSTXWindow id
       
   160         to:self id.
       
   161 
       
   162     self addSubView:anSTXWindow.
       
   163     anSTXWindow enableEvent:#structureNotify.
       
   164 
       
   165     anSTXWindow realize.
       
   166     anSTXWindow map.
       
   167     wg notNil ifTrue:[
       
   168         wg removeView:oldTopView.
       
   169         wg addView:oldTopView.
       
   170     ].
       
   171 
       
   172     anSTXWindow origin:0.0 @ 0.0 corner:1.0 @ 1.0.
       
   173 
       
   174 
       
   175 ! !
       
   176 
   131 !ExternalTopView class methodsFor:'documentation'!
   177 !ExternalTopView class methodsFor:'documentation'!
   132 
   178 
   133 version
   179 version
   134     ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.8 1999-02-16 23:25:00 cg Exp $'
   180     ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.9 1999-02-17 00:06:20 cg Exp $'
   135 ! !
   181 ! !