Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ucbcad!ucbvax!research.att.COM!meth From: meth@research.att.COM Newsgroups: comp.windows.x Subject: (none) Message-ID: <8711102209.AA13305@ATHENA.MIT.EDU> Date: Tue, 10-Nov-87 12:26:00 EST Article-I.D.: ATHENA.8711102209.AA13305 Posted: Tue Nov 10 12:26:00 1987 Date-Received: Fri, 13-Nov-87 03:25:59 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 70 VERSION: X11 release 1 (Actually Beta release of toolkit.) SYNOPSIS: I have run into a philosophical problem with the geometry management scheme. Currently a child widget may request to be a certain size from its parent, but a parent has no way to request its children for their preferred sizes. DESCRIPTION: The following scenario exemplifies the problem. Consider building a menu widget consisting of a "Menu" managing widget and smart "Label" widgets. The smart label widget can produce one line labels, and can detect mouse events. A menu is constructed by attaching several labels to a parent Menu widget. ( More generally attaching any type of widget to the menu widget.) A Trivial example is shown. _____________ | | | Menu Widget | |_____________| | | ... | | | | _______| | | | | | | ___|___ __|____ | | | | | LABEL | | LABEL | |_______| |_______| Now consider the following scenario: There are three labels "VIOLET and MAROON", "BLUE", and "GREEN" and a request comes to modify the first label to "RED". What we want to happen is shown in the next illustration. ___________________ _______ | VIOLET and MAROON | | RED | |-------------------| |-------| | BLUE | =====> | BLUE | |-------------------| |-------| | GREEN | | GREEN | |-------------------| |-------| Before After Label Has been Changed. Currently, the toolkit does not provide a clean way to do this for general widgets. That is one can implement this quite easily for one's own set of widgets, but the scheme will not work for a general set of widgets. Since these types of operations would frequently be needed, the the toolkit should provide a mechanism for allowing a parent to request its children what size they would like to be. One way to do this is to enter some new fields in the core widget definition, which would specify preferred sizes. Another is to provide a function which a parent can call to find out about its children's preferences. FIX: See above. Marcel Meth (201) 582-3142 AT&T Bell Laboratories research!meth office 2c535 600 Mountain Avenue Murray Hill, NJ 07974