Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!ATHENA.MIT.EDU!swick
From: swick@ATHENA.MIT.EDU (Ralph R. Swick)
Newsgroups: comp.windows.x
Subject: Re: XtSetValues / geometry_manager problem
Message-ID: <8809211310.AA09341@LYRE.MIT.EDU>
Date: 21 Sep 88 13:10:01 GMT
References: <6365@batcomputer.tn.cornell.edu>
Sender: daemon@bloom-beacon.MIT.EDU
Organization: DEC/MIT Project Athena
Lines: 38


     Date:  21 Sep 88 01:48:42 GMT
     From:  gdykes@tcgould.tn.cornell.edu  (Gene Dykes)

     1) How is a geometry manager supposed to make a good layout when it is given
     Widget and constraint values which point to outdated information?

It can't.  You are 100% correct in your analysis of this problem.  See below.

     2) A GeometryManager may also be affected by certain constraints of a widget.
     If one of these constraints is changed by XtSetValues, there is no mechanism
     for telling XtSetValues that the geometry manager needs to be called.

This is a corollary of (1).  If ConstraintSetValues were able to modify the
geometry and constraints of the widget passed to the Geometry Manager,
then your problems would be over.  See below.

     What I would like is for XtSetValues to pass the correct (new) information to
     the geometry manager

Done.  The R3 Intrinsics specification changes the values passed to the
set_values method so that the real widget is in the 'new' argument.
Semantically, this is equivalent to assuming that all requested changes
will be accepted (rather than denied).  When the Geometry Manager is
invoked (on the real widget) it therefore sees all the new state.
(This is one of 3 non-source-compatible changes for widgets; it will
affect widgets which had to implement gross work-arounds in their
set_values procedures.)

                          and to allow the ConstraintSetValues procedure to be able
     to return a code that means, "The Geometry Will Change", so that XtSetValues
     will call the geometry manager even if x,y,width,height haven't changed.

I'm not sure why you want this.  If the widget geometry (you left out
border_width) hasn't changed, then why is there a need for a re-layout?
In R3, ConstraintSetValues can modify any parts of the (new) widget
geometry and thereby cause the Geometry Manager to be invoked.

-Ralph