;;;;
;;;; checkbutton.stk            -- GTklos Checkbutton Demo
;;;;
;;;; Copyright © 2001-2021 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;;; GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
;;;;
;;;;           Author: Erick Gallesio [eg@unice.fr]
;;;;    Creation date: 25-Jul-2001 21:29 (eg)
;;;;
(include "demos-utils.stk")

(define demo-message "
Checkbuttons Demo

This is a demo showing a check button.
Nothing special here.
")


(define (show-value w ev)
  (printf "Check button valueof ~S => ~S\n" w (value w)))


(define (main args)
  (let* ((win (make <demo-window> #:title "Check Button Demo" #:x 100 #:y 100
                    #:border-width 10 #:file "checkbutton" :width 400
                    #:message demo-message))
         (b1  (make <check-button>
                 #:parent win
                 #:text "First check button"
                 #:value #t
                 #:border-width 20
                 #:command show-value))
         (b2  (make <check-button>
                #:parent win
                #:text "Second check button"
                #:value #f
                #:border-width 20
                #:command show-value)))
    (gtk-main)
    0))
