XForms: fl_winset puzzle

Oliver Broeker (oliver@broeker.com)
Wed, 24 Jun 1998 11:36:01 +0200

# To subscribers of the xforms list from Oliver Broeker <oliver@broeker.com> :

Dear fellow XForms users!

I am using XForms to visualize an ongoing computation, where I need 2D
primitives, such as points and lines. The number of windows need by
dynamic in number and size. There are two ways I can thought about going
about with this:

(a) generate a form including a GL canvas and do GL stuff in there. I
don't know GL yet, so I postponed that solution.

(b) Use XForms "dirty hack" primitives such as fl_rectf,....

Now I boiled down my trouble to a simple program. That program opens a
window win1, imidiately resizes it, opens a second window and then
attempts to draw a blue box in the first window. I see two problems.
- the window cannot be resized by fl_winreshape if it was opened using
fl_wingeometry. Shouldn't that suppress interactive resizing only
- the blue box is not drawn into win1. Apparently this has something to
with the resizing. Without resizing I encounter no such problems.

I use forms library Version 0.88 I believe. My platform details:
- SunOS ru7 5.5 Generic sun4m sparc SUNW,SPARCstation-10
- gcc --version = 2.7.2

Thanks for any help on this,
=== Oliver ===

And here's the code:

#include <unistd.h>
#include <forms.h>

int main(int argc,char *argv[]){
Window win1,win2;

fl_initialize(&argc,argv,0,0,0);

fl_initial_wingeometry(0,0,200,100);
win1 = fl_winopen("win1");
fl_winreshape(win1,0,0,100,100);

fl_transient();
fl_initial_wingeometry(300,300,100,200);
win2 = fl_winopen("win2");

fl_winset(win1);
fl_rectf(0,0,100,50,FL_BLUE);
fl_winset(win2);
fl_rectf(0,0,100,50,FL_BLUE);

fl_check_forms();
sleep(10);
return(0);
}

-- 
Oliver Broeker                             Tel:      ++41 1 632 74 33
Institut fuer Wissenschaftliches Rechnen   Fax:      ++41 1 632 11 72
ETH Zentrum, IFW C27.2                     mailto:broeker@inf.ethz.ch  
CH-8092 Zuerich              http://www.inf.ethz.ch/personal/broeker/
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil   or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/