(module trace-control mzscheme
(require (lib "contract.ss")
(lib "class.ss")
(lib "mred.ss" "mred")
"interfaces.ss"
"message-mixins.ss"
"filter-frame.ss"
"../model/view.ss"
)
(provide/contract
[trace-control% (class/c panel% updatee<%>)])
(define trace-control%
(class* vertical-panel% (updatee<%>)
(super-new [stretchable-height #f])
(init-field trace-display)
(public on-update)
(private get-view)
(define filter-frame
(new filter-frame%
[buffer (view-buffer (get-view))]
[trace-display trace-display]))
(define update-button
(new button%
[parent this]
[label "Update"]
[callback
(lambda (b e) (send trace-display do-update))]))
(define filter-button
(new button%
[parent this]
[label "Filter"]
[callback
(lambda (b e)
(send filter-frame on-update)
(send filter-frame show #t))]))
(define (get-view)
(send trace-display get-view))
(define (on-update)
(void))
))
)