added ability to put the definitions / interactions side by side

svn: r6939
This commit is contained in:
Robby Findler 2007-07-20 20:58:14 +00:00
parent 6f00ea32a8
commit 2ad94edfe7
3 changed files with 27 additions and 18 deletions

View File

@ -57,6 +57,7 @@
(finder:default-filters))) (finder:default-filters)))
(application:current-app-name (string-constant drscheme)) (application:current-app-name (string-constant drscheme))
(preferences:set-default 'drscheme:defs/ints-horizontal #f boolean?)
(preferences:set-default 'drscheme:unit-window-max? #f boolean?) (preferences:set-default 'drscheme:unit-window-max? #f boolean?)
(preferences:set-default 'drscheme:frame:initial-position #f (preferences:set-default 'drscheme:frame:initial-position #f
(λ (x) (or (not x) (λ (x) (or (not x)
@ -215,7 +216,9 @@
(string-constant switch-to-module-language-automatically) (string-constant switch-to-module-language-automatically)
editor-panel) editor-panel)
(make-check-box 'drscheme:defs/ints-horizontal
(string-constant interactions-beside-definitions)
editor-panel)
;; come back to this one. ;; come back to this one.
#; #;
(letrec ([hp (new horizontal-panel% (letrec ([hp (new horizontal-panel%

View File

@ -959,19 +959,22 @@ module browser threading seems wrong.
(define vertical-dragable/def-int% (define dragable/def-int-mixin
(class panel:vertical-dragable% (mixin (panel:dragable<%>) ()
(init-field unit-frame) (init-field unit-frame)
(inherit get-percentages) (inherit get-percentages)
(define/augment (after-percentage-change) (define/augment (after-percentage-change)
(let ([percentages (get-percentages)]) (let ([percentages (get-percentages)])
(when (and (= 1 (when (and (= 1
(length (send unit-frame get-definitions-canvases)) (length (send unit-frame get-definitions-canvases))
(length (send unit-frame get-interactions-canvases))) (length (send unit-frame get-interactions-canvases)))
(= 2 (length percentages))) (= 2 (length percentages)))
(preferences:set 'drscheme:unit-window-size-percentage (car percentages)))) (preferences:set 'drscheme:unit-window-size-percentage (car percentages))))
(inner (void) after-percentage-change)) (inner (void) after-percentage-change))
(super-new))) (super-new)))
(define vertical-dragable/def-int% (dragable/def-int-mixin panel:vertical-dragable%))
(define horizontal-dragable/def-int% (dragable/def-int-mixin panel:horizontal-dragable%))
(define super-frame% (define super-frame%
(drscheme:frame:mixin (drscheme:frame:mixin
@ -3170,9 +3173,11 @@ module browser threading seems wrong.
(let ([sel (send tabs-panel get-selection)]) (let ([sel (send tabs-panel get-selection)])
(when sel (when sel
(change-to-nth-tab sel))))))) (change-to-nth-tab sel)))))))
[define resizable-panel (new vertical-dragable/def-int% [define resizable-panel (new (if (preferences:get 'drscheme:defs/ints-horizontal)
(unit-frame this) horizontal-dragable/def-int%
(parent panel-with-tabs))] vertical-dragable/def-int%)
(unit-frame this)
(parent panel-with-tabs))]
[define definitions-canvas #f] [define definitions-canvas #f]
(initialize-definitions-canvas) (initialize-definitions-canvas)

View File

@ -417,6 +417,7 @@ please adhere to these guidelines:
(open-files-in-tabs "Open files in separate tabs (not separate windows)") (open-files-in-tabs "Open files in separate tabs (not separate windows)")
(show-interactions-on-execute "Automatically open interactions window when running a program") (show-interactions-on-execute "Automatically open interactions window when running a program")
(switch-to-module-language-automatically "Automatically switch to the module language when opening a module") (switch-to-module-language-automatically "Automatically switch to the module language when opening a module")
(interactions-beside-definitions "Put the interactions window beside the definitions window") ;; in preferences, below the checkbox one line above this one
(limit-interactions-size "Limit interactions size") (limit-interactions-size "Limit interactions size")
(background-color "Background Color") (background-color "Background Color")
(default-text-color "Default text") ;; used for configuring colors, but doesn't need the word "color" (default-text-color "Default text") ;; used for configuring colors, but doesn't need the word "color"