From 104dde2a08f6e96289ce2f825f4760bd52f58fba Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 19 Apr 2009 22:20:46 +0000 Subject: [PATCH] added back in support for the with-border? flag svn: r14561 --- .../framework/private/decorated-editor-snip.ss | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/collects/framework/private/decorated-editor-snip.ss b/collects/framework/private/decorated-editor-snip.ss index f495ee35a6..969e76c446 100644 --- a/collects/framework/private/decorated-editor-snip.ss +++ b/collects/framework/private/decorated-editor-snip.ss @@ -22,6 +22,9 @@ (define editor-snip:decorated-mixin (mixin ((class->interface editor-snip%)) (editor-snip:decorated<%>) + (init [with-border? #t]) + (define draw-border? with-border?) + ;; get-corner-bitmap : -> (union #f (is-a?/c bitmap%)) ;; returns the bitmap to be shown in the top right corner. (define/public (get-corner-bitmap) #f) @@ -152,13 +155,14 @@ (+ x (unbox bil) 2) (+ y (unbox bmt)))]))) - (send dc set-pen (get-pen)) - (send dc set-brush (get-brush)) - (send dc draw-rectangle - (+ x (unbox bil)) - (+ y (unbox bit)) - (max 0 (- (unbox bw) (unbox bil) (unbox bir))) - (max 0 (- (unbox bh) (unbox bit) (unbox bib)))) + (when draw-border? + (send dc set-pen (get-pen)) + (send dc set-brush (get-brush)) + (send dc draw-rectangle + (+ x (unbox bil)) + (+ y (unbox bit)) + (max 0 (- (unbox bw) (unbox bil) (unbox bir))) + (max 0 (- (unbox bh) (unbox bit) (unbox bib))))) (send dc set-pen old-pen) (send dc set-brush old-brush))))