UIGalleryView.st
changeset 3384 cfdf2bd0d738
parent 3313 dc9f18489a12
child 3432 448be738b44b
equal deleted inserted replaced
3383:9041e2616a95 3384:cfdf2bd0d738
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
     2  COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
   652 
   650 
   653 redrawSelection
   651 redrawSelection
   654     "redraw all items selected"
   652     "redraw all items selected"
   655 
   653 
   656     (shown and:[selection notNil and:[hiddenCounter == 0]]) ifTrue:[
   654     (shown and:[selection notNil and:[hiddenCounter == 0]]) ifTrue:[
   657         self clippedByChildren:false.
   655         gc clippedByChildren:false.
   658 
   656 
   659         self handlesOf:selection do:[:aRectangle|
   657         self handlesOf:selection do:[:aRectangle|
   660             self paint:self blackColor.
   658             gc paint:self blackColor.
   661             self fillRectangle:aRectangle.
   659             gc fillRectangle:aRectangle.
   662 
   660 
   663             self paint:self whiteColor.
   661             gc paint:self whiteColor.
   664             self displayRectangle:(aRectangle insetBy:0).
   662             gc displayRectangle:(aRectangle insetBy:0).
   665         ].
   663         ].
   666         self clippedByChildren:true.
   664         gc clippedByChildren:true.
   667     ].
   665     ].
   668 !
   666 !
   669 
   667 
   670 selection:aView
   668 selection:aView
   671     "selection changed"
   669     "selection changed"
   687         |r forceExpose|
   685         |r forceExpose|
   688         
   686         
   689         hiddenCounter :=  hiddenCounter + 1.
   687         hiddenCounter :=  hiddenCounter + 1.
   690         hiddenCounter == 1 ifTrue:[
   688         hiddenCounter == 1 ifTrue:[
   691             (shown and:[selection notNil]) ifTrue:[
   689             (shown and:[selection notNil]) ifTrue:[
   692                 self clippedByChildren:false.
   690                 gc clippedByChildren:false.
   693 
   691 
   694                 self handlesOf:selection do:[:aRectangle|
   692                 self handlesOf:selection do:[:aRectangle|
   695                     self clearRectangle:aRectangle.
   693                     self clearRectangle:aRectangle.
   696                     self invalidateRectangle:aRectangle repairNow:false.
   694                     self invalidateRectangle:aRectangle repairNow:false.
   697                 ].
   695                 ].
   698                 self clippedByChildren:true.
   696                 gc clippedByChildren:true.
   699 
   697 
   700                 r := selection bounds.
   698                 r := selection bounds.
   701 
   699 
   702                 forceExpose := 
   700                 forceExpose := 
   703                     [:sv|
   701                     [:sv|
   704                         |absOrg absFrame|
   702                         |absOrg absFrame|
   705 
   703 
   706                         (sv bounds intersects:r) ifTrue:[   
   704                         (sv bounds intersects:r) ifTrue:[   
   707                             sv isView ifTrue:[
   705                             sv isView ifTrue:[
   708                                 sv borderColor:(self whiteColor).           "/ kludge to force a redraw
   706                                 "/ kludge to force a redraw
       
   707                                 sv borderColor:(self whiteColor). 
   709                                 sv borderColor:(self blackColor).
   708                                 sv borderColor:(self blackColor).
   710 
   709 
   711                                 sv withAllSubViewsDo:[:v|
   710                                 sv withAllSubViewsDo:[:v|
   712                                     v realized ifTrue:[
   711                                     v realized ifTrue:[
   713                                         v fill:v viewBackground.
   712                                         v fill:v viewBackground.