[comp.windows.x] top level shell widget

angel@umigw.MIAMI.EDU (angel li) (01/27/89)

Given an arbitrary widget, how does a program find out to which toplevel
shell widget that widget belongs to?

Thanks in advance,

-- 
Angel Li
University of Miami/RSMAS

Internet: angel@flipper.miami.edu			UUCP: ncar!umigw!angel

kit@ATHENA.MIT.EDU (Chris D. Peterson) (02/07/89)

> Given an arbitrary widget, how does a program find out to which toplevel
> shell widget that widget belongs to?

Here is the only method that I can think of:

Go up the tree using XtParent() checking each widget to see if it
is a subclass of the shellWidgetClass using XtIsSubclass().  
This should do the trick.

NOTE: You can not check to see if its parent is NULL since popup shells 
      will have valid parents.

						Chris D. Peterson     
						MIT X Consortium /
						Project Athena 

Net:	kit@athena.mit.edu		
Phone: (617) 253 - 1326			
USMail: MIT - Room E40-321
	77 Massachusetts Ave.		
	Cambridge, MA 02139