+ (const :tag "small" small)))
+
+;; private variables
+(defvar progress-text-instantiator [string :data ""])
+(defvar progress-layout-glyph (make-glyph))
+(defvar progress-layout-instantiator nil)
+
+(defvar progress-gauge-instantiator
+ [progress-gauge
+ :value 0
+ :pixel-height (eval progress-glyph-height)
+ :pixel-width 250
+ :descriptor "Progress"])
+
+(defun set-progress-feedback-instantiator (&optional locale)
+ (cond
+ ((eq progress-feedback-style 'small)
+ (setq progress-glyph-height 16)
+ (setq progress-layout-instantiator
+ `[layout
+ :orientation vertical :margin-width 4
+ :horizontally-justify left :vertically-justify center
+ :items (,progress-gauge-instantiator
+ [button
+ :pixel-height (eval progress-glyph-height)
+ ;; 'quit is special and acts "asynchronously".
+ :descriptor "Stop" :callback 'quit]
+ ,progress-text-instantiator)])
+ (set-glyph-image progress-layout-glyph progress-layout-instantiator
+ locale))
+ (t
+ (setq progress-glyph-height 24)
+ (setq progress-layout-instantiator
+ `[layout
+ :orientation vertical :margin-width 4
+ :horizontally-justify left :vertically-justify center
+ :items (,progress-text-instantiator
+ [layout
+ :orientation horizontal
+ :items (,progress-gauge-instantiator
+ [button
+ :pixel-height (eval progress-glyph-height)
+ :descriptor " Stop "
+ ;; 'quit is special and acts "asynchronously".
+ :callback 'quit])])])
+ (set-glyph-image progress-layout-glyph progress-layout-instantiator
+ locale))))
+
+(defvar progress-abort-glyph (make-glyph))
+
+(defun set-progress-abort-instantiator (&optional locale)
+ (set-glyph-image progress-abort-glyph
+ `[layout :orientation vertical
+ :horizontally-justify left :vertically-justify center
+ :items (,progress-text-instantiator
+ [layout
+ :margin-width 4
+ :pixel-height progress-glyph-height
+ :orientation horizontal])]
+ locale))