Re: libXaw/Viewport widget initialization
On Wed, 14 Sep 2005, Alexander Pohoyda wrote: I do have one request though. If you are to contune with more Xaw work, please ensure you do not adversely affect Xaw6. What do you mean? How do I ensure this? I mean that, even with your changes to xc/lib/Xaw, you should ensure xc/lib/Xaw6 is still buildable. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Academic Information and| fax:1-780-492-1729 | |Communications Technologies | email: [EMAIL PROTECTED] | | 352 General Services Building +---+ | University of Alberta | | | Edmonton, Alberta | Standard disclaimers apply| | T6G 2H1 | | | CANADA | | +--+---+ XFree86 developer and VP. ATI driver and X server internals. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: libXaw/Viewport widget initialization
I do have one request though. If you are to contune with more Xaw work, please ensure you do not adversely affect Xaw6. What do you mean? How do I ensure this? I mean that, even with your changes to xc/lib/Xaw, you should ensure xc/lib/Xaw6 is still buildable. OK, I see. I will provide patches to fix those build errors caused by my changes. Thanks a lot for pointing that out! -- Alexander Pohoyda [EMAIL PROTECTED] PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44 ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
libXaw/Viewport widget initialization
The original problem is that when I use my experimental Hyperbolic Tree widget as a child of Viewport widget, the size of unrealized Viewport widget is not yet set and thus I cannot find out how much space I have available for layout. I have the following patch in mind and it solves the problem for me. Does it make sense or should I look for another solution? Index: Viewport.c === RCS file: /cvs/xc/lib/Xaw/Viewport.c,v retrieving revision 1.11 diff -u -r1.11 Viewport.c --- Viewport.c 14 Dec 2001 19:54:45 - 1.11 +++ Viewport.c 13 Sep 2005 18:18:07 - @@ -292,6 +292,12 @@ w-form.default_spacing = 0; /* Reset the default spacing to 0 pixels */ /* + * Get the size from the parent + */ +XtWidth(w) = XtWidth(XtParent(w)); +XtHeight(w) = XtHeight(XtParent(w)); + +/* * Initialize all widget pointers to NULL */ w-viewport.child = NULL; Please CC me on reply. Thank you. -- Alexander Pohoyda [EMAIL PROTECTED] PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44 ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: libXaw/Viewport widget initialization
On Tue, 13 Sep 2005, Alexander Pohoyda wrote: The original problem is that when I use my experimental Hyperbolic Tree widget as a child of Viewport widget, the size of unrealized Viewport widget is not yet set and thus I cannot find out how much space I have available for layout. I have the following patch in mind and it solves the problem for me. Does it make sense or should I look for another solution? Index: Viewport.c === RCS file: /cvs/xc/lib/Xaw/Viewport.c,v retrieving revision 1.11 diff -u -r1.11 Viewport.c --- Viewport.c 14 Dec 2001 19:54:45 - 1.11 +++ Viewport.c 13 Sep 2005 18:18:07 - @@ -292,6 +292,12 @@ w-form.default_spacing = 0; /* Reset the default spacing to 0 pixels */ /* + * Get the size from the parent + */ +XtWidth(w) = XtWidth(XtParent(w)); +XtHeight(w) = XtHeight(XtParent(w)); + +/* * Initialize all widget pointers to NULL */ w-viewport.child = NULL; That looks fine to me. I do have one request though. If you are to contune with more Xaw work, please ensure you do not adversely affect Xaw6. Thanks. Marc. +--+---+ | Marc Aurele La France | work: 1-780-492-9310 | | Academic Information and| fax:1-780-492-1729 | |Communications Technologies | email: [EMAIL PROTECTED] | | 352 General Services Building +---+ | University of Alberta | | | Edmonton, Alberta | Standard disclaimers apply| | T6G 2H1 | | | CANADA | | +--+---+ XFree86 developer and VP. ATI driver and X server internals. ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel