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

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

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

(require
 framework
 )

(provide project-15670-init frame-15681)

(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 'unknown/mask)))
                        (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-15681 #f)
(define button-15713 #f)
(define (project-15670-init
         #:button-15713-callback
         (button-15713-callback
          (lambda (button control-event) (void))))
  (set! frame-15681
    (new
     frame%
     (parent #f)
     (label "Frame")
     (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! button-15713
    (new
     button%
     (parent frame-15681)
     (label
      (label-bitmap-proc
       (list
        "Button"
        #t
        "/media/Divers/Projets/Scheme/mred-designer/images/dots.png")))
     (callback button-15713-callback)
     (style '())
     (font
      (list->font
       (list
        8
        #f
        '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-15681 show #t))