dheller@cory.Berkeley.EDU (Dan Heller) (04/06/89)
As I understand it, when a resize event happens, the composite widget is supposed to communicate with its children on what it intends to do with them. That is, it should loop thru the list of children and tell them, "I want to make you this size and move you to that corner" and the child responds with "you can move me to that cornder and change my height, but you can't change my width" and promptly return the value, XtGeometryAlmost and specify what it wants in the reply structure. Yet, when I examine the form and box widgets in the athena widget set, neither of these widgets do this. However, they *do* call resize and queries on themselves, but not on their children. Am I misunderstanding how this is supposed to work or is the athena form and box widgets written incorrectly/incompletely? Does anyone have a composite widget which does communicate to the child in the fashion in which it's supposed to (as I understand it)? (please followup to the newsgroup or both to me -and- the newsgroup) Dan Heller <island!argv@sun.com>
ben@hpcvlx.HP.COM (Benjamin Ellsworth) (04/07/89)
> As I understand it, when a resize event happens, the composite widget > is supposed to communicate with its children on what it intends to do > with them. ... As I understand it, the composite widget *may* choose to communicate with its children and negotiate new geometries; however, the composite is under no obligation to do so. Because the composite has no opportunity to negotiate with its parent during the processing of a "resize event", the algorithms for negotiating with children can become quite unwieldly. Hence, although it is provided for, few, if any, composites initiate geometry negotiations with their children during a resize. The society of widgets is not as egalitarian as one might wish. ----------------------------------------------------------------------- Benjamin Ellsworth | ben%hp-pcd@hp-sde.sde.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------
asente@decwrl.dec.com (Paul Asente) (04/12/89)
As Benjamin Ellsworth already said, a composite widget may consult its children but is under no obligation to do so. This was added so that widgets like pane could be more flexible. Sometimes an entry is willing to make height/width tradeoffs. A button box doesn't care about its dimensions as long as it's big enough to hold all the buttons. A polite composite will consult the children. Most currently don't. And even if it does consult the children it's under no obligation to pay any attention to what they say. Sort of like many families I know. -paul asente asente@decwrl.dec.com decwrl!asente