Re: Re: [suse-programming-e] weird widgets
On Friday 13 May 2005 20:55, Synthetic Cartoonz wrote: Hi, Good to hear from you again, and Thanks very much for your response.
On Thursday 12 May 2005 22:29, Colin Carter wrote: [snip... Xt geometry management problems ...] I think it may be because the children widgets are not set up to be managed (and when you did try XtManage...() it probably just wasn't done right.) True. I tried XtCreateManagedWidget(..., XwrowColWidgetClass, ...) but XwrowColWidgetClass was not recognised.
My second guess at what's going on "wrong". I think maybe it isn't working as wrong as you think. I've seen other "production" X programs that have the behavior of resizing buttons with the "window" . Generally, it appears most people use something above Xt (like motif) as the geometry manager. motif supplies a number of controls for the widgets placement, alignment, size, gravity, etc.
I searched throught the header files (64 bit) but could find no reference. I also tried XmCreateMenuBar(...) but the function was not recognised. I didn't deliberately install Motif, so guessed that it wasn't an automatic install by SuSE (by the way, I am using 9.1) I also tried XtCreateManagedWidget(... XwformWidgetClass, ... but no XwformWidgetClass
Do you know what I need to 'install' to 'access' the above items?
To get motif development I had to install openmotif via Yast. It was on the 9.2 DVD. 9.1 should have this, or lesstif.
Start here: http://www.linuxforum.net/chinese/doc/motif/guide/MotifProgGuide/en_US/Xlib ,_Xt,_and_Motif.html This points to: http://www.linuxforum.net/chinese/doc/motif/guide/MotifProgGuide/en_US/Maki ng_Widgets_Visible.html#managing_widgets Here's an Xt Instrinsic FAQ containing lots of interesting factoids: http://www.cs.uu.nl/wais/html/na-dir/Xt-FAQ.html Most discussion I found about geometry management seem to make their way to the window manager (Motif), so here's something about that: http://www.linuxforum.net/chinese/doc/motif/guide/MotifProgGuide/en_US/Mana ging_Geometry.html If you are using Motif, this has some examples, that includes one that manages a ton of buttons on an xmRowColumnWidget: http://www.oreilly.com/catalog/motifref2/vol6a/Vol6a_html/ch02.html This is part of a FAQ that discusses why Xt widgets can do weird things with size, again it also uses Motif: http://www.faqs.org/faqs/motif-faq/part4/section-16.html
Thanks for the references - I will get back to you in 2007 when I've finished reading them. :-) Seriously, I will never get through this lot, but they are a great resource, and I will get started.
I am concerned about using Motif: I am still under the impression that Motif is proprietary software.
As far as I understand, openmotif fixes that problem.
(Am I correct in assuming that code written using Motif resolves to only calling the user's X11 routines? )
The libraries linked to the program handle the Xm functions which call the Xt and X functions. Assuming the libraries are statically linked, it should have everything self contained, so it should run anywhere any X client could run. (In other words, a program using motif libraries should not be dependant on running under the motif window manager. At work I run a modeling/simulation program written for motif under Open Look. )
I feel that I would be happy enough just using the X, Xt, Xaw and Xw functions.
I am using: gcc MyProg.c -o MyProg -I/usr/X11/include -lXt -lX11 -L/usr/X11/lib64 -L/usr/X11/include/Xw -lXaw -L/usr/X11R6/lib/ -lm Does this look okay, or have I over-done things/redundancy?
I can't address the right now at work. It might help if I had the entire program to compile on my setup.
And what is Xaw3d ?
I THINK that is Xaw with a 3D look (border hilights). I do know I've read you shouldn't mix Xaw and Xaw3D. I've also heard Xaw doesn't play well with others.
On Saturday 14 May 2005 01:49, synthetoonz@bellsouth.net wrote:
On Friday 13 May 2005 20:55, Synthetic Cartoonz wrote: Hi, Good to hear from you again, and Thanks very much for your response.
On Thursday 12 May 2005 22:29, Colin Carter wrote: [snip... Xt geometry management problems ...] I think it may be because the children widgets are not set up to be managed (and when you did try XtManage...() it probably just wasn't done right.)
True. I tried XtCreateManagedWidget(..., XwrowColWidgetClass, ...) but XwrowColWidgetClass was not recognised.
Do you know what I need to 'install' to 'access' the above items? To get motif development I had to install openmotif via Yast. It was on
My second guess at what's going on "wrong". I think maybe it isn't working as wrong as you think. I've seen other "production" X programs that have the behavior of resizing buttons with the "window" . Generally, it appears most people use something above Xt (like motif) as the geometry manager. motif supplies a number of controls for the widgets placement, alignment, size, gravity, etc. I think you are right. I have Douglas Young's book (as on the first reference you gave me) and it only uses X and Xt. But he includes the aforementioned calls ??? In particular he uses the XwrowColWidgetClass to make a main menu. Crazy thing is that my big buttons (main menu) invoke the sub-menu correctly, but if I move the Realize() function the submenu appears laid out horizontally instead of vertically. Perhaps you are right in that I should try gravity, and try to dig up the info on alignment (forgotten where that is, but I think it is in Resources). the 9.2 DVD. 9.1 should have this, or lesstif. Thanks for this hint - I'll look for it.
(Am I correct in assuming that code written using Motif resolves to only calling the user's X11 routines? )
The libraries linked to the program handle the Xm functions which call the Xt and X functions. Assuming the libraries are statically linked, it should have everything self contained, so it should run anywhere any X client could run. (In other words, a program using motif libraries should not be dependant on running under the motif window manager. At work I run a modeling/simulation program written for motif under Open Look. ) Thanks for this information/confirmation.
I am using: gcc MyProg.c -o MyProg -I/usr/X11/include -lXt -lX11 -L/usr/X11/lib64 -L/usr/X11/include/Xw -lXaw -L/usr/X11R6/lib/ -lm Does this look okay, or have I over-done things/redundancy?
I can't address the right now at work. It might help if I had the entire program to compile on my setup. Tomorrow I'll send it to you direct. I THINK that is Xaw with a 3D look (border hilights). I do know I've read you shouldn't mix Xaw and Xaw3D. I've also heard Xaw doesn't play well with others. Okay, I'm happy to have one less thing to think about.
Bed time for me now (3.04am in Sydney) Thanks for the feedback - much appreciated. Colin
On Saturday 14 May 2005 01:49, synthetoonz@bellsouth.net wrote:
On Friday 13 May 2005 20:55, Synthetic Cartoonz wrote: Hi, Good to hear from you again, and Thanks very much for your response.
On Thursday 12 May 2005 22:29, Colin Carter wrote: [snip... Xt geometry management problems ...] I think it may be because the children widgets are not set up to be managed (and when you did try XtManage...() it probably just wasn't done right.) True. I tried XtCreateManagedWidget(..., XwrowColWidgetClass, ...) snip My second guess at what's going on "wrong". I think maybe it isn't working as wrong as you think. I've seen other "production" X programs that have snip>
...continuing with the resizing question: Does one have to 'refresh' the values in args() after every use? i.e. do the X funxtions destroy the values? I am sending a copy of my code (243 lines of text) direct to Synthetoonz, if anybody else would like to jump in and comment I can send a copy direct to you. Regards, Colin
participants (2)
-
Colin Carter
-
synthetoonz@bellsouth.net