31 Splash
(require framework/splash) | package: gui-lib |
This module helps support applications with splash screens like the one in DrRacket.
When this module is invoked, it sets the current-load parameter to a procedure that counts how many files are loaded (until shutdown-splash is called) and uses that number to control the gauge along the bottom of the splash screen.
procedure
(start-splash draw-spec splash-title width-default [ #:allow-funny? allow-funny? #:frame-icon frame-icon]) → void? splash-title : string? width-default : exact-nonnegative-integer? allow-funny? : boolean? = #f
frame-icon :
(or/c #f (is-a?/c bitmap%) (cons/c (is-a?/c bitmap%) (is-a?/c bitmap%))) = #f
(string->symbol (format "plt:~a-splash-max-width" splash-title))
If the draw-spec is a path-string?, then the path is expected to be a file that contains a bitmap that is drawn as the contents of the splash screen. If it is a bitmap, then that bitmap is used directly. If draw-spec is a vector, then the vector’s first element is a procedure that is called to draw the splash screen and the other two integers are the size of the splash screen, width followed by height. If the procedure accepts only one argument, then it is called with a dc<%> object where the drawing should occur. If it accepts 5 arguments, it is called with the dc<%>, as well as (in order) the current value of the gauge, the maximum value of the gauge, and the width and the height of the area to draw.
The allow-funny? argument determines if a special gauge is used on Christmas day.
The frame-icon is used just like the value of the parameter frame:current-icon is used, but for the splash screen.
procedure
(shutdown-splash) → void?
procedure
(close-splash) → void?
procedure
(add-splash-icon bmp x y) → void?
bmp : (is-a?/c bitmap%) x : exact-nonnegative-integer? y : exact-nonnegative-integer?
procedure
(get-splash-bitmap) → (or/c #f (is-a?/c bitmap%))
procedure
(set-splash-bitmap bmp) → void?
bmp : (is-a?/c bitmap%)
procedure
(get-splash-canvas) → (is-a?/c canvas%)
procedure
procedure
(get-splash-paint-callback) →
(-> (is-a?/c dc<%>) exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer? void?)
procedure
(set-splash-paint-callback cb) → void?
cb :
(-> (is-a?/c dc<%>) exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer? exact-nonnegative-integer? void?)
procedure
b : boolean?
procedure
(set-splash-char-observer obs) → void?
obs : (-> (is-a?/c key-event%) any)
procedure
(set-splash-event-callback obj) → void?
obj : (-> (is-?/c mouse-event%) any)
procedure
(get-splash-event-callback) → (-> (is-?/c mouse-event%) any)
procedure
proc :
(-> exact-nonnegative-integer? exact-nonnegative-integer? any)
procedure
procedure
procedure
(refresh-splash) → void?