DeviceWorkstation.st
changeset 2876 dbe1454f8539
parent 2875 c861e7a3272d
child 2880 9dda5e03b02b
equal deleted inserted replaced
2875:c861e7a3272d 2876:dbe1454f8539
  1106      v clippedByChildren:false.
  1106      v clippedByChildren:false.
  1107      v fillRectangleX:10 y:10 width:100 height:100.  
  1107      v fillRectangleX:10 y:10 width:100 height:100.  
  1108     "
  1108     "
  1109 !
  1109 !
  1110 
  1110 
       
  1111 suppressShadowViews
       
  1112     "return true, if this device wants to suppress shadow views
       
  1113      (i.e. shadows under popups and modalBoxes).
       
  1114      Some (slow) devices may want to return true here"
       
  1115 
       
  1116     ^ false
       
  1117 !
       
  1118 
  1111 translatePoint:aPoint from:windowId1 to:windowId2
  1119 translatePoint:aPoint from:windowId1 to:windowId2
  1112     "given a point in window1 (defined by its id), return the coordinate of
  1120     "given a point in window1 (defined by its id), return the coordinate of
  1113      aPoint in window2 (defined by its id).
  1121      aPoint in window2 (defined by its id).
  1114      Use to xlate points from a window to rootwindow, mainly for rubber-line
  1122      Use to xlate points from a window to rootwindow, mainly for rubber-line
  1115      drawing on the displays root window."
  1123      drawing on the displays root window."
  4640 initializeKeyboardMap
  4648 initializeKeyboardMap
  4641     "keystrokes from the server are translated via the keyboard map.
  4649     "keystrokes from the server are translated via the keyboard map.
  4642      Untranslated keystrokes arrive either as characters, or symbols
  4650      Untranslated keystrokes arrive either as characters, or symbols
  4643      (which are the keySyms as symbol). The mapping table which is
  4651      (which are the keySyms as symbol). The mapping table which is
  4644      setup here, is used in sendKeyPress:... later.
  4652      setup here, is used in sendKeyPress:... later.
       
  4653      Here, an empty (no-translation) keyboard map is setup initially;
       
  4654      this is usually filled via the keyboard.rc startup file.
  4645     "
  4655     "
  4646 
  4656 
  4647     keyboardMap isNil ifTrue:[
  4657     keyboardMap isNil ifTrue:[
  4648 	keyboardMap := KeyboardMap new.
  4658         keyboardMap := KeyboardMap new.
  4649     ].
  4659     ].
  4650 
  4660 
  4651     "
  4661     "
  4652      no more setup here - moved everything out into 'display.rc' file
  4662      no more setup here - moved everything out into 'display.rc' file
  4653     "
  4663     "
  5386     modifier := self modifierKeyTranslationFor:untranslatedKey.
  5396     modifier := self modifierKeyTranslationFor:untranslatedKey.
  5387     "/
  5397     "/
  5388     "/ only prepend, if this is not a modifier
  5398     "/ only prepend, if this is not a modifier
  5389     "/
  5399     "/
  5390     modifier isNil ifTrue:[
  5400     modifier isNil ifTrue:[
  5391 	s := xlatedKey asString.
  5401         s := xlatedKey asString.
  5392 	ctrlDown ifTrue:[
  5402         ctrlDown ifTrue:[
  5393 	    xlatedKey := 'Ctrl' , s
  5403             xlatedKey := 'Ctrl' , s
  5394 	].
  5404         ].
  5395 	metaDown ifTrue:[
  5405         metaDown ifTrue:[
  5396 	    xlatedKey := 'Cmd' , s
  5406             xlatedKey := 'Cmd' , s
  5397 	].
  5407         ].
  5398 	altDown ifTrue:[
  5408         altDown ifTrue:[
  5399 	    xlatedKey := 'Alt' , s
  5409             xlatedKey := 'Alt' , s
  5400 	].
  5410         ].
  5401 	xlatedKey isCharacter ifFalse:[
  5411         xlatedKey isCharacter ifFalse:[
  5402 	    xlatedKey := xlatedKey asSymbol
  5412             xlatedKey := xlatedKey asSymbol
  5403 	].
  5413         ].
  5404     ].
  5414     ].
  5405 
  5415 
  5406     xlatedKey := aView keyboardMap valueFor:xlatedKey.
  5416     xlatedKey := aView keyboardMap valueFor:xlatedKey.
  5407     xlatedKey isCharacter ifFalse:[
  5417     xlatedKey isCharacter ifFalse:[
  5408 	xlatedKey := xlatedKey asSymbol
  5418         xlatedKey := xlatedKey asSymbol
  5409     ].
  5419     ].
  5410     ^ xlatedKey
  5420     ^ xlatedKey
  5411 
  5421 
  5412     "Modified: 28.2.1996 / 17:12:16 / cg"
  5422     "Modified: 28.2.1996 / 17:12:16 / cg"
  5413 ! !
  5423 ! !
  6537 ! !
  6547 ! !
  6538 
  6548 
  6539 !DeviceWorkstation class methodsFor:'documentation'!
  6549 !DeviceWorkstation class methodsFor:'documentation'!
  6540 
  6550 
  6541 version
  6551 version
  6542     ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.326 1999-08-31 11:50:06 cg Exp $'
  6552     ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.327 1999-08-31 15:57:47 cg Exp $'
  6543 ! !
  6553 ! !
  6544 DeviceWorkstation initialize!
  6554 DeviceWorkstation initialize!