home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!spool.mu.edu!olivea!sgigate!odin!gizmo.wpd.sgi.com!dyoung
- From: dyoung@gizmo.wpd.sgi.com (Doug Young)
- Newsgroups: comp.sys.sgi
- Subject: Re: motif and pipes
- Message-ID: <1993Jan11.174719.14183@odin.corp.sgi.com>
- Date: 11 Jan 93 17:47:19 GMT
- References: <34849@adm.brl.mil>
- Sender: news@odin.corp.sgi.com (Net News)
- Reply-To: dyoung@1.com
- Organization: Silicon Graphics, Inc.
- Lines: 32
- Nntp-Posting-Host: gizmo.wpd.sgi.com
-
- In article <34849@adm.brl.mil>, beyer@bflsgu.fl.bs.dlr.de (Ralf Beyer DLR) writes:
- |>
- |> 1. How do I attach a callback functon to the close button of a
- |> dialog win?
- |>
- |> ie XtAddCallback (dialog, XmN..., myfunction, NULL)
- |>
- |> what goes in the ...?
- |>
- |> XmNactivateCallback
-
-
- No, if you are adding a callback to a button directly, you can use
- XmNactivateCallback. But when adding a callback to a dialog, motif dialogs
- support XmokCallback, XmNcancelCallback, etc. However, if you are asking
- about the window manager close button on the dialog's window manager frame,
- that's different. For that, you need to use something like the following:
-
- Atom WM_DELETE_WINDOW = XInternAtom( XtDisplay(dialogshell),
- "WM_DELETE_WINDOW",
- FALSE);
-
- XmAddWMProtocolCallback( dialogshell, WM_DELETE_WINDOW,
- &VkSimpleWindow::deleteWindowCallback,
- NULL);
-
- XtVaSetValues( dialogshell,
- XmNdeleteResponse, XmDO_NOTHING,
- NULL);
-
-
- Doug Young
-