DisplayRootView.st
changeset 71 6a42b2b115f8
parent 54 29a6b2f8e042
child 89 ea2bf46eb669
equal deleted inserted replaced
70:3cb3992ead10 71:6a42b2b115f8
     1 "
     1 "
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     3               All Rights Reserved
     3 	      All Rights Reserved
     4 
     4 
     5  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
    17        category:'Views-Basic'
    17        category:'Views-Basic'
    18 !
    18 !
    19 
    19 
    20 DisplayRootView comment:'
    20 DisplayRootView comment:'
    21 COPYRIGHT (c) 1988 by Claus Gittinger
    21 COPYRIGHT (c) 1988 by Claus Gittinger
    22               All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.7 1994-08-05 01:13:51 claus Exp $
    24 $Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.8 1994-10-10 02:29:37 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 Smalltalk at:#RootView put:nil!
    27 Smalltalk at:#RootView put:nil!
    28 
    28 
    29 !DisplayRootView class methodsFor:'documentation'!
    29 !DisplayRootView class methodsFor:'documentation'!
    30 
    30 
    31 copyright
    31 copyright
    32 "
    32 "
    33  COPYRIGHT (c) 1988 by Claus Gittinger
    33  COPYRIGHT (c) 1988 by Claus Gittinger
    34               All Rights Reserved
    34 	      All Rights Reserved
    35 
    35 
    36  This software is furnished under a license and may be used
    36  This software is furnished under a license and may be used
    37  only in accordance with the terms of that license and with the
    37  only in accordance with the terms of that license and with the
    38  inclusion of the above copyright notice.   This software may not
    38  inclusion of the above copyright notice.   This software may not
    39  be provided or otherwise made available to, or used by, any
    39  be provided or otherwise made available to, or used by, any
    42 "
    42 "
    43 !
    43 !
    44 
    44 
    45 version
    45 version
    46 "
    46 "
    47 $Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.7 1994-08-05 01:13:51 claus Exp $
    47 $Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.8 1994-10-10 02:29:37 claus Exp $
    48 "
    48 "
    49 !
    49 !
    50 
    50 
    51 documentation
    51 documentation
    52 "
    52 "
    57 
    57 
    58 !DisplayRootView class methodsFor:'initialization'!
    58 !DisplayRootView class methodsFor:'initialization'!
    59 
    59 
    60 initialize
    60 initialize
    61     Display isNil ifTrue:[
    61     Display isNil ifTrue:[
    62         Workstation initialize
    62 	Workstation initialize
    63     ].
    63     ].
    64     super initialize
    64     super initialize
    65 ! !
    65 ! !
    66 
    66 
    67 !DisplayRootView class methodsFor:'instance creation'!
    67 !DisplayRootView class methodsFor:'instance creation'!
    68 
    68 
    69 new
    69 new
    70     "since there is only one RootView - catch new"
    70     "since there is only one RootView - catch new"
    71     RootView isNil ifTrue:[
    71     RootView isNil ifTrue:[
    72         RootView := super new
    72 	RootView := super new
    73     ].
    73     ].
    74     ^ RootView
    74     ^ RootView
    75 ! !
    75 ! !
    76 
    76 
    77 !DisplayRootView methodsFor:'initialization'!
    77 !DisplayRootView methodsFor:'initialization'!
   105 
   105 
   106 sensor
   106 sensor
   107     ^ nil
   107     ^ nil
   108 ! !
   108 ! !
   109 
   109 
       
   110 !DisplayRootView methodsFor:'destroying'!
       
   111 
       
   112 destroy
       
   113     "catch destroy - some windowmanagers get confused if
       
   114      we destroy the rootWindow if its a virtual root window"
       
   115 
       
   116     ^ self
       
   117 ! !
       
   118 
   110 !DisplayRootView methodsFor:'queries'!
   119 !DisplayRootView methodsFor:'queries'!
   111 
   120 
   112 canDrop:anObjectOrCollection
   121 canDrop:anObjectOrCollection
   113     "return true, if anObjectOrCollection can be
   122     "return true, if anObjectOrCollection can be
   114      dropped in the receiver. This method should be
   123      dropped in the receiver. This method should be
   124 
   133 
   125     |errorOccured|
   134     |errorOccured|
   126 
   135 
   127     errorOccured := false.
   136     errorOccured := false.
   128     device class deviceErrorSignal handle:[:ex |
   137     device class deviceErrorSignal handle:[:ex |
   129         errorOccured := true.
   138 	errorOccured := true.
   130         ex return
   139 	ex return
   131     ] do:[
   140     ] do:[
   132         self enableButtonEvents.
   141 	self enableButtonEvents.
   133         device synchronizeOutput.
   142 	device synchronizeOutput.
   134     ].
   143     ].
   135     ^ errorOccured
   144     ^ errorOccured
   136 
   145 
   137     "RootView isWindowManagerRunning"
   146     "RootView isWindowManagerRunning"
   138 ! !
   147 ! !