[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Bill Schottstaedt
Subject: guile+motif
Date: Tue, 17 Jul 2001 04:04:46 -0700

I can't resist posting this, though it's not really ready yet.
Here's a (working!) guile script using the X/Xt/Xpm/Xm module I mentioned
earlier (using "|" as the prefix arg, but that's just a macro):


(let* ((shell-app (|XtVaOpenApplication
                    "Test" 0 0 0 0 0 |applicationShellWidgetClass
                    (list |XmNallowShellResize #t)))
       (app (cadr shell-app))
       (shell (car shell-app))
       (black (|BlackPixelOfScreen
                  (|XtDisplay shell)))))
  (if (not (|XtIsApplicationShell shell))
      (display "not appshell"?))
  (|XtSetValues shell (list |XmNtitle "Hi!") 1)
  (let* ((main-pane
            "main-pane" |xmFormWidgetClass shell
            (list |XmNforeground       black
                  |XmNtopAttachment    |XmATTACH_FORM
                  |XmNbottomAttachment |XmATTACH_FORM
                  |XmNleftAttachment   |XmATTACH_FORM
                  |XmNrightAttachment  |XmATTACH_FORM
                  |XmNallowResize      #t)))
         (button (|XtCreateManagedWidget
                   "push me" |xmPushButtonWidgetClass main-pane '() 0)))
    (|XtAddCallback button |XmNactivateCallback
                    (lambda (widget context event-info)
                      (display widget)
                      (display (|reason event-info))
                      (display context))
    (|XtRealizeWidget shell)
    (|XtAppMainLoop app)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]