[comp.windows.x] Questions regarding X.V11R3 HP Xw widget set.

stevet@athertn.atherton.COM (Steve Tom) (03/10/89)

Configuration: 3/60, SunOS 3.5; HP Xw widget set shipped with MIT X.V11R3 tape
(based on R2 Intrinsics), linked against R3 Xlib and running on a R3
server (gcc 1.32, Purdue patches+, fixes 1-9).

I have a few questions regarding the HP Xw widget set. Thanks.

I've seen Xw.R3fix.tar from John Carlson, Xhp.patch.works.tar from Martin Friedmann, 
and Xhp.R3Xt.shar from Salvador Pinto Abreu to upgrade R2 Xw to R3 Intrinsics.
Can anybody share their experiences with any or all, and perhaps be kind 
enough summarize any pitfalls or recommendations?

Can anyone from the Ft. Collins group comment on the relationship of this widget set 
and OSF Motif, and whether or not HP intends to contribute an implementation of the 
latter to the MIT R4 tape?

Lastly, I may have stumbled over what appears to be a bug concerning negative offsets
in the XwList widget. I'm been studying the source of List.c to extend its 
functionality and observed that if the client does not specify the XtNcolumnPosition
constraint resource when inserting a child into the list widget, the value
defaults to -1 (as documented). However this becomes a problem because the code uses
that column value as an index to lw->list.RowNum[], lw->list.MaxHeight[] and
lw->list.MaxWidth[] which are allocated in Initialize() as

    new->list.MaxHeight = (int *)XtMalloc(sizeof(int) * new->list.numcolumns);
    new->list.MaxWidth = (int *)XtMalloc(sizeof(int) * new->list.numcolumns);
    new->list.RowNum = (int *)XtMalloc(sizeof(int) * new->list.numcolumns);
    for (i=0;i<request->list.numcolumns;i++)
    {
        new->list.MaxHeight[i] = 0;
        new->list.MaxWidth[i] = 0;
        new->list.RowNum[i] = 0;
    }

but used, for example in InsertChild() (with constraintRec->column = -1):

        constraintRec = (XwListConstraintRec *) w->core.constraints;
        i = constraintRec->column;
        j = constraintRec->row;

        if (i >= mom->list.numcolumns)
        {
            XtWarning("List: Invalid column - element renumbered");
            j = 0;
            for (i = 0; i < mom->list.numcolumns;i++)
>>             j = ( mom->list.RowNum[i] > j) ? mom->list.RowNum[i] : j;  

            constraintRec->column = 0;
            i = constraintRec->column;
            constraintRec->row = j + 1;
            j = constraintRec->row;
        }
>>      mom->list.RowNum[i] = (mom->list.RowNum[i] > (j + 1)) ? mom->list.RowNum[i] : (j + 1);

>>      if (w->core.width > mom->list.MaxWidth[i])
            mom->list.MaxWidth[i] = w->core.width;
>>      if (w->core.height > mom->list.MaxHeight[i])



Either respond with email directly or to the distribution list. 
Thanks again.
       .                       __________________
      ...  Steve Tom            __________________
     ==...  Atherton Technology  __________________
    === ...  1333 Bordeaux Drive  __________________
   ===   ...  Sunnyvale, CA 94089  __________________
  ===........  (408) 734-9822       __________________
 ===..........   ______________________________________
________________________________________________________
UUCP: {decwrl, sun, pyramid, hplabs!hpda}!athertn!stevet
Internet: stevet@atherton.com