LJ Archive

Listing 1. Motif “Hello World” Source

#! /usr/dt/bin/dtksh
  main()
  {
    XtInitialize TOPLEVEL dtHello DtHello "$@"

    XmCreateMessageDialog HELLO $TOPLEVEL hello \
            dialogTitle:"DtHello" \
            messageString:\
      "$(print "Hello\nWorld")"
    XmMessageBoxGetChild HELP $HELLO\
   DIALOG_HELP_BUTTON
    XtUnmanageChild $HELP
    XmMessageBoxGetChild CANCEL $HELLO\<\n>
   DIALOG_CANCEL_BUTTON
    XtUnmanageChild $CANCEL
    XtAddCallback $HELLO okCallback exit
    XtManageChild $HELLO
    XtMainLoop
   }
LJ Archive