[comp.windows.x.motif] help: can't really unmap with XmNmappedWhenManaged

slh@wolf.cs.washington.edu (Scott Heyano) (03/16/91)

In article <93202@lll-winken.LLNL.GOV> chapman@lll-crg.llnl.gov (Carol Chapman) writes:
|I am using Motif 1.1 on a VMS system with mwm.  I have several form
|dialog widgets which I manage and unmanage.  I don't always want them
|to be mapped when they are managed, so I set the XmNmappedWhenManaged
|resource to False.  The result is that the shell is still popping up,
|but with nothing displayed inside it.  Well, I don't want even the
|shell to appear.  How do I unmap it?  I created these form dialogs
|using a DEC GUI called VUIT which creates the widgets using UIL code,
|so I never explicitly created shells.  Looking through the OSF doc, I
|see that there's a WM_STATE property.  Do I need to set that, and if
|so, can someone show me how?  
|
	I don't know about using uil, but when you create a dialog
	with one of the convenience function (and so don't explicitely
	create a shell) the widget returned is that of the child of the
	shell, so what you need to do is set the XmMappedWhenManaged
	resource on the parent of the widget return---the shell.

wtm%gr.utah.edu@cs.utah.edu (Thomas McCollough) (03/19/91)

In article <15472@june.cs.washington.edu> slh@wolf.cs.washington.edu (Scott Heyano) writes:
>In article <93202@lll-winken.LLNL.GOV> chapman@lll-crg.llnl.gov (Carol Chapman) writes:
>|I am using Motif 1.1 on a VMS system with mwm.  I have several form
>|dialog widgets which I manage and unmanage.  I don't always want them
>|to be mapped when they are managed, so I set the XmNmappedWhenManaged
>|resource to False.

What advantages are there to having a widget managed, yet unmapped?

Tom McCollough

nazgul@alfalfa.com (Kee Hinckley) (03/19/91)

> What advantages are there to having a widget managed, yet unmapped?

You can get it up on the screen considerably faster since all the geometry
calculations have already been done.

I compromise.  I don't try to create them unmapped, instead I let them be
a little slow the first time, but cache the dialogs, so that subsequent
requests are instantaneous (so to speak).  This also has the advantage that
I don't waste time (and memory) creating dialogs that the user doesn't use.

Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.