Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 39 additions & 43 deletions drracket-core-lib/drracket/private/bindings-browser.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,22 @@ Marshalling (and hence the 'read' method of the snipclass omitted for fast proto

(begin (parameterize ([current-output-port output-port]
[pretty-print-columns 30])
(for-each
(λ (binding-pair)
(let* ([stx (car binding-pair)]
[value (cadr binding-pair)])
; this totally destroys the 'output-port' abstraction. I don't know
; how to enrich the notion of an output-port to get 'bold'ing to
; work otherwise...
(let* ([before (send output-text last-position)])
(pretty-print (syntax->datum stx))
(let* ([post-newline (send output-text last-position)])
(send output-text delete post-newline) ; delete the trailing \n. yuck!
(send output-text insert " ")
(send output-text change-style
(make-object style-delta% 'change-bold)
before (- post-newline 1)))
(pretty-print value))))
bindings))
(for ([binding-pair (in-list bindings)])
(define stx (car binding-pair))
(define value (cadr binding-pair))
; this totally destroys the 'output-port' abstraction. I don't know
; how to enrich the notion of an output-port to get 'bold'ing to
; work otherwise...
(define before (send output-text last-position))
(pretty-print (syntax->datum stx))
(let* ([post-newline (send output-text last-position)])
(send output-text delete post-newline) ; delete the trailing \n. yuck!
(send output-text insert " ")
(send output-text change-style
(make-object style-delta% 'change-bold)
before
(- post-newline 1)))
(pretty-print value)))
(send output-text delete (send output-text last-position)) ; delete final trailing \n
(make-modern output-text))

Expand All @@ -88,17 +87,17 @@ Marshalling (and hence the 'read' method of the snipclass omitted for fast proto
(bottom-inset 0))

(define inner-t (make-object text%))
(define inner-es (instantiate editor-snip% ()
(editor inner-t)
(with-border? #f)
(left-margin 0)
(top-margin 0)
(right-margin 0)
(bottom-margin 0)
(left-inset 0)
(top-inset 0)
(right-inset 0)
(bottom-inset 0)))
(define inner-es (new editor-snip%
(editor inner-t)
(with-border? #f)
(left-margin 0)
(top-margin 0)
(right-margin 0)
(bottom-margin 0)
(left-inset 0)
(top-inset 0)
(right-inset 0)
(bottom-inset 0)))

(define details-shown? #t)

Expand Down Expand Up @@ -134,17 +133,17 @@ Marshalling (and hence the 'read' method of the snipclass omitted for fast proto
(send outer-t insert inner-es)
(make-modern outer-t)

(send inner-t insert (instantiate editor-snip% ()
(editor output-text)
(with-border? #f)
(left-margin 0)
(top-margin 0)
(right-margin 0)
(bottom-margin 0)
(left-inset 0)
(top-inset 0)
(right-inset 0)
(bottom-inset 0)))
(send inner-t insert (new editor-snip%
(editor output-text)
(with-border? #f)
(left-margin 0)
(top-margin 0)
(right-margin 0)
(bottom-margin 0)
(left-inset 0)
(top-inset 0)
(right-inset 0)
(bottom-inset 0)))
(send inner-t change-style (make-object style-delta% 'change-alignment 'top) 0 2)

(send output-text hide-caret #t)
Expand Down Expand Up @@ -172,10 +171,7 @@ Marshalling (and hence the 'read' method of the snipclass omitted for fast proto
(init-field [state 'up])

(define/override (copy)
(instantiate turn-snip% ()
(on-up on-up)
(on-down on-down)
(state state)))
(new turn-snip% (on-up on-up) (on-down on-down) (state state)))

(define/override (draw dc x y left top right bottom dx dy draw-caret)
(define bitmap
Expand Down
Loading