(module tool mzscheme
(define oi (current-inspector))
(current-inspector (make-inspector))
(require (lib "framework.ss" "framework")
(lib "mred.ss" "mred")
(lib "class.ss")
"diva-panel.ss"
"diva-link.ss"
"mred-callback.ss"
"diva-central.ss"
"diva-file-menu.ss"
"gui/text-rope-mixin.ss"
(prefix language: "language.ss")
(prefix preferences: "diva-preferences.ss")
(prefix marker: "marker.ss")
"tag-gui.ss"
(lib "unit.ss")
(lib "tool.ss" "drscheme"))
(current-inspector oi)
(print-struct #t)
(provide tool@)
(define-unit tool@
(import drscheme:tool^)
(export drscheme:tool-exports^)
(define shared-diva-central (new diva-central%))
(define (phase1)
(language:initialize-get-language
drscheme:language-configuration:get-settings-preferences-symbol
drscheme:language-configuration:language-settings-language
drscheme:language:capability-registered?)
(let ([diva-central-mixin (make-diva-central-mixin shared-diva-central)])
(define (diva-frame-mixin super%)
(diva-link:frame-mixin
(diva-panel:frame-mixin
(tag-gui-unit:frame-mixin
(diva:menu-option-frame-mixin
(diva-central-mixin super%))))))
(define (diva-definitions-canvas-mixin super%)
(diva-central-mixin super%))
(define (diva-definitions-text-mixin super%)
(diva-link:text-mixin
(voice-mred-text-callback-mixin
(marker:marker-mixin
(diva-central-mixin
(text-rope-mixin super%))))))
(define (diva-interactions-text-mixin super%)
(diva-link:interactions-text-mixin
(diva-link:text-mixin
(voice-mred-interactions-text-callback-mixin
(marker:marker-mixin
(diva-central-mixin
(text-rope-mixin super%)))))))
(drscheme:get/extend:extend-unit-frame diva-frame-mixin)
(drscheme:get/extend:extend-definitions-canvas diva-definitions-canvas-mixin)
(drscheme:get/extend:extend-definitions-text diva-definitions-text-mixin)
(drscheme:get/extend:extend-interactions-text diva-interactions-text-mixin)
(preferences:install-diva-central-handler shared-diva-central)
(preferences:add-preference-panel shared-diva-central)))
(define (phase2)
(queue-callback
(lambda ()
(when (preferences:enable-on-startup?)
(send shared-diva-central switch-on)))
#f))))