Some Q from new in Motif

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

7 posts / 0 new
Last post
Some Q from new in Motif

Submitted by Anonymous on Tue, 07/31/2001 - 17:46. Developers
Hello, i`ve some questions
1. Does exist a tooltip(Balloon help) in motif?
2. I try to make application with 2 independent (non-modal) window. I create 2 top_level widget and this work, but if i press X (close) button both windows are closed. Can i create callback for this action or does exist other way to create more then one non-modal window with one main?

Thanks and Sorry for bad english.

leetuckert

I have a multi-window application. I create a main shell as in
main_s = XtAppInitialize ( &app, "LogPro", NULL,
0, &argc, argv, NULL,
NULL, 0 );

Then I create the window for the shell
main_w = XtVaCreateManagedWidget ( "main_w",
xmMainWindowWidgetClass,
main_s,
XmNheight, 142,
XmNwidth, 888,
NULL );

Then at some other point I create a popup shell
avlds_s = XtCreatePopupShell ("avlds_s",
topLevelShellWidgetClass,
main_s, NULL, 0 );

Then I create a window for the shell as
avlds_w = XtVaCreateManagedWidget ( "avlds_w",
xmMainWindowWidgetClass,
avlds_s,
XmNheight, 742,
XmNwidth, 888,
NULL );

Then I popup the shell as
XtPopup (avlds_s, XtGrabNone)

Hope this helps...

ICS_support

There are several tooltip packages available. One is a commercial product from ICS (www.ics.com ; look for EPak). There are other, contributed versions, as well -- and I think one is available in the 2.1.30 sources on motifzone.net as a development branch.

tuckert`s information about creating pop-up shells looks good. The secondary shells should be topLevelShells. You can use XtPopup() to make them appear.

Anonymous

Thanks for your answers.
Also I find answers in ftp//ftp.rahul.net/pub/kenton/faqs/Motif-FAQ.html
And new question is
In this FAQ I find that setting XmNdeleteResponse to XmUNMAP is disable closing application by pressing close button. And I can then return form back using XtMapWidget().
How I can fully delete form (i.e. free memory) - May I use XtFree?

leetuckert

Use XtDestroyWidget (avlds_s) where avlds_s is the top level shell for the window.

ICS_support

Generally you won`t be using XtMapWidget() to make top-level widgets appear. You probably want to use XtPopup(). If the widget is a Motif dialog, then you can use XtManageChild(), and the internal routines call XtPopup() at the appropriate time.

While XtFree() is a general routine, many Motif items require a special free-ing routine e.g. for XmStrings and XmFontLists. So, to, does Xt demand special destructors for particular items, including widgets -- use XtDestroyWidget().

Anonymous

Thanks to all