How do I make my XmApplicationShell disappear?
|
11-Dec-01 15:00 GMT
|
How do I make my XmApplicationShell disappear?
XtPopdown
appears to have no effect.
This kind of functionality is often required when an
application GUI needs to be visible initially and then slip into
the background until some other event occurs that requires user
interaction.
This behavior can be achieved using the XWithdrawWindow function the
syntax for which is:
XWithdrawWindow(display, w, screen_number)
Display *display;
Window w;
int screen_number;
The values for the display, window and screen number arguments
can be obtained using the XtDisplay, XtWindow and
XscreenNumberOfScreen functions respectively. Syntax is as
follows:
Display *XtDisplay(w)
Widget w;
Window XtWindow(w)
Widget w;
int XScreenNumberOfScreen(screen)
Screen *screen;
Assuming your ApplicationShell widget is named "MyAppShell"
example code to hide the window is as follows:
XWithdrawWindow ( XtDisplay (MyAppShell), XtWindow (MyAppShell),
XScreenNumberOfScreen(XtScreen(MyAppShell)) );
Obviously once you've withdrawn the window you are going to want
to bring it back again at some point:
XMapWindow ( XtDisplay (MyAppShell), XtWindow ( MyAppShell ));
Sponsored
by X-Designer - The Leading X/Motif GUI Builder
- Click to download a FREE evaluation
Goto top of page
|