home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!usc!sdd.hp.com!swrinde!ctcvax.ccf.swri.edu!trident!johns
- From: johns@trident.datasys.swri.edu (Stephen Johns)
- Newsgroups: comp.windows.x.motif
- Subject: Resize info from MWM to client
- Keywords: resize protocol
- Message-ID: <117@io.trident.datasys.swri.edu>
- Date: 13 Aug 92 22:32:34 GMT
- Organization: Southwest Research Institute, San Antonio, Texas
- Lines: 44
-
- What is the "proper" way to handle resize events under Motif?
- I have a main window which contains a form which contains a drawing area
- and some other stuff. Conceptually like:
-
- main window {
- form {
- drawing area
- scroll bar
- scroll bar
- label
- label
- etc.
- }
- }
-
- When the window is resized with the mouse I want to expand the drawing area
- and rearrange the other widgets. What is the proper way to detect the resize
- and what is the proper way to resize the drawing area.
-
- I tried using and event handler, and that worked ok, but when I would use
- XtSetValues to resize the drawing area, that would generate another resize
- event... ad nauseum.
-
- Now I am trying the following, but it is not detecting any resize at all, should
- this work?
-
-
- Atom
- WM_RESIZE_WINDOW_ATOM; /* A protocol atom for the window manager
- * resize.
- */
- /*
- * Add the callback to handle the resize information from the window manager.
- */
-
- WM_RESIZE_WINDOW_ATOM = XmInternAtom ( XtDisplay ( Map_table[a].shell ),
- "MW_RESIZE_WINDOW", FALSE );
- XmAddWMProtocolCallback ( Map_table[a].shell, WM_RESIZE_WINDOW_ATOM,
- resize_map_cb, NULL );
-
- Any help greatly appreciated.
- --
- Stephen Johns, Research Analyst
- Southwest Research Institute, SA, TX 78228 (512) 522-5751
-