UIPainter.st
changeset 1957 cd30f8cd59f8
parent 1954 1344ec1f99eb
child 1968 1a8b9416db6e
equal deleted inserted replaced
1956:65cc475656d3 1957:cd30f8cd59f8
  2854     (painter respondsTo:(aMessage selector)) ifTrue:[
  2854     (painter respondsTo:(aMessage selector)) ifTrue:[
  2855         ^ aMessage sendTo:painter
  2855         ^ aMessage sendTo:painter
  2856     ].
  2856     ].
  2857     super doesNotUnderstand:aMessage
  2857     super doesNotUnderstand:aMessage
  2858 
  2858 
       
  2859 !
       
  2860 
       
  2861 processEvent:anEvent
       
  2862     "filter keyboard events.
       
  2863      Return true, if I have eaten the event"
       
  2864 
       
  2865     |key|
       
  2866 
       
  2867     anEvent isKeyPressEvent ifTrue:[ 
       
  2868 
       
  2869         anEvent targetView == treeView ifFalse:[^ false].
       
  2870         treeView hasFocus ifFalse:[^ false].
       
  2871 
       
  2872         key := anEvent key.
       
  2873 
       
  2874 "/        (anEvent rawKey == #Cmdr) ifTrue:[
       
  2875 "/            self openNameEditorOnTreeSelection.
       
  2876 "/            ^ true.
       
  2877 "/        ].
       
  2878         (anEvent rawKey == #CtrlCursorUp) ifTrue:[ 
       
  2879             self doStepUp.
       
  2880             ^ true.
       
  2881         ].
       
  2882         (anEvent rawKey == #CtrlCursorDown) ifTrue:[ 
       
  2883             self doStepDown.
       
  2884             ^ true.
       
  2885         ].
       
  2886         (anEvent rawKey == #CtrlCursorLeft) ifTrue:[ 
       
  2887             self doStepOut.
       
  2888             ^ true.
       
  2889         ].
       
  2890         (anEvent rawKey == #CtrlCursorRight) ifTrue:[ 
       
  2891             self doStepIn.
       
  2892             ^ true.
       
  2893         ].
       
  2894     ].
       
  2895 
       
  2896     ^ false.
  2859 ! !
  2897 ! !
  2860 
  2898 
  2861 !UIPainter methodsFor:'help'!
  2899 !UIPainter methodsFor:'help'!
  2862 
  2900 
  2863 defaultInfoLabel
  2901 defaultInfoLabel
  3650 
  3688 
  3651 postOpenWith: aBuilder
  3689 postOpenWith: aBuilder
  3652     "sets the initial selection"
  3690     "sets the initial selection"
  3653 
  3691 
  3654     |myWindow canvasWindow canvasOrg galleryWindow 
  3692     |myWindow canvasWindow canvasOrg galleryWindow 
  3655      galleryOrg myOrg myCorner|
  3693      galleryOrg myOrg myCorner windowGroup|
  3656 
  3694 
  3657     super postOpenWith: aBuilder.
  3695     super postOpenWith: aBuilder.
       
  3696 
       
  3697     windowGroup := self topApplication windowGroup.
       
  3698     windowGroup addPreEventHook:self.
       
  3699 
  3658     treeView selection: #(1).
  3700     treeView selection: #(1).
  3659     aBuilder keyboardProcessor menuBar:nil.
  3701     aBuilder keyboardProcessor menuBar:nil.
  3660 
  3702 
  3661     myWindow := self window.
  3703     myWindow := self window.
  3662     canvasWindow := self painter topView.
  3704     canvasWindow := self painter topView.