home *** CD-ROM | disk | FTP | other *** search
- #include "xsignal.h"
-
- extern sigbox *panefromfb();
- /* ARGSUSED */
- void
- file_popup(w, event, params, num_params)
- Widget w;
- XEvent *event; /* unused */
- String *params;
- Cardinal *num_params;
- {
- /* position the menu, whose name was passed as the first and only
- * parameter at position (20,5) relative to the Widget w.
- */
- sigbox *pane;
- Widget a_shell,wt;
- Window child;
- int x, y, wide;
- Arg args[2];
-
- if (*num_params != 1)
- XtError("Wrong parameter count passed to file_popup()");
-
- /* get the internal Widget id of the named shell */
- pane = panefromfb(w);
- a_shell = pane->file_popup;
-
- if (a_shell == NULL)
- XtError("Wrong shell name passed to file_popup()");
-
- XtSetArg(args[0], XtNheight, &y);
- XtGetValues(w, (ArgList)args, 1);
- XTranslateCoordinates(XtDisplay(w), XtWindow(w),
- XDefaultRootWindow(XtDisplay(w)),
- 0,y,&x,&y,&child);
-
- /* currently this is the only way to move created shells */
- XtMoveWidget(a_shell, x, y);
- /* R3 needs just the next section, not the preceeding line */
- /*
- XtSetArg(args[0], XtNx, x);
- XtSetArg(args[1], XtNy, y);
- XtSetValues(a_shell, (ArgList)args, 2);
- */
- }
-