class: PopUpView
authorStefan Vogel <sv@exept.de>
Tue, 18 Feb 2014 16:05:32 +0100
changeset 6270 72356e5fa8f2
parent 6269 703a7c20f524
child 6271 15254eaf8d5f
class: PopUpView changed:7 methods access device via message send
PopUpView.st
--- a/PopUpView.st	Tue Feb 18 15:59:11 2014 +0100
+++ b/PopUpView.st	Tue Feb 18 16:05:32 2014 +0100
@@ -174,7 +174,7 @@
 showAtPointer
     "realize the view at the current pointer position"
 
-    self showAt:(device pointerPosition) resizing:true
+    self showAt:(self graphicsDevice pointerPosition) resizing:true
 !
 
 showCenteredIn:aView
@@ -206,39 +206,31 @@
 !PopUpView methodsFor:'grabbing'!
 
 grabKeyboard
-    previousKeyboardGrab := device activeKeyboardGrab.
+    previousKeyboardGrab := self graphicsDevice activeKeyboardGrab.
 "/ Transcript show:'k-ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.
     ^ super grabKeyboard
-
-
 !
 
 grabPointerWithCursor:aCursorOrNil
-    previousPointerGrab := device activePointerGrab.
+    previousPointerGrab := self graphicsDevice activePointerGrab.
 "/ Transcript show:'ggg by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousPointerGrab printString.
     ^ super grabPointerWithCursor:aCursorOrNil
-
-
 !
 
 ungrabKeyboard
 "/ Transcript show:'k-uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousKeyboardGrab printString.
     super ungrabKeyboard.
     previousKeyboardGrab notNil ifTrue:[
-        device grabKeyboardInView:previousKeyboardGrab
+        self graphicsDevice grabKeyboardInView:previousKeyboardGrab
     ].
-
-
 !
 
 ungrabPointer
 "/ Transcript show:'uuu by '; show:self; show:'[',self identityHash printString,']'; showCR:' - previous is ' , previousPointerGrab printString.
     super ungrabPointer.
     previousPointerGrab notNil ifTrue:[
-        device grabPointerInView:previousPointerGrab
+        self graphicsDevice grabPointerInView:previousPointerGrab
     ].
-
-
 ! !
 
 !PopUpView methodsFor:'initialization & release'!
@@ -265,7 +257,7 @@
     super initStyle.
 
     DefaultBorderColor notNil ifTrue:[
-        self borderColor:(DefaultBorderColor onDevice:device).
+        self borderColor:(DefaultBorderColor onDevice:self graphicsDevice).
     ].
     (bw := DefaultBorderWidth) isNil ifTrue:[
         bw := (styleSheet is3D ifTrue:[0] ifFalse:[1]).
@@ -279,8 +271,8 @@
     ].
     self level:l.
 
-    (self class shadowsOnDevice:device) ifTrue:[
-        shadowView := (ShadowView onDevice:device) for:self.
+    (self class shadowsOnDevice:self graphicsDevice) ifTrue:[
+        shadowView := (ShadowView onDevice:self graphicsDevice) for:self.
     ].
 
     "Modified: / 4.12.1998 / 15:11:28 / cg"
@@ -301,8 +293,8 @@
 releasePointer 
     "release the mouse pointer"
 
-    device activePointerGrab == self ifTrue:[
-        device ungrabPointer.
+    self graphicsDevice activePointerGrab == self ifTrue:[
+        self graphicsDevice ungrabPointer.
     ].
 
     "Modified: 12.5.1996 / 22:04:09 / cg"
@@ -446,10 +438,10 @@
 !PopUpView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.61 2014-01-16 14:32:56 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.62 2014-02-18 15:05:32 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.61 2014-01-16 14:32:56 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/PopUpView.st,v 1.62 2014-02-18 15:05:32 stefan Exp $'
 ! !