[comp.windows.x] Athena Widget

Francois.Bitz@SAM.CS.CMU.EDU (03/11/90)

When using the menuButton Widget I found that the
menuName ressource does not seem to 'get' copied internally
so that if I don't re-allocate a string first all menu buttons
created in the same routine will call the same 
simpleMenu widget to be poped up (i,e the last one).
This seems to be a bug since all other widgets usually
copy  strings internally.

	char tmp[10];
	for(i=0;i<5) {
	n=0;
	sprintf(tmp,"m_n%d",i);
        XtSetArg(arg[n], XtNmenuName,tmp); n += 1;
	...
	create button menu widget
		}

when I replace this with tmp=malloc(10); then everything is ok.

Also:
	Is there an easy way to tell a viewport widget to
postion the top/left corner of the child at a desired position.
I need this because I have a (large) list widget child in which I would
always like the current item to be visible. It would be nice
to have the same way of positioning viewport thumbs as in the
scrollbar widget.

thanks

kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) (05/07/91)

I'm playing with adding 3-D shadows to the Athena Widgets.  Initially
I sub-classed my 3-D part off of Core, so that I could put shadows
on things like Logo, Mailbox, and Clock, and then I subclassed Simple 
off of my 3-D part.  This works great except for Text, and its two
children TextSrc and TextSink, because the text at the top, bottom, and
margins wipes out the shadows.

In order to eliminate that, I tried sub-classing the 3-D part off of
Simple, and left Text sub-classed by itself off of simple, but that
eliminates the Logo, Mailbox, and Clock, because they're sub-classed
directly off of Core with no Simple part.

The following questions come to mind:

Would it be okay to add the 3-D to Logo, Mailbox, and Clock, (i.e. 
Core/3-D/Logo, as compared to Core/Simple/3-D/Label) and break the 
sub-classing in these cases?

Should I add Simple to those three?  Or are there some tricks to aid
in this kind of mixed sub-classing?

Maybe I should I stick to Core/3-D/Simple/... and attempt to fix the Text
problems?

If the latter is the right way to go, and given the size and complexity
Text/TextSrc/TextSink (and/or AsciiText/AsciiSrc/AsciiSink), and given 
that this is a spare-time endeavor (spare time?  What spare time?), 
what's the right way to fix the Text?  Set x/y/width/height resources on 
the Src/Sink children?  Widen the margins?  Something I haven't seen or
thought of yet?

Any and all thoughts appreciated.

BTW, don't ask me for my source.  If and when I finish, I'll put them in
contrib on export and hope that R5 doesn't break them too much.

BTW2, without committing to anything, will R5 Athena be, pick one:
 - exactly the same as R4.
 - slightly different than R4.
 - substantially different than R4.
 - completely different than R4.

-- 
Kaleb Keithley                        kaleb@thyme.jpl.nasa.gov

Meep Meep                             Roadrunner
Veep veep                             Quayle