use bold style to mark current frame, variable names

svn: r9508
This commit is contained in:
Greg Cooper 2008-04-28 03:55:02 +00:00
parent 12a1526e1f
commit 632f4df567

View File

@ -1090,8 +1090,16 @@
(send variables-text delete 0 (send variables-text last-position)) (send variables-text delete 0 (send variables-text last-position))
(for-each (for-each
(lambda (name/value) (lambda (name/value)
(send variables-text insert (let ([name (format "~a" (syntax-e (first name/value)))]
(format "~a => ~a~n" (syntax-e (first name/value)) (second name/value)))) [value (format " => ~a~n" (second name/value))])
(send variables-text insert name)
(send variables-text change-style bold-sd
(- (send variables-text last-position) (string-length name))
(send variables-text last-position))
(send variables-text insert value)
(send variables-text change-style normal-sd
(- (send variables-text last-position) (string-length value))
(send variables-text last-position))))
(third (expose-mark frame))) (third (expose-mark frame)))
(send variables-text lock #t) (send variables-text lock #t)
(send variables-text end-edit-sequence)) (send variables-text end-edit-sequence))
@ -1123,6 +1131,9 @@
(lambda (trimmed-expr) (lambda (trimmed-expr)
(send stack-frames insert (format "~a~n" trimmed-expr))) (send stack-frames insert (format "~a~n" trimmed-expr)))
trimmed-exprs) trimmed-exprs)
(send stack-frames change-style bold-sd
(send stack-frames line-start-position (send (get-current-tab) get-frame-num))
(send stack-frames line-end-position (send (get-current-tab) get-frame-num)))
(send stack-frames lock #t) (send stack-frames lock #t)
(send stack-frames end-edit-sequence))) (send stack-frames end-edit-sequence)))
@ -1141,8 +1152,7 @@
(define variables-text 'uninitialized-variables-text) (define variables-text 'uninitialized-variables-text)
(define highlight-color (make-object color% 207 255 207)) (define highlight-color (make-object color% 207 255 207))
(define bold-sd (make-object style-delta% 'change-weight 'bold)) (define bold-sd (make-object style-delta% 'change-weight 'bold))
(define fixed-width-sd (make-object style-delta% 'change-family 'modern)) (define normal-sd (make-object style-delta% 'change-weight 'normal))
(send bold-sd set-weight-on 'bold)
(define mouse-over-frame #f) (define mouse-over-frame #f)
(define/override (get-definitions/interactions-panel-parent) (define/override (get-definitions/interactions-panel-parent)
(set! debug-grandparent-panel (set! debug-grandparent-panel
@ -1176,10 +1186,7 @@
;; motion to different frame: unhighlight old ;; motion to different frame: unhighlight old
(send highlight-defs unhighlight-range (send highlight-defs unhighlight-range
highlight-start highlight-end highlight-color) highlight-start highlight-end highlight-color)
(set! mouse-over-frame #f) (set! mouse-over-frame #f))
(set! highlight-defs #f)
(set! highlight-start #f)
(set! highlight-end #f))
(when (and expr (not (eq? mouse-over-frame line))) (when (and expr (not (eq? mouse-over-frame line)))
;; motion to frame: highlight new ;; motion to frame: highlight new
(cond (cond
@ -1204,23 +1211,13 @@
;; motion to different frame: unhighlight old ;; motion to different frame: unhighlight old
(send highlight-defs unhighlight-range (send highlight-defs unhighlight-range
highlight-start highlight-end highlight-color) highlight-start highlight-end highlight-color)
(set! mouse-over-frame #f) (set! mouse-over-frame #f))
(set! highlight-defs #f)
(set! highlight-start #f)
(set! highlight-end #f))
(cond (cond
[(send (get-current-tab) get-frame-num) [(send (get-current-tab) get-frame-num)
=> (lambda (num) => (lambda (num)
(send (get-current-tab) move-to-frame num))])] (send (get-current-tab) move-to-frame num))])]
[(left-down) [(left-down)
(when (and line expr) (when (and line expr)
(begin-edit-sequence)
(lock #f)
(change-style fixed-width-sd 0 (last-position)
;(line-start-position line)
#;(line-end-position line))
(lock #t)
(end-edit-sequence)
(send (get-current-tab) move-to-frame line))] (send (get-current-tab) move-to-frame line))]
[else (void)])))))) [else (void)]))))))
(set! variables-text (new text% [auto-wrap #t])) (set! variables-text (new text% [auto-wrap #t]))