home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / 18672 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.4 KB

  1. Path: sparky!uunet!gatech!destroyer!gumby!yale!yale.edu!spool.mu.edu!olivea!sgigate!odin!gizmo.wpd.sgi.com!dyoung
  2. From: dyoung@gizmo.wpd.sgi.com (Doug Young)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re:  motif and pipes
  5. Message-ID: <1993Jan11.174719.14183@odin.corp.sgi.com>
  6. Date: 11 Jan 93 17:47:19 GMT
  7. References: <34849@adm.brl.mil>
  8. Sender: news@odin.corp.sgi.com (Net News)
  9. Reply-To: dyoung@1.com
  10. Organization: Silicon Graphics, Inc.
  11. Lines: 32
  12. Nntp-Posting-Host: gizmo.wpd.sgi.com
  13.  
  14. In article <34849@adm.brl.mil>, beyer@bflsgu.fl.bs.dlr.de (Ralf Beyer DLR) writes:
  15. |> 
  16. |>     1. How do I attach a callback functon to the close button of a 
  17. |>        dialog win?
  18. |>     
  19. |>            ie XtAddCallback (dialog, XmN..., myfunction, NULL)
  20. |>     
  21. |>        what goes in the ...?
  22. |> 
  23. |> XmNactivateCallback
  24.  
  25.  
  26. No, if you are adding a callback to a button directly, you can use
  27. XmNactivateCallback.  But when adding a callback to a dialog, motif dialogs
  28. support XmokCallback, XmNcancelCallback, etc.  However, if you are asking
  29. about the window manager close button on the dialog's window manager frame,
  30. that's different. For that, you need to use something like the following:
  31.  
  32.         Atom WM_DELETE_WINDOW = XInternAtom( XtDisplay(dialogshell),
  33.                         "WM_DELETE_WINDOW", 
  34.                         FALSE);
  35.  
  36.     XmAddWMProtocolCallback( dialogshell, WM_DELETE_WINDOW,
  37.                 &VkSimpleWindow::deleteWindowCallback, 
  38.                 NULL);
  39.  
  40.     XtVaSetValues( dialogshell, 
  41.               XmNdeleteResponse, XmDO_NOTHING, 
  42.               NULL);
  43.  
  44.  
  45. Doug Young
  46.