Skip to content

Instantly share code, notes, and snippets.

@martindemello
Last active October 14, 2015 07:49
Show Gist options
  • Save martindemello/2f8ba4ccfebed3bd4650 to your computer and use it in GitHub Desktop.
Save martindemello/2f8ba4ccfebed3bd4650 to your computer and use it in GitHub Desktop.
iup cells example
(use iup)
(define (nlines self) 8)
(define (ncols self) 8)
(define (height self line) 50)
(define (width self col) 50)
(define (draw self i j xmin xmax ymin ymax canvas) 'default)
(define dlg
(dialog
(vbox
(cells name: "Chessboard"
height-cb: height
width-cb: width
nlines-cb: nlines
ncols-cb: ncols
draw-cb: draw)
(button title: 'E&xit
expand: 'Yes
tip: "Close button"
action: (lambda (self) 'close)))
title: 'IUP))
(show dlg)
(main-loop)
(destroy! dlg)
(exit 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment