guile-pstk

A Tk interface for Guile (A fork of (and hopefully a future merge?) https://github.com/kikyTokamuro/guile-pstk/).
Log | Files | Refs | README | LICENSE

hello.scm (672B)


      1 ; PS/Tk Example Program "Hello World"
      2 ; Copyright (C) 2021-2022 Daniil Archangelsky aka Kiky Tokamuro
      3 ; Copyright (C) 2006 Nils M Holm
      4 ; See the PS/Tk license for conditions of use.
      5 
      6 (add-to-load-path
      7  (string-append
      8   (dirname (current-filename))
      9   "/../"))
     10 
     11 (use-modules (pstk))
     12 
     13 (tk-start)
     14 (let* ((label (tk 'create-widget 'label
     15                   'width: 20
     16 		  'height: 5
     17                   'text: "Hello, World!"
     18                   'font: "Helvetica 20"
     19                   'fg: "#ff0000"))
     20        (bt-quit (tk 'create-widget 'button
     21                     'text: "Goodbye"
     22                     'command: (lambda () (tk-end)))))
     23   (tk/pack label bt-quit)
     24   (tk-event-loop))