# HG changeset patch # User Claus Gittinger # Date 1135182641 -3600 # Node ID 49376dd5489f0a2e4c05cfe70a8d1bf5e94ac2e6 # Parent c83f9aebaf41ac892b217e06b1b27e2beac50636 dont want 'em ugly comments !!!!! diff -r c83f9aebaf41 -r 49376dd5489f SimpleView.st --- a/SimpleView.st Wed Dec 21 10:05:13 2005 +0100 +++ b/SimpleView.st Wed Dec 21 17:30:41 2005 +0100 @@ -5658,91 +5658,84 @@ !SimpleView methodsFor:'focus handling'! canTab - "returns true if widget is tabable - " + "returns true if the widget is tabable" + "/ ^ canTab == true ^ flagBits bitTest:FlagCanTab ! canTab:aBoolean - "set widget tabable or not - " + "set widget tabable or not" + "/ canTab := aBoolean aBoolean ifTrue:[ - flagBits := flagBits bitOr:FlagCanTab + flagBits := flagBits bitOr:FlagCanTab ] ifFalse:[ - flagBits := flagBits bitClear:FlagCanTab + flagBits := flagBits bitClear:FlagCanTab ]. ! doNotRequestFocusOnPointerEnter "returns true if widget SHOULD NOT request the focus on pointer enter; - if false is returned, the behavior depends upon the settings. - " + if false is returned, the behavior depends upon the settings." + ^ flagBits bitTest:FlagDoNotRequestFocusOnPointerEnter ! doNotRequestFocusOnPointerEnter:aBoolean "if true, setup that the widget SHOULD NOT request the focus on pointer enter; - if false, the behavior depends upon the settings. - " + if false, the behavior depends upon the settings." aBoolean ifTrue:[ - flagBits := flagBits bitOr:FlagDoNotRequestFocusOnPointerEnter + flagBits := flagBits bitOr:FlagDoNotRequestFocusOnPointerEnter ] ifFalse:[ - flagBits := flagBits bitClear:FlagDoNotRequestFocusOnPointerEnter + flagBits := flagBits bitClear:FlagDoNotRequestFocusOnPointerEnter ]. ! focusNext "get next focus view to self - Skip invisible & disabled widgets. - " + Skip invisible & disabled widgets." + |viewInSubView| (shown and:[subViews notNil]) ifTrue:[ - subViews do:[:aSubView| - aSubView shown ifTrue:[ - (aSubView canTab and:[aSubView enabled]) ifTrue:[ - ^ aSubView - ]. - - (viewInSubView := aSubView focusNext) notNil ifTrue:[ - ^ viewInSubView - ] - ] - ] + subViews do:[:aSubView| + aSubView shown ifTrue:[ + (aSubView canTab and:[aSubView enabled]) ifTrue:[ + ^ aSubView + ]. + + (viewInSubView := aSubView focusNext) notNil ifTrue:[ + ^ viewInSubView + ] + ] + ] ]. ^ nil - - - ! focusPrevious "get previous focus view to self - Skip invisible & disabled widgets. - " + Skip invisible & disabled widgets." + |viewInSubView| (shown and:[subViews notNil]) ifTrue:[ - subViews reverseDo:[:aSubView| - aSubView shown ifTrue:[ - viewInSubView := aSubView focusPrevious. - - viewInSubView notNil ifTrue:[ - ^ viewInSubView - ]. - (aSubView canTab and:[aSubView enabled]) ifTrue:[ - ^ aSubView - ]. - ] - ] + subViews reverseDo:[:aSubView| + aSubView shown ifTrue:[ + viewInSubView := aSubView focusPrevious. + + viewInSubView notNil ifTrue:[ + ^ viewInSubView + ]. + (aSubView canTab and:[aSubView enabled]) ifTrue:[ + ^ aSubView + ]. + ] + ] ]. ^ nil - - - ! requestDoNotFocusOnPointerEnter @@ -9636,7 +9629,7 @@ !SimpleView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.526 2005-11-14 12:25:54 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.527 2005-12-21 16:30:41 cg Exp $' ! ! SimpleView initialize!