home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / motif / 5604 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.6 KB

  1. Path: sparky!uunet!wupost!usc!sdd.hp.com!swrinde!ctcvax.ccf.swri.edu!trident!johns
  2. From: johns@trident.datasys.swri.edu (Stephen Johns)
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Resize info from MWM to client
  5. Keywords: resize protocol
  6. Message-ID: <117@io.trident.datasys.swri.edu>
  7. Date: 13 Aug 92 22:32:34 GMT
  8. Organization: Southwest Research Institute, San Antonio, Texas
  9. Lines: 44
  10.  
  11. What is the "proper" way to handle resize events under Motif?
  12. I have a main window which contains a form which contains a drawing area
  13. and some other stuff.  Conceptually like:
  14.  
  15. main window {
  16.   form {
  17.     drawing area
  18.     scroll bar
  19.     scroll bar
  20.     label
  21.     label
  22.     etc.
  23.   }
  24. }
  25.  
  26. When the window is resized with the mouse I want to expand the drawing area
  27. and rearrange the other widgets.  What is the proper way to detect the resize
  28. and what is the proper way to resize the drawing area.
  29.  
  30. I tried using and event handler, and that worked ok, but when I would use
  31. XtSetValues to resize the drawing area, that would generate another resize
  32. event... ad nauseum.
  33.  
  34. Now I am trying the following, but it is not detecting any resize at all, should
  35. this work?
  36.  
  37.  
  38.     Atom
  39.         WM_RESIZE_WINDOW_ATOM;    /*    A protocol atom for the window manager
  40.                                  *    resize.
  41.                                  */
  42. /*
  43.  *    Add the callback to handle the resize information from the window manager.
  44.  */
  45.  
  46.     WM_RESIZE_WINDOW_ATOM = XmInternAtom ( XtDisplay ( Map_table[a].shell ),
  47.                                            "MW_RESIZE_WINDOW", FALSE );
  48.     XmAddWMProtocolCallback ( Map_table[a].shell, WM_RESIZE_WINDOW_ATOM,
  49.                               resize_map_cb, NULL );
  50.  
  51. Any help greatly appreciated.
  52. -- 
  53. Stephen Johns, Research Analyst
  54. Southwest Research Institute, SA, TX 78228 (512) 522-5751
  55.