From: motif-bounces@alfalfa.com
Newsgroups: comp.windows.x.motif
Subject: Motif Digest V8 #41
Date: 4 Oct 92 06:00:06 GMT
Reply-To: motif-request@alfalfa.com
Distribution: inet
Organization: Alfalfa Software, Inc.

Motif Digest		Sun, 4 Oct 92		Volume 8 : Issue 41

Topics:
	Closing a window with f.kill question
	How to strip off "_popup" string in XmCreateFormDialog?
	no resize on main window
	Problems with Exodus and Motif
	Re: Large Option Menus
	Pixmap Problems
	Re: How to strip off "_popup" string in XmCreateFormDialog?
	Re: Getting the current font while building BB
	Re: PopupMenu with XmNwhichButton changed locks X server
	font required
	Enter/LeaveNotify Events on DrawingAreas
	Missing 3D toggle button gadget shadows in XmForm
	Re: Problems using translations :(
	Re: Closing a window with f.kill question
	Re: Desensitizing pushbuttons within a popup menu
	Help on building Motif1.2 on SUN
	Re: How to strip off "_popup" string in XmCreateFormDialog?

This is an automated digest of the conversations on the Motif
mailing list.

Postings should be addressed to:    motif@alfalfa.com

Requests to be added or deleted to: motif-request@alfalfa.com
  (Please indicate whether you want to receive the mailing list,
   or the Digest form (produced once a day), and whether you
   want to receive mail crossposted to motif-talk@osf.org.)

-------------------------------------------------------------------------------

Date: 2 Oct 92 02:10:43 GMT
>From: iacd!pgenualdi@uunet.uu.net  (Patty Genualdi)
Subject: Closing a window with f.kill question

HI,

I am having a problem closing a client using f.kill, is there another
Motif command which I can use which will close the window but not send
a "kill" to the client?  My client is XGator.  When I close the XGator
(Macintosh window) the XGator hangs and I have to reboot the Macintosh.

My e-mail address is pgenualdi@ws02.ips.iacd.honeywell.com

Thanks in advance.

Patty Genualdi

------------------------------

Date: 30 Sep 92 15:34:00 GMT
>From: addvax.llnl.gov!kettering@lll-winken.llnl.gov  (Brett 'Volleyball Is My
 Game' Kettering)
Subject: How to strip off "_popup" string in XmCreateFormDialog?

>From: dwu@hal.gnu.ai.mit.edu (Daniel Wu)
>Subject: How to strip off "_popup" string in XmCreateFormDialog?
>Message-ID: <1992Sep29.005615.14463@mintaka.lcs.mit.edu>


>In my code, I call the routine:
	configDialog = XmCreateFormDialog (dialogShell,
		"Printer/Plotter Setup", NULL, 0);
The resulting dialog box has the Menu title:
		Printer/Plotter Setup_popup
				     ^^^^^^^
I want the string to simply read:
		Printer/Plotter Setup
without the "_popup" appendage.
>Can someone tell me what I have to do to accomplish this?

Try

  XtVaSetValues( configDialog, XmNdialogTitle, "Printer/Plotter Setup", NULL );

-------------------------------------------------------------------------------
Brett M. Kettering
PaperNet: LLNL P.O. Box 808 L-437 Livermore, CA.  94551
InterNet: brettk@llnl.gov
TalkNet : (510) 423-3467
FaxNet  : (510) 423-4606

"No other success can compensate for failure in the home."
                   -- David O. McKay
-------------------------------------------------------------------------------

------------------------------

Date: 30 Sep 92 15:28:00 GMT
>From: addvax.llnl.gov!kettering@lll-winken.llnl.gov  (Brett 'Volleyball Is My
 Game' Kettering)
Subject: no resize on main window

>From: kamemoto@spf.trw.com (Kenneth Kamemoto)
>Subject: no resize on main window
>Message-ID: <2AC8A017.3827@deneva.sdd.trw.com>


>     I want to create a Main Window widget with a menu bar and a bulletin
>board work area.

Note that this will only work for mwm.  Include the file Xm/MwmUtil.h and in
there are defined constants that you can bitwise or (|) together to complete
the decorations that you want.  For example:

  int decor = MWM_DECOR_BORDER | MWM_DECOR_TITLE;

  XtVaSetValues( XtParent( mw ), XmNmwmDecorations, decor, NULL );

This, of course, assumes that the parent of the main window is a shell.  Now
you will only have the border and title decorations from mwm.

-------------------------------------------------------------------------------
Brett M. Kettering
PaperNet: LLNL P.O. Box 808 L-437 Livermore, CA.  94551
InterNet: brettk@llnl.gov
TalkNet : (510) 423-3467
FaxNet  : (510) 423-4606

"No other success can compensate for failure in the home."
                   -- David O. McKay
-------------------------------------------------------------------------------

------------------------------

Date: 30 Sep 92 16:30:07 GMT
>From: nsisrv!mac06.sti.nasa.gov!user@ames.arc.nasa.gov  (Lisa Burdick)
Subject: Problems with Exodus and Motif

We are trying to run an inhouse application using motif on an X server
using the eXodus for Windows and PC/TCP software.  At a certain point in
the application where a new screen is supposed to appear, the new screen
never comes up.  We are trying to run our appliation in Rootless (multiple
windows) mode.  We can get farther in the program by using Rooted Mode but
the application still freezes at another point.  Does anyone have any ideas
as to why this may be happening?

We can run the application on a SUN and on a Macintosh (using Exodus for
Macintosh) and it runs perfectly.  Please help!


Lisa Burdick
NASA STI Program
lburdick@STI.NASA.GOV

------------------------------

Date: 30 Sep 92 16:35:26 GMT
>From:
 haven.umd.edu!darwin.sura.net!sgiblab!nec-gw!netkeeper!idaho!achan@ames.arc.nas
 a.gov  (Amy Chan)
Subject: Re: Large Option Menus

In article <LsPTRB1w165w@bluemoon.rn.com> rogerg@bluemoon.rn.com (Roger
 Grywalski) writes:
>Does anyone know how Motif 1.1 is supposed to deal with option menus
>where the options cannot all fit on the screen.  ie there are too
>many options.  Is there a way to scroll the options?  Any help would
>be greatly appreciated.

I don't think there is a way to scroll the options in an option menu.
May be a list widget is more appropriate in this case?

Amy
--
Amy Chan                 | E-Mail:
NEC America              |  INET: achan@tdd.sj.nec.com
110 Rio Robles           |  UUCP: ...{decwrl,oliveb}!necsun!achan
San Jose, CA 95134       |

------------------------------

Date: 30 Sep 92 16:15:31 GMT
>From: van-bc!cs.ubc.ca!news.UVic.CA!csr!mstorey@ucbvax.Berkeley.EDU
 (Margaret-Anne D Storey)
Subject: Pixmap Problems


Hi,

I am currently in the midst of implementing a large software
system in C++ and Motif, running on IBM RS/6000.

The application uses many windows which have drawingareas.
Therefore I need to look after expose events.  I am doing
this by drawing into a pixmap as I draw on a window and
then pasteing from the pixmap to the window when an
expose event occurs.

I am using Xlib calls to do the drawings.  I am drawing
icons (drawn as pixmaps), lines and strings, with
the GCFunction in the gc set to GXxor.  Most things
work ok, except it seems that:
	XDrawString into a pixmap with GXxor
does not work!

I have tried all the Xlib Drawstring calls and the motif
ones.  They all have the same problem!  Perhaps it might
have something to do with fonts, but I have tried setting
different fonts.

I am at my wits end, as the system is unusable due to
this problem!
If anyone has any info or suggestions I would really
appreciate them!

Does anyone know where I could ftp an xlib or
motif bug list?

Many thanks!

Peggy Storey,
Department of Computer Science,
University of Victoria,
British Columbia, Canada.
(mstorey@csr.uvic.ca)

------------------------------

Date: 1 Oct 92 02:10:05 GMT
>From: meaddata!dgdhome!dgdhom2!tmchome!tchal@uunet.uu.net  (Thomas M. Chalfant)
Subject: Re: How to strip off "_popup" string in XmCreateFormDialog?

dwu@hal.gnu.ai.mit.edu (Daniel Wu) writes:

>
> In my code, I call the routine:
>
>       configDialog = XmCreateFormDialog (dialogShell,
> 		"Printer/Plotter Setup", NULL, 0);
>
> The resulting dialog box has the Menu title:
>
> 		Printer/Plotter Setup_popup
> 				     ^^^^^^^
> I want the string to simply read:
>
> 		Printer/Plotter Setup
>
> without the "_popup" appendage.
>
> Can someone tell me what I have to do to accomplish this?

First Daniel, I wonder if the dialogShell widget you are passing in as
the first parameter (parent) really is a Dialog Shell?  If it is then
you probably do not want to be calling XmCreateFormDialog() but rather
XmCreateForm().  The ...Dialog() version of the convenience creation
functions creates the dialog shell for you already.  Anyway, assuming
all is as what you want, on to your answer:
    ...
    String title = "Printer/Plotter Setup";
    ...
    configDialog = XmCreateFormDialog (dialogShell, title, NULL, 0);
    XtVaSetValues(XtParent(configDialog), XmNtitle, title, NULL);
    ...

This should do the trick for you.  You just have to make sure you are
setting the XmNtitle resource on the dialog shell!

Tom

------------------------------

Date: 30 Sep 92 20:44:58 GMT
>From: mcsun!sunic!aun.uninett.no!alf.uib.no!hsr.no!fics!matt@uunet.uu.net
 (Shithead II)
Subject: Re: Getting the current font while building BB


  In article <1992Sep25.115934.10297@quando.quantum.de>
 henigan@quando.quantum.de (Kevin Henigan) writes:
  >...
  >I have to layout a mask with input and text fields, the positions of all
  >the fields are in a descriptions file specified as row, column values.
  >
  >To do this I have layed out a BulletinBoard with Label & Text Widgets, the
  >positions (x,y) of all the Label & Text Widgets is calculated from the row,
  >column specified and the height & width of the font. This works fine when
  >I set the font in the program, (I use XLoadQueryFont() ), but the font should
  >really be set using resources.


taking this a little farther...
I have Text, Label, PushButtons, CheckBoxes, etc... specified by (row,col)

Problem is that the different widgets (i.e. list above) have different
height/width values (i.e. a 'row' of RadioButtons is Taller than a 'row' with
Labels, etc...)

I end up spacing everything according to the largest widget (via some hard
coded magic numbers according to my specified font...)

If the font gets Bigger/Smaller things start to overlap and in general don't
work...

****** ??? ****** ??? ******
Can I force all of my different widgets to have the same Height/Width?
   (i.e. FixedFont?)
   (I use 10x20 which is Fixed, but there are still differences ... :-? )
Is there a way to figure out spacing between arbitrary widgets?
   (So that my <row,col> values could make sense with any (fixed) font...)
Should I use something like a Form Widget?
   (Doesn't this become complex if the layout is *completely* flexible...?)


Any ideas would be greatly appreciated... (!)

woof,
matt_dawg

------------------------------------------------------------------------
Matthew Kerr
matt@fics.uucp

Kvam data as
Nikkelveien 14, N-4300 Sandnes, Norway
Tel: + 47 4 62 37 66
Fax: + 47 4 62 39 85

------------------------------

Date: 30 Sep 92 16:52:31 GMT
>From:
 van-bc!cs.ubc.ca!destroyer!sol.ctr.columbia.edu!spool.mu.edu!sgiblab!nec-gw!net
 keeper!idaho!achan@ucbvax.Berkeley.EDU  (Amy Chan)
Subject: Re: PopupMenu with XmNwhichButton changed locks X server

In article <60749@mimsy.umd.edu> nzhang@umiacs.umd.edu (Ning Zhang) writes:
>
>We are in the process to convert our programs from MOTIF 1.0.3 to
>ICS MOTIF 1.1.3. We have had many problems during the conversion
>We have got around most of the problems, but I had no idea what
>causes the problem demostrated by the following test program:
>
>#include <stdio.h>
>#include <Xm/Form.h>
>#include <Xm/PushB.h>
>#include <Xm/RowColumn.h>
>
>Widget topshell;
>Widget form;
>Widget btn1;
>Widget btn2;
>Widget btn3;
>Widget btn4;
>Widget popup1;
>
>Arg arg_list[10];
>int i;
>
>dialog()
>{
>    XtManageChild(popup1);
>}
>
>main(argc, argv)
>int argc;
>char *argv[];
>{
>    topshell = XtInitialize(argv[0], "PUBTST", NULL, 0, &argc, argv);
>    form = XmCreateForm(topshell, "form", NULL, 0);
>    XtSetArg(arg_list[0], XmNtopAttachment, XmATTACH_FORM);
>    XtSetArg(arg_list[1], XmNleftAttachment, XmATTACH_FORM);
>    XtSetArg(arg_list[2], XmNrightAttachment, XmATTACH_FORM);
>    btn1 = XmCreatePushButton(form, "button_1", arg_list, 3);
>    XtSetArg(arg_list[0], XmNtopAttachment, XmATTACH_WIDGET);
>    XtSetArg(arg_list[1], XmNtopWidget, btn1);
>    XtSetArg(arg_list[2], XmNleftAttachment, XmATTACH_FORM);
>    XtSetArg(arg_list[3], XmNrightAttachment, XmATTACH_FORM);
>    btn2 = XmCreatePushButton(form, "button_2", arg_list, 4);
>
>    XtManageChild(btn1);
>    XtManageChild(btn2);
>    XtManageChild(form);
>    XtRealizeWidget(topshell);
>
>    XtSetArg(arg_list[0], XmNwhichButton, 1);
>    popup1 = XmCreatePopupMenu(topshell, "popup1", arg_list, 1);
>/*
>    popup1 = XmCreatePopupMenu(topshell, "popup1", arg_list, 0);
>*/
>    btn3 = XmCreatePushButton(popup1, "button_3", arg_list, 0);
>    btn4 = XmCreatePushButton(popup1, "button_4", arg_list, 0);
>    XtManageChild(btn3);
>    XtManageChild(btn4);
>
>    XtAddCallback(btn1, XmNactivateCallback, dialog, NULL);
>    XtMainLoop();
>}
>
>When the whichButton resource is changed from the default value
>(the right mouse button) to the left mouse button, the whole
>X server was locked up after btn1 is pressed. I had to log in from
>another machine to kill the program. And sometime I got a message like
>
>    X: Warning: input queue lock broken!
>
>after the process was killed.
>
>We are running MOTIF 1.1.3 with SUN OpenWindows 3.0 XNeWS server.
>We had no such a problem with MOTIF 1.0.3 with the same X server.

I tried your program on MOTIF 1.1.0 with X11R4 on a Sun Sparc. I had
the same program as you described (the X server was locked up after btn1
was pressed).

However, after I changed
    XtSetArg(arg_list[0], XmNwhichButton, 1);

to
    XtSetArg(arg_list[0], XmNmenuPost, "<Btn1Down>");

the program didn't cause the X server to lock up.

>From Motif 1.1 Programmer's Reference Manual,

XmNwhichButton
    Specifiess the mouse button to which a menu system is sensitive.
    ...
    This resource is obsolete; is has been replaced by XmNmenuPost and is
    present for compatibility with older releases of OSF/Motif.



Amy


--
Amy Chan                 | E-Mail:
NEC America              |  INET: achan@tdd.sj.nec.com
110 Rio Robles           |  UUCP: ...{decwrl,oliveb}!necsun!achan
San Jose, CA 95134       |

------------------------------

Date: 30 Sep 92 17:36:54 GMT
>From:
 ghost.dsi.unimi.it!dei.unipd.it!sabrina.dei.unipd.it!jojo@tcgould.tn.cornell.ed
 u  (Giorgio Paolucci 264433)
Subject: font required

Hello,
I have a problem using the function XmTextSetHighlight(): it make my
application crash. To solve my problem i tought to use a char-set with both
normal and reverse characters and use XmTextReplace() to put a string in
reverse mode. Unfortunately I haven't got such a font. Can anybody help me?
I'd need a font like the 6x13.scf but with normal and reverse character.
Thankyou in advance.

------------------------------

Date: 1 Oct 92 19:47:16 GMT
>From: era!feit@uunet.uu.net  (Mark Feit)
Subject: Enter/LeaveNotify Events on DrawingAreas


Is there a relatively easy way to get Enter/LeaveNotify events on a
DrawingArea (Version 1.1.5)?  I've tried using

*my_da.translations:	#replace \
			...
			<EnterWindow>: DrawingAreaInput() \n\
			<LeaveWindow>: DrawingAreaInput() \n\
			...

but it doesn't seem to work.  I understand that DAs inherit
translations from Manager and filters out Enter/Leave events, but I
was able to get ButtonMotion events using the same method.

Thanks loads.

						- Mark

 ................................. .................................
: Mark A. Feit             KD4TAJ : Internet: feit@era.com          :
: Engineering Research Associates : USENET: ...!uunet!era!feit      :
 ................................. .................................
		   "Keep BSD Free -- Boycott AT&T"

------------------------------

Date: 1 Oct 92 20:31:02 GMT
>From: wupost!cs.utexas.edu!lgc.com!tlj@decwrl.dec.com  (Tim Jones...NOT)
Subject: Missing 3D toggle button gadget shadows in XmForm

I could not find this problem mentioned in the motif FAQ; has anyone seen it
before: I am losing the 3D shadows on some toggle button gadgets.  The widget
hierarchy is:

  Shell -> XmFrame -> XmForm -> XmForm -> XmForm -> XmToggleButtonGadget

(yes, there are some redundant forms). If I put the toggle button up one level:

  Shell -> XmFrame -> XmForm -> XmForm -> XmToggleButtonGadget

the 3D shadows are fine.  Apparently the problem is with the third XmForm,
but I can't figure it out.  Where do gadgets get their shadows from, anyways?

Setting the XmNshadowThickness on the toggles makes no difference.  The toggles
are still functional, and the XmNfillOnSelect color shows up when it is
selected, but the indicator has no 3D shadows.

Does anyone have some suggestions?  Please email and I will post a summary
when I figure out the problem.  Thanks!


Tim Jones
tlj@zycor.lgc.com

------------------------------

Date: 30 Sep 92 17:19:50 GMT
>From:
 agate!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!darwin.sura.net!sgiblab!nec-g
 w!netkeeper!idaho!achan@ucbvax.Berkeley.EDU  (Amy Chan)
Subject: Re: Problems using translations :(

In article <1992Sep29.185408.654@vlsi.polymtl.ca> frite@vlsi.polymtl.ca (Michel
 Besner)) writes:
>
>	Hi there !
>
>
>	I'm trying to receive events while keeping the shift+left button
>down. I want to continue receiving those events while I'm moving the
>mouse around (with the shift+left button still down ...).
>
>	So far I've tried using :
>
>	Shift<Btn1Down>,<Btn1Motion> -> I get the first event but nothing
>after ....
>
>	Shift<Btn1Motion> doesn't seem to work -> I get a code dumped
>in BindActions :(

"Shift<Btn1Down>,<Btn1Motion>" will only give you the first event because
<Btn1Down> event only occurred once.

You can try using:

    Shift<Btn1Motion>


Amy
--
Amy Chan                 | E-Mail:
NEC America              |  INET: achan@tdd.sj.nec.com
110 Rio Robles           |  UUCP: ...{decwrl,oliveb}!necsun!achan
San Jose, CA 95134       |

------------------------------

Date: 2 Oct 92 15:46:46 GMT
>From:
 deccrl!caen!sdd.hp.com!elroy.jpl.nasa.gov!mahendo!thyme!kaleb@bloom-beacon.mit.
 edu  (Kaleb Keithley)
Subject: Re: Closing a window with f.kill question

In article <1992Oct2.021043.16587@iacd> pgenualdi@ws02.ips.iacd.honeywell.com
 (Patty Genualdi) writes:
>
>I am having a problem closing a client using f.kill, is there another
>Motif command which I can use which will close the window but not send
>a "kill" to the client?  My client is XGator.  When I close the XGator
>(Macintosh window) the XGator hangs and I have to reboot the Macintosh.
>

Well, f.kill sends a WM_DELETE_WINDOW message if the client partipates in
the ICCCM WM_PROTOCOLS/WM_DELETE_WINDOW protocol.  I suspect that XGator,
like so many other quality (???) commercial products does not.

You have three options.
1) And the one I like best.  Call the people who wrote XGator and complain
vociferously.  Make them send you a fixed version.

2) Perhaps the easier of the two.  Edit your .mwmrc and .Xdefaults file
to eliminate the close option from the window manager menus, which would
force you to use their Exit mechanism.

3) Don't use XGator.  :-)

--

Kaleb Keithley                          kaleb@thyme.jpl.nasa.gov

Not authorized, in any way, shape, or form, to speak for anyone.

------------------------------

Date: 30 Sep 92 17:41:50 GMT
>From: darwin.sura.net!sgiblab!nec-gw!netkeeper!idaho!achan@gatech.edu  (Amy
 Chan)
Subject: Re: Desensitizing pushbuttons within a popup menu

In article <generous.717858412@nova> generous@sti.nasa.gov (Curtis Generous)
 writes:
>
>How can one desensitize one/several pushbuttons within a popup menu
>which has been created using the XmVaCreateSimplePopupMenu
>convenience function?  I guess I'm asking how do I find out
>the widget id of the individual pushbuttons that were created
>through this function?
>
>Example: I want pushbutton associated with label2 to be desensitized.
>
>    popup_menu = XmVaCreateSimplePopupMenu(w, "popup", handler,
>        XmVaTITLE, title,
>        XmVaDOUBLE_SEPARATOR,
>        XmVaPUSHBUTTON, label1, NULL, NULL, NULL,
>        XmVaPUSHBUTTON, label2, NULL, NULL, NULL,
>        XmVaPUSHBUTTON, label3, NULL, NULL, NULL,
>       NULL);
>
>
>Appreciate any ideas on this.  I would rather not have to recreate
>all of the popups the 'long' way (row column, ...).

You can get all of the children of the popup menu by:

    WidgetList children;
    Cardinal num_children;

    XtVaGetValues(parentWidget, XtNchildren, &children,
                XtNnumChildren, &num_children, NULL);

which will return the children as a widget list and the number of children
on that list.

>From the man page of XmVaCreateSimplePopupMenu in Motif Programmer's Reference,
the name of each button is button_n where n is an integer from 0 to one minus
the number of buttons in the menu.

If you would like to get the widget ID (actually it is a gadget) of the
pushbutton associated with label2, you can use XtName() on each of the widget
in the widget list above and compare it to "button_1".


Amy
--
Amy Chan                 | E-Mail:
NEC America              |  INET: achan@tdd.sj.nec.com
110 Rio Robles           |  UUCP: ...{decwrl,oliveb}!necsun!achan
San Jose, CA 95134       |

------------------------------

Date: 30 Sep 92 18:02:55 GMT
>From:
 pacbell.com!charon.amdahl.com!amdahl!JUTS!RUTS.ccc.amdahl.com!dmq00@ames.arc.na
 sa.gov  (Desmond Quek)
Subject: Help on building Motif1.2 on SUN


Hi folks,

	I'm running into ANSI C problems when building Motif 1.2 on SUN,
here's my system config:

	SUN SPARCstation IPX
	SunOS 4.1.1-IP
	SUN ANSI C compiler (acc) version SC1.0

	From the output generated by make Everything, it appears that
make Makefile, make Makefiles, make includes, and make depend are doing
fine.  As soon as it gets to make -k, I start to see a long list of
warning messages that look like these:

acc -c -O  -I. -I/usr/local/windows/X11R5/src/mit/X11 -I../.././X11
 -I/usr/local/windows/X11R5/src/mit -I../../.
 -I/usr/local/supported/lang/SC1.0/ansi_include -DSTRINGS_ALIGNED -DNO_REGEX
 -DNO_ISDIR -DUSE_RE_COMP -DNO_REGCOMP -DUSE_GETWD -DNO_MEMMOVE -DNO_ALLOCA
 -DBOGUS_MB_MAX -DNO_CONST     CascadeB.c
"../.././X11/Xm/XmP.h", line 916: warning: comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 916: warning: comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 919: warning: comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 919: warning:comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 927: warning: comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 927: warning: comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 931: warning: comment is replaced by "##"
"../.././X11/Xm/XmP.h", line 931: warning: comment is replaced by "##"
"CascadeB.c", line 920: warning: semantics of "<" change in ANSI C; use explicit
 cast
"CascadeB.c", line 924: warning: semantics of "<" change in ANSI C; use explicit
 cast
"CascadeB.c", line 1809: warning: semantics of "/" change in ANSI C; use
 explicit cast
"CascadeB.c", line 1849: warning: semantics of ">" change in ANSI C; use
 explicit cast

	Any idea why I am getting all these warning messages?  Do I need
to add -D__STDC__ to acc?  Any help will be very much appreciated.


Thanks,
Desmond Quek

dmq00@da.amdahl.com
(408) 746-7593

------------------------------

Date: 2 Oct 92 17:13:50 GMT
>From:
 eru.mt.luth.se!lunic!sunic!ugle.unit.no!news.uit.no!staff.cs.uit.no!bjoerns@blo
 om-beacon.mit.edu  (Bjoern Stabell)
Subject: Re: How to strip off "_popup" string in XmCreateFormDialog?

In article <1992Oct1.123616.29248@bnr.ca>, kingo@bnr.ca (Kiem Ngo) writes:
] In article <i81XRB1w165w@tmchome.UUCP>, tchal@tmchome.UUCP (Thomas M.
 Chalfant) writes:
] |> dwu@hal.gnu.ai.mit.edu (Daniel Wu) writes:
] |>     ...
] |>     String title = "Printer/Plotter Setup";
] |>     ...
] |>     configDialog = XmCreateFormDialog (dialogShell, title, NULL, 0);
] |>     XtVaSetValues(XtParent(configDialog), XmNtitle, title, NULL);
] |>     ...
] |>
] |> This should do the trick for you.  You just have to make sure you are
] |> setting the XmNtitle resource on the dialog shell!
] |>
] |> Tom
]
] It does not matter what kind of dialogs is: you can set the
] title name to anything you want with one X call:
]
]       XStoreName(XtDisplay(toplevel),
]                  XtWindow(XtParent(motif_dialog_widgetID)), dialog_title);

Overkill, why use Xlib when Xt/Xm provides the functionality you need?

Just one minor addition to Tom's code.  The 'title' in the XmCreate-call is
really the name of the widget, and thus you may specify the title in the
app-defaults file (if you have one) like:

        applicationName*printerPlotterSetup.dialogTitle:   Printer/Plotter Setup

If you do it this way, you must drop the XtVaSetValues() call:

        configDialog = XmCreateFormDialog(dialogShell, "printerPlotterSetup",
                                          NULL, 0);

I believe this is a good habit since it enables you to change the default
language by using a different app-defaults file (not everybody wants
english :)  Choosing the right app-defaults file (based on your LANG) is is
done automagically if you have NLS (and have it configured properly).

Remeber that your app-defaults file must be called the same as the name you
give your application (applicationName in the example above) when you do
Xt(App)Initialize(), and that it must be in your XUSERFILESEARCHPATH
path...  For instance, if it is in the current directory, you'll have to
add "./%N" to your XUSERFILESEARCHPATH environment variable.  (Entries are
separated by :'s)


Kind regards,
--
                                                  Bjoern Stabell
                                                  University of Tromsoe
                                                  (+47) 83 44 053 / 83 75 164
                                                  bjoerns@staff.cs.uit.no

------------------------------


End of Motif Digest V8 #41
************************