jelarcic@athena.ecs.csus.edu (Michael L. Jelarcic) (02/16/91)
howdy,
I have several questions concerning DECwindows that I thought someone
might be able to answer for me. my code needs to work for all production
versions of the DECwindows (which we've managed to do so far since I wrote
the initial code under FT1!)
1) starting with VMS 5.3 there is a convience routine called
DwtActivateWidget() which basically activates a pushbutton.
Since the products my company makes has to support several
versions of VMS I had to write my own routine to do the same
function (we recently extended some functionality that included
option menus and activating the pushbutton was the only way
to set the selected item in the option menu at runtime, no
could not use menuHistory since this is a one shot deal and the
option menus are called several times with differing initial
values). Does the following code fragment satisfy the Dwt routine?
local_DwtActivateWidget( Widget w )
{
XEvent xe;
xe.type = ButtonPress;
xe.disp = disp;
xe.win = win;
xe.button = Button1Mask;
XtCallCallbacks( w, "XtactivateCallback", &xe );
}
forgive any typos this is from memory. this piece of code
works fine but should I also call the arm callbacks?
2) is it possible to make a list box have a specific width that never
changes regardless of the width of it's entries? the low-level
routine definition of the list box specifies a resize attribute.
I set this attribute in my uil to DwtResizeFixed and set the
width to 30 and the list box only shows a few *pixels* of the
entries (basically it ignores the width attribute and ass_u_mes
a width of the zero plus the few pixels for margins).
if I leave out the resize attribute the list box shrinks and
grows with the longest entry as is it supposed to.
3) what is the routine that writes out the the application's
resource file? there is a whole slew of routines in Xlib for
managing resource databases including XrmPutFileDatabase().
its fairly obvious that the toolkit maintains a resource db
but I've RTFM and could not find a way to find out the XrmDatbase
for my application, how does DEC do this?
4) how does one go about setting the backing store attribute for
a whole hierarchy of widgets, do I need to set it for the
application context widget (aka top level widget) or should I
care? we recently got in a Tektronix XP29 which is the first
server in our shop that actually supports backing store and
I wanted to add this in. I monitored the expose events my
application was receiving and they only occured when my application
was mapped, the backing store attribute for the server was set
for AlwaysWhenMapped. this seems to work correctly, but I
did *not* change backing store attribute anywhere in my application.
5) why the heck doesn't the stupid toolkit return a valid height
for a menu bar via XGetValues?!? The application is basically
a constraint scroll window where the scroll bars properly place
the work window when changed but w/o all the junk necessary to
be a new widget. To do all this I have to track ConfigureNotify
events for the menu bar in addition to ConfigureNotify events
for the top level widget to calculate the constraints. the
ConfigureNotify events are necessary for the top level since I
dyanmically unmanage/manage the scroll bars if the window is at
it's maximum size or not, but I would not have to track the events
for the menu bar if XGetValues() worked.
I hope someone out there in Usenetland can help me out with some of
these, email or posted replies. Thanx.
mikey
Michael L. Jelarcic jelarcic@athena.csusac.edu
"Who said what?!? We don't know him... go away..." - my employer