SimpleView.st
changeset 5667 c065259f0d5c
parent 5665 f901e164a7ba
child 5669 bc47f2771650
equal deleted inserted replaced
5666:e5d4d5e455e5 5667:c065259f0d5c
  6002             ]
  6002             ]
  6003         ].
  6003         ].
  6004         shownBefore ~~ true ifTrue:[
  6004         shownBefore ~~ true ifTrue:[
  6005             self changed:#visibility.
  6005             self changed:#visibility.
  6006         ].
  6006         ].
  6007 
       
  6008         self isTopView ifFalse:[
       
  6009             self isKeyboardConsumer ifTrue:[
       
  6010                 self takeFocusWhenMapped ifTrue:[
       
  6011                     self requestFocus
       
  6012                 ]
       
  6013             ].
       
  6014         ].
       
  6015     ]
  6007     ]
  6016 
  6008 
  6017     "Modified: / 09-12-2010 / 10:53:30 / cg"
  6009     "Modified: / 09-12-2010 / 18:12:24 / cg"
  6018 !
  6010 !
  6019 
  6011 
  6020 mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime
  6012 mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime
  6021     "the mouseWheel was turned - handle as a scroll operation.
  6013     "the mouseWheel was turned - handle as a scroll operation.
  6022      Specialized application windows may redefine this for any other
  6014      Specialized application windows may redefine this for any other
  6728     ] ifFalse:[
  6720     ] ifFalse:[
  6729         flagBits := flagBits bitClear:FlagTakeFocusWhenMapped
  6721         flagBits := flagBits bitClear:FlagTakeFocusWhenMapped
  6730     ].
  6722     ].
  6731 
  6723 
  6732     "Created: / 09-12-2010 / 10:34:11 / cg"
  6724     "Created: / 09-12-2010 / 10:34:11 / cg"
       
  6725 !
       
  6726 
       
  6727 topViewWasMapped
       
  6728     "invoked when my topView is mapped"
       
  6729 
       
  6730     self isKeyboardConsumer ifTrue:[
       
  6731         self takeFocusWhenMapped ifTrue:[
       
  6732             self requestFocus
       
  6733         ]
       
  6734     ] ifFalse:[
       
  6735         subViews notNil ifTrue:[
       
  6736             subViews do:[:eachSubView |
       
  6737                 eachSubView topViewWasMapped   
       
  6738             ].
       
  6739         ].
       
  6740     ].
       
  6741 
       
  6742     "Created: / 09-12-2010 / 18:11:51 / cg"
  6733 !
  6743 !
  6734 
  6744 
  6735 wantsFocusWithButtonPress
  6745 wantsFocusWithButtonPress
  6736     "views which do not like to take the keyboard focus
  6746     "views which do not like to take the keyboard focus
  6737      with buttonPress can do so by redefining this
  6747      with buttonPress can do so by redefining this
 10728 ! !
 10738 ! !
 10729 
 10739 
 10730 !SimpleView class methodsFor:'documentation'!
 10740 !SimpleView class methodsFor:'documentation'!
 10731 
 10741 
 10732 version
 10742 version
 10733     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.679 2010-12-09 13:34:01 cg Exp $'
 10743     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.680 2010-12-09 17:14:27 cg Exp $'
 10734 !
 10744 !
 10735 
 10745 
 10736 version_CVS
 10746 version_CVS
 10737     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.679 2010-12-09 13:34:01 cg Exp $'
 10747     ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.680 2010-12-09 17:14:27 cg Exp $'
 10738 ! !
 10748 ! !
 10739 
 10749 
 10740 SimpleView initialize!
 10750 SimpleView initialize!