[comp.windows.open-look] PopupWindow's in OLIT

stuart@genethon.genethon.fr (Stuart Pook) (05/30/91)

I was very interested to read the following comment from
att!attunix!merlyn@uunet.UU.NET:

> OLIT does supply a single widget, PopupWindow, for creating
> popup (pushpin) windows. I designed it--and I don't use it,
> because each popup window is different.

I would like to create a popup window from OLIT (Openwindows 2.0) that
has resize corners, has a pushpin and resizes its child.  The PopupWindow
was the only way that I could find to create a popup with resize corners
and a pushpin but I could not (legally) get it to resize its child because
one is given three places to put a child (as a child of one of two
control areas which never resize their children or as the second child
of a footer panel with is never resized vertically).  My workaround was:

        popup = XtCreatePopupShell("report", popupWindowShellWidgetClass,
                toplevel, (Arg *)0, 0);

        XtSetArg(arg, XtNfooterPanel, &footer);
        XtGetValues(popup, &arg, 1);
        XtDestroyWidget(footer);

        footer = XtCreateManagedWidget("box", footerPanelWidgetClass,
                popup, (Arg *)0, 0);
        XtSetArg(arg, XtNfooterPanel, footer);
        XtSetValues(popup, &arg, 1);

        form = XtCreateManagedWidget("form", formWidgetClass,
                footer, (Arg *)0, 0);

Form is now the first child of a new footer panel. Careful: don't do
this as a result of XtDespatchEvent because then the destroy is delayed
until too late (register a work procedure if necessary).

But this is not nice.  How does one create a popup window with resize
corners and a pushpin without using the PopupWindowShellWidgetClass?

Stuart Pook
Genethon--AFM

** Sender Unknown ** (05/30/91)

> How does one create a popup window with resize
> corners and a pushpin without using the PopupWindowShellWidgetClass?

Use another convenient Shell subclass; I suggest using
transientShellWidgetClass. The Vendor extension in
OLIT 2.5 (NOT OLIT 2.0) has resources for setting
resize corners and the pushpin. In OLIT 2.0, you are stuck
using the popupWindowShellWidgetClass.

Steve Humphrey
UNIX System Laboratories