tests/project-26959.ss
#lang scheme/gui

;;==========================================================================
;;===                Code generated with MrEd Designer 3.6               ===
;;===                 http://mred-designer.origo.ethz.ch                 ===
;;==========================================================================

;;; Call (project-26959-init) with optional arguments to this module

(require
 framework
 )

(provide project-26959-init
         frame-26969
         dialog-27001
         message-27033
         button-27038
         slider-27043
         gauge-27048
         check-box-27053)

(define (label-bitmap-proc l)
  (let ((label (first l))
        (image? (second l))
        (file (third l)))
    (or (and image?
             (or (and file
                      (let ((bmp
                             (make-object bitmap%
                               file)))
                        (and (send bmp ok?) bmp)))
                 "<Bad Image>"))
        label)))

(define (list->font l)
  (with-handlers
   ((exn:fail?
     (λ (e)
       (send/apply
        the-font-list
        find-or-create-font
        (cons (first l) (rest (rest l)))))))
   (send/apply the-font-list find-or-create-font l)))

(define frame-26969 #f)
(define dialog-27001 #f)
(define message-27033 #f)
(define button-27038 #f)
(define slider-27043 #f)
(define gauge-27048 #f)
(define check-box-27053 #f)
(define (project-26959-init
         #:button-27038-callback
         (button-27038-callback
          (lambda (button control-event) (void)))
         #:slider-27043-callback
         (slider-27043-callback
          (λ (slider control-event) (void)))
         #:check-box-27053-callback
         (check-box-27053-callback
          (lambda (button control-event) (void))))
  (set! frame-26969
    (new
     frame%
     (parent #f)
     (label "Frame")
     (width #f)
     (height #f)
     (x 200)
     (y 200)
     (style '())
     (enabled #t)
     (border 0)
     (spacing 0)
     (alignment (list 'center 'top))
     (min-width 200)
     (min-height 100)
     (stretchable-width #t)
     (stretchable-height #t)))
  (set! dialog-27001
    (new
     dialog%
     (parent frame-26969)
     (label "Dialog")
     (width #f)
     (height #f)
     (x #f)
     (y #f)
     (style '())
     (enabled #t)
     (border 0)
     (spacing 0)
     (alignment (list 'center 'top))
     (min-width 70)
     (min-height 30)
     (stretchable-width #t)
     (stretchable-height #t)))
  (set! message-27033
    (new
     message%
     (parent dialog-27001)
     (label
      (label-bitmap-proc (list "Message" #f #f)))
     (style '())
     (font
      (list->font
       (list
        8
        'default
        'normal
        'normal
        #f
        'default
        #f)))
     (enabled #t)
     (vert-margin 2)
     (horiz-margin 2)
     (min-width 0)
     (min-height 0)
     (stretchable-width #f)
     (stretchable-height #f)
     (auto-resize #f)))
  (set! button-27038
    (new
     button%
     (parent dialog-27001)
     (label (label-bitmap-proc (list "Button" #f #f)))
     (callback button-27038-callback)
     (style '())
     (font
      (list->font
       (list
        8
        'default
        'normal
        'normal
        #f
        'default
        #f)))
     (enabled #t)
     (vert-margin 2)
     (horiz-margin 2)
     (min-width 0)
     (min-height 0)
     (stretchable-width #f)
     (stretchable-height #f)))
  (set! slider-27043
    (new
     slider%
     (parent dialog-27001)
     (label "Slider")
     (min-value 0)
     (max-value 100)
     (init-value 0)
     (callback slider-27043-callback)
     (style
      ((λ (l) (list* (first l) (second l) (third l)))
       (list 'horizontal 'horizontal-label '())))
     (font
      (list->font
       (list
        8
        'default
        'normal
        'normal
        #f
        'default
        #f)))
     (enabled #t)
     (vert-margin 2)
     (horiz-margin 2)
     (min-width 0)
     (min-height 0)
     (stretchable-width #f)
     (stretchable-height #f)))
  (set! gauge-27048
    (new
     gauge%
     (parent dialog-27001)
     (label "Gauge")
     (range 100)
     (style
      ((λ (l) (list* (first l) (second l) (third l)))
       (list 'horizontal 'horizontal-label '())))
     (font
      (list->font
       (list
        8
        'default
        'normal
        'normal
        #f
        'default
        #f)))
     (enabled #t)
     (vert-margin 2)
     (horiz-margin 2)
     (min-width 0)
     (min-height 0)
     (stretchable-width #f)
     (stretchable-height #f)))
  (set! check-box-27053
    (new
     check-box%
     (parent dialog-27001)
     (label
      (label-bitmap-proc (list "Ckeck Box" #f #f)))
     (callback check-box-27053-callback)
     (style '())
     (value #t)
     (font
      (list->font
       (list
        8
        'default
        'normal
        'normal
        #f
        'default
        #f)))
     (enabled #t)
     (vert-margin 2)
     (horiz-margin 2)
     (min-width 0)
     (min-height 0)
     (stretchable-width #f)
     (stretchable-height #f)))
  (send frame-26969 show #t)
  (send dialog-27001 show #t))