TopView.st
changeset 908 0fbe814e06ee
parent 907 6bc7254cdd6a
child 909 d2d624d57f61
equal deleted inserted replaced
907:6bc7254cdd6a 908:0fbe814e06ee
   271     ^ width
   271     ^ width
   272 ! !
   272 ! !
   273 
   273 
   274 !TopView methodsFor:'startup'!
   274 !TopView methodsFor:'startup'!
   275 
   275 
   276 openAt:aPosition
   276 openAt:aPosition transientFor:anotherView
       
   277     "force the view to be opened at some position on the screen
       
   278      AND tell the windowManager to NOT let the user choose a position
       
   279      (i.e. suppress any ghostframe).
       
   280      The view is marked as being a transient (i.e. pop-up) view for
       
   281      anotherView - it will deiconify with it and (on some windowManagers)
       
   282      have no iconify button of its own.
       
   283      Notice, that its up to the windowManager to care for any borders -
       
   284      it seems not deterministic, where the view actually ends up being positioned.
       
   285      Not all windowManagers honor this - some insist on it ..."
       
   286 
       
   287     |otherId|
       
   288 
       
   289     self create. 
       
   290     anotherView isNil ifTrue:[
       
   291         otherId := drawableId.
       
   292     ] ifFalse:[
       
   293         anotherView create.
       
   294         otherId := anotherView id.
       
   295     ].
       
   296     device setTransient:drawableId for:otherId.
       
   297     self origin:aPosition.
       
   298     self open
       
   299 
       
   300     "
       
   301      |v1 v2|
       
   302 
       
   303      v1 := StandardSystemView extent:300@300.
       
   304      v2 := StandardSystemView extent:300@300.
       
   305      v1 open.
       
   306      v2 openAt:0@0 transientFor:v1.
       
   307     "
       
   308 
       
   309     "Created: 28.6.1996 / 10:51:55 / cg"
       
   310     "Modified: 28.6.1996 / 10:53:19 / cg"
       
   311 !
       
   312 
       
   313 openTransientAt:aPosition
   277     "force the view to be opened at soem position on the screen
   314     "force the view to be opened at soem position on the screen
   278      AND tell the windowManager to NOT let the user choose a position
   315      AND tell the windowManager to NOT let the user choose a position
   279      (i.e. suppress any ghostframe).
   316      (i.e. suppress any ghostframe).
   280      Notice, that its up to the windowManager to care for any borders -
   317      Notice, that its up to the windowManager to care for any borders -
   281      it seems not deterministic, where the view actually ends up being positioned.
   318      it seems not deterministic, where the view actually ends up being positioned.
   282      Not all windowManagers honor this - some insist on it ..."
   319      Not all windowManagers honor this - some insist on it ..."
   283 
   320 
   284     self create.
   321     self openAt:aPosition transientFor:nil
   285     device setTransient:drawableId for:drawableId.
       
   286     self origin:aPosition.
       
   287     self open
       
   288 
   322 
   289     "normal open:
   323     "normal open:
   290 
   324 
   291      |v|
   325      |v|
   292 
   326 
   297     "open at position:
   331     "open at position:
   298 
   332 
   299      |v|
   333      |v|
   300 
   334 
   301      v := StandardSystemView extent:300@300.
   335      v := StandardSystemView extent:300@300.
   302      v openAt:10@10
   336      v openTransientAt:10@10
   303     "
   337     "
   304 
   338 
   305     "Modified: 28.6.1996 / 10:47:16 / cg"
   339     "Modified: 28.6.1996 / 10:47:16 / cg"
       
   340     "Created: 28.6.1996 / 10:52:30 / cg"
   306 !
   341 !
   307 
   342 
   308 openWithExtent:anExtent
   343 openWithExtent:anExtent
   309     "set extent and open. The given extent overrides the 
   344     "set extent and open. The given extent overrides the 
   310      receivers preferredExtent.
   345      receivers preferredExtent.
   405 ! !
   440 ! !
   406 
   441 
   407 !TopView  class methodsFor:'documentation'!
   442 !TopView  class methodsFor:'documentation'!
   408 
   443 
   409 version
   444 version
   410     ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.27 1996-06-28 08:47:51 cg Exp $'
   445     ^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.28 1996-06-28 08:54:13 cg Exp $'
   411 ! !
   446 ! !