[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2008.0. "geometry/resize negotiations." by UKEDU::DDAVIES (A Dolby gas fire ...no problem.) Mon Jan 08 1990 08:09

A query about geometry/resize negotiation and its triggering.

I have a dialog_box...work_area_menu...push_button
                                    ...push_button
                                    ...push_button

I want one of the buttons to toggle the menu from DwtNorientationHorizontal
to DwtNorientationVertical.

If I just XtSetValues then nothing seems to happen, so I thought maybe I've
got to manually trigger geometry negotiations by XtManageChild or maybe
XtUnmanage then a XtManage or ??????.

I've tried allsorts but I dont really understand. I had thought that a 
XtSetValues would trigger the necessary.

-dave.
T.RTitleUserPersonal
Name
DateLines
2008.1LEOVAX::TREGGIARIMon Jan 08 1990 10:5413
From looking at the code, an XtSetValues on the DwtNorientation of a menu
should be enough to cause it to re-layout its children.  This should happen
regardless of any geometry "negotiations" that need to take place (i.e. even
if it doesn't change size, the children should be layed out differently).

As far as the geometry negotiations go, the menu widget will make a request
to change size.  That has to be "approved" all the way up the widget hierarchy
for it to take place.  That is, the dialog_box has to be willing (it will
be unless it has been defined to be "fixed" size), and then whatever is
above that (shell widget?).  The top-level shell must have the
resource XtNallowShellResize set to TRUE, or it won't allow the resize.

Leo
2008.2UKEDU::DDAVIESA Dolby gas fire ...no problem.Mon Jan 08 1990 16:1019
Thanks for your thoughts.

I have XtNallowShellResize on toplevel, DwtResizeShrinkWrap on the dialog_box,
and I've tried every combination of DwtNresize on the dialog_box and
DwtNMenuPacking on the work_area_menu.

Having done a XtSetValues to change the orientation of the menu nothing
happens, but when I make a change to the label of one of the menu's buttons
it triggers the menu to horizontal but with the height of each button the same
dimension as the original vertical menu (i.e. huge buttons).
XtSetting to vertical again has no effect until I "do" something to one of
the menus buttons but now the button width stays the same as the "huge button
horizontal menu" i.e. I now have huge long thin buttons in a vertical menu.

The bottom line is I suppose that nothing happens on just a XtSetValues of the
orientation of the menu. I've tried XSynchronize just incase it was some 
buffering problem.

-dave
2008.3sounds familiarWAIT::DESAIJatin DesaiMon Jan 08 1990 16:377
I remember a problem with menu widget (V1) not re-sizing properly after 
changing the orientation. The workaround was to set the menu width/height to 
be zero whenever you change the orientation. I am not sure if this bug is
still there and is one of the causes to your problem though.

Jatin
2008.4that got it!UKEDU::DDAVIESA Dolby gas fire ...no problem.Mon Jan 08 1990 16:548
    
    XtSetValues width/height = 0 did the trick.
    I am still on V1 (must get around V2).
    Is it correct to expect XtSetValues to trigger all the necessary layout,
    geometry, resize code ?. i.e The widget USER doesnt have to use some
    other Xt to trigger "negotiations" ?
    
    -dave 
2008.5CorrectLEOVAX::TREGGIARITue Jan 09 1990 07:437
>    Is it correct to expect XtSetValues to trigger all the necessary layout,
>    geometry, resize code ?. i.e The widget USER doesnt have to use some
>    other Xt to trigger "negotiations" ?
    
    Yes, that is correct.
    
    Leo
2008.6there's moreUKEDU::DDAVIESA Dolby gas fire ...no problem.Wed Jan 10 1990 06:1618
Something else along the same lines...

I'm generally concerned that XtSetValues does not seem to do all it should.
(or, I suppose, all I THINK it should)

eg. CommandWindow widget.
 
Hi level convenience functions like DwtCommandSet end up doing an 
XtSetValues of the DwtNvalue of the widget ? and nothing extra ?

Thing is I can DwtCommandSet ok but XtSetValues of DwtNvalue does nothing.
Also when I XtSetValues of DwtNprompt then the prompt changes BUT the size
of the previous prompt limits the amount of the new prompt thats visible.
i.e. the resize/layout/geometry question again.

Keep talking.

-dave.