--- a/CodeGeneratorTool.st Sat Mar 07 12:11:31 2009 +0100
+++ b/CodeGeneratorTool.st Sat Mar 07 12:15:06 2009 +0100
@@ -2568,33 +2568,32 @@
!
code_forWidget_redraw
+ |sel comment code|
+
+ sel := 'redrawX:x y:y width:w height:h'.
generateComments ifFalse:[
- ^
-'redrawX:x y:y width:w height:h
- self paint:Color red.
- self filleRectangleX:x y:y width:w height:h.
-
- self paint:Color yellow.
- self displayLineFrom:0@0 to:(width@height)
- self displayLineFrom:width@0 to:(0@height)
-'
- ].
-
- ^
-'redrawX:x y:y width:w height:h
+ comment := ''.
+ ] ifTrue:[
+ comment := '
"called to redraw a part of the widgets area. x/y define the origin, w/h the size of
that area. The clipping region has already been set by the caller, so even if the code
below draws outside the redraw-area, it will not affect what is on the screen.
Therefore, the example below can fill the rectangle in the redraw area, but still draw
the cross in the outside regions."
+'.
+ ].
+
+ code := '
self paint:Color red.
- self filleRectangleX:x y:y width:w height:h.
+ self fillRectangleX:x y:y width:w height:h.
self paint:Color yellow.
- self displayLineFrom:0@0 to:(width@height)
- self displayLineFrom:width@0 to:(0@height)
-'
+ self displayLineFrom:0@0 to:(width@height).
+ self displayLineFrom:width@0 to:(0@height).
+'.
+
+ ^ sel,comment,code
!
code_forWidget_sizeChanged
@@ -2762,5 +2761,5 @@
!CodeGeneratorTool class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.59 2009-03-07 11:11:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/CodeGeneratorTool.st,v 1.60 2009-03-07 11:15:06 cg Exp $'
! !