home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gwm18a.zip / data / simple-win-old.gwm < prev    next >
Text File  |  1995-07-03  |  2KB  |  71 lines

  1. ; SIMPLEST DECORATION
  2. ; ===================
  3.  
  4. ;;File: simple-win.gwm -- simple window decoration
  5. ;;Author: colas@mirsa.inria.fr (Colas NAHABOO) -- Bull Research FRANCE
  6. ;;Revision: 1.4 -- June 12 1989
  7. ;;State: Exp
  8. ;;GWM Version: 1.4
  9.  
  10. (defaults-to
  11.   simple-win.font name-font
  12.   simple-win.inactive grey
  13.   simple-win.active darkgrey
  14.   simple-win.label.background white
  15.   simple-win.label.foreground black
  16. )
  17.  
  18. (if (not (boundp 'simple-win.titlebar-fsm))
  19.   (progn
  20.     (if no-set-focus
  21.     (: simple-win.titlebar-fsm
  22.        (fsm-make
  23.            (state-make
  24.            (on (user-event 'focus-in)
  25.                (wob-background simple-win.active))
  26.            (on (user-event 'focus-out)
  27.                (wob-background simple-win.inactive))
  28.            standard-title-behavior)))
  29.     (: simple-win.titlebar-fsm 
  30.        (fsm-make
  31.            (state-make
  32.            (on enter-window (set-focus window))
  33.            (on leave-window  (set-focus ()))
  34.            (on (user-event 'focus-in)
  35.                (wob-background simple-win.active))
  36.            (on (user-event 'focus-out)
  37.                (wob-background simple-win.inactive))
  38.            standard-title-behavior))))
  39.     
  40.     (: simple-win.label-fsm
  41.        (fsm-make
  42.        (state-make
  43.            (on (user-event 'name-change)
  44.            (with (font simple-win.font
  45.                    background simple-win.label.background
  46.                    foreground simple-win.label.foreground)
  47.              (wob-tile (label-make (window-name)))))
  48.            standard-title-behavior)))
  49.   )
  50. )
  51.  
  52. (: simple-win.data
  53.    (with (fsm window-fsm grabs window-grabs)
  54.      (window-make     
  55.       '(with (borderwidth 1 background simple-win.inactive 
  56.                   fsm simple-win.titlebar-fsm
  57.                   bar-min-width 4 bar-max-width 22)
  58.          (bar-make () 
  59.                '(with (fsm simple-win.label-fsm 
  60.                        background simple-win.label.background
  61.                        foreground simple-win.label.foreground)
  62.                   (plug-make 
  63.                    (label-make  window-name
  64.                         simple-win.font)))
  65.                ()))
  66.       () () () ()))))))
  67.  
  68. (defname 'simple-win.data screen. simple-win.data)
  69.  
  70. (df simple-win () simple-win.data)
  71.