🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.x.pex
2 messages
2 total messages Started by Greg Huey - Aymer deGregory Fri, 11 Dec 1992 21:05
Connecting PEX workstations to X windows via "connid"
#193
Author: Greg Huey - Aymer deGregory
Date: Fri, 11 Dec 1992 21:05
46 lines
2043 bytes
  I am creating a widget with XtCreateManagedWidget of class formWidgetClass,
and then trying to get PEX SI to use this window as its drawing surface.
Follows is a code summary:
      .
      .
      .
Pconnid_x_drawable connid;
Widget dform;

{X initilaization..blah blah blah}
{tform is the parent widget}

	dform = XtCreateManagedWidget("dform", formWidgetClass, tform,
					xarg,nxarg);

	connid.display = XtDisplay(dform);
	connid.drawable_id = XtWindow(dform);

	popen_phigs(PDEF_ERR_FILE, PDEF_MEM_SIZE);
	popen_ws(1, (char *)&connid, phigs_ws_type_x_drawable);
       .
       .
       .
I then procede to try to use the opened workstation. Code that produces
a pretty multi-colored 3D cube fails to display anything -- the screen
remains black. In another program I use the same structures, the same
view representation, but I dont use X toolkit. This program works fine.
Here is what I do:
	popen_phigs( PDEF_ERR_FILE, PDEF_MEM_SIZE );
	connid.display = display = XOpenDisplay( NULL );
	connid.drawable_id = XCreateSimpleWindow( display, blah blah blah);
      .
      .
      .
	popen_ws( 1, &connid, phigs_ws_type_x_drawable );
As I said, the 3D cube gets drawn w/o problems here. It seems to be the fact
that Im using the X toolkit...perhaps Im getting the values for
connid.display and connid.drawable_id incorrectly from the widget
superstructure? Has anyone ever dealt with this sort of thing before?
Can anyone suggest a reference or sample program that might provide insight?

Thanks
Greg
ggh@reef.cis.ufl.edu
ggh@qtp.ufl.edu
Re: Connecting PEX workstations to X windows via "connid"
#194
Author: Rich Thomson
Date: Sat, 12 Dec 1992 00:22
25 lines
1666 bytes
In article <37896@uflorida.cis.ufl.edu>
	ggh@reef.cis.ufl.edu (Greg Huey - Aymer deGregory) writes:
>  I am creating a widget with XtCreateManagedWidget of class formWidgetClass,
>and then trying to get PEX SI to use this window as its drawing surface.

It doesn't look like you're realizing the widget before attempting to
open the workstation.  The window for the widget isn't created until
the widget is realized.  Since you're using Xt, why don't you try
using the PEXt workstation widget I wrote?  Its in contrib/lib/PEXt in
the R5 distribution.  The workstation widget opens a PHIGS workstation
on its window when it is realized.  You could just add:

>	dform = XtCreateManagedWidget("dform", formWidgetClass, tform,
>					xarg,nxarg);
	ws = XtCreateManagedWidget("ws", pextWorkstationWidgetClass,
				    dform, NULL, 0);

And then do whatever you like with the widget's workstation.

						-- Rich
-- 
		      Don't blame me; I voted Libertarian
Disclaimer: I speak for myself, except as noted; Copyright 1992 Rich Thomson
UUCP: ...!uunet!dsd.es.com!rthomson			Rich Thomson
Internet: rthomson@dsd.es.com	IRC: _Rich_		PEXt Programmer
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads