diff --git a/collects/framework/splash.rkt b/collects/framework/splash.rkt index 8e32f96b..42bd7717 100644 --- a/collects/framework/splash.rkt +++ b/collects/framework/splash.rkt @@ -138,7 +138,9 @@ (set! icons (cons (make-icon bm x y) icons)) (refresh-splash)) -(define (start-splash splash-draw-spec _splash-title width-default #:allow-funny? [allow-funny? #f]) +(define (start-splash splash-draw-spec _splash-title width-default + #:allow-funny? [allow-funny? #f] + #:frame-icon [frame-icon #f]) (unless allow-funny? (set! funny? #f)) (set! splash-title _splash-title) (set! splash-max-width (max 1 (splash-get-preference (get-splash-width-preference-name) width-default))) @@ -152,6 +154,16 @@ (on-splash-eventspace/ret (send (get-gauge) set-range splash-max-width) (send splash-tlw set-label splash-title) + + #; ;; commented out because dialogs don't accept set-icon + (when frame-icon + (if (pair? frame-icon) + (let ([small (car icon)] + [large (cdr icon)]) + (send splash-tlw set-icon small (send small get-loaded-mask) 'small) + (send splash-tlw set-icon large (send large get-loaded-mask) 'large)) + (send splash-tlw set-icon frame-icon (send icon get-loaded-mask) 'both))) + (cond [(or (path? splash-draw-spec) (string? splash-draw-spec)) diff --git a/collects/scribblings/framework/splash.scrbl b/collects/scribblings/framework/splash.scrbl index 9919cdb1..1ea70d8b 100644 --- a/collects/scribblings/framework/splash.scrbl +++ b/collects/scribblings/framework/splash.scrbl @@ -24,7 +24,14 @@ that number to control the gauge along the bottom of the splash screen. exact-nonnegative-integer?))] [splash-title string?] [width-default exact-nonnegative-integer?] - [#:allow-funny? allow-funny? boolean? #f]) + [#:allow-funny? allow-funny? boolean? #f] + [#:frame-icon + frame-icon + (or/c #f + (is-a?/c bitmap%) + (cons/c (is-a?/c bitmap%) + (is-a?/c bitmap%))) + #f]) void?]{ Starts a new splash screen. The splash screen is created in its own, new @tech[#:doc '(lib "scribblings/gui/gui.scrbl") #:key "eventspace"]{eventspace}. @@ -51,8 +58,11 @@ that number to control the gauge along the bottom of the splash screen. of the area to draw. The @racket[allow-funny?] argument determines if a special gauge is used on Christmas day. - - } + + The @racket[frame-icon] is used just like the value of the parameter @racket[frame:current-icon] is used, + but for the splash screen. +} + @defproc[(shutdown-splash) void?]{ Stops the splash window's gauge from advancing. Call this after all of the files have been loaded. }