DisplayRootView.st
changeset 2916 79eedd2e05ac
parent 2572 447398073628
child 3253 0dd15811ccc2
--- a/DisplayRootView.st	Sat Sep 18 16:17:46 1999 +0200
+++ b/DisplayRootView.st	Mon Sep 20 08:59:09 1999 +0200
@@ -35,8 +35,9 @@
 
 documentation
 "
-    this class describes Xs rootWindow (which is the background window and
-    can be used for drawing outside of Views i.e. for dragging between Views).
+    this class describes the rootWindow (which is the background window or
+    desktop and can be used for drawing outside of Views 
+    i.e. for dragging between Views).
 
     For historic and compatibility reasons, there is a global variable 
     called 'RootView', which is bound to the default displays ('Display')
@@ -56,7 +57,9 @@
     windowManager menus are drawn. If that is the case, your paining
     into the rootView may not be visible, unless you set the #noClipByChildren
     option (see below).
-
+    Also, it is not guaranteed, that all devices support drawing in the
+    root window - especially if the device is a simulated one, such as
+    a remote webBrowser ...
     In general, you should never use the rootView for normal applications.
 
     To draw in the (Displays) root window:
@@ -110,23 +113,25 @@
 !DisplayRootView methodsFor:'accessing'!
 
 controller
-    "I have no controller"
+    "return nil - I have no controller"
 
     ^ nil
 !
 
 name
+    "return my name - always 'RootWindow'"
+
     ^ 'RootWindow'
 !
 
 sensor
-    "I have no sensor"
+    "return nil, since I have no sensor"
 
     ^ nil
 !
 
 windowGroup
-    "I have no windowGroup"
+    "return nil - I have no windowGroup"
 
     ^ nil
 ! !
@@ -165,8 +170,10 @@
 
 canDrop:aCollectionOfDropObjects
     "return true, if aCollectionOfDropObjects can be
-     dropped in the receiver. This method should be
-     redefined in views which can take objects"
+     dropped in the receiver. 
+     False is returned here, since nothing can be dropped on the desktop.
+     (for now - actually some systems do allow dropping things on the desktop
+      and this query should be forwarded to my display device)"
 
     ^ false
 
@@ -174,7 +181,7 @@
 !
 
 isRootView
-    "yes, I am a rootview"
+    "return true, since yes, I am a rootview"
 
     ^ true
 
@@ -189,15 +196,17 @@
 
     |errorOccured|
 
+    device platformName = 'WIN32' ifTrue:[^ true].
+
     errorOccured := false.
     device class deviceErrorSignal handle:[:ex |
-	errorOccured := true.
-	ex return
+        errorOccured := true.
+        ex return
     ] do:[
-	self enableButtonEvents.
-	device flush.
+        self enableButtonEvents.
+        device flush.
     ].
-    ^ errorOccured
+    ^ errorOccured not
 
     "
      DisplayRootView new
@@ -206,7 +215,7 @@
 !
 
 shown
-    "a rootview is always assumed to be visible"
+    "return true - a rootview is always assumed to be visible"
 
     ^ true
 
@@ -217,6 +226,6 @@
 !DisplayRootView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.22 1999-04-23 12:42:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DisplayRootView.st,v 1.23 1999-09-20 06:58:22 cg Exp $'
 ! !
 DisplayRootView initialize!