[comp.windows.x] Mapping widgets with XtRealizeWidget

walton@harpsichord.cis.ohio-state.edu (Brian Walton) (04/19/89)

Help!  I am a new athena widget user and I would like to map a form widget
and all of it's nested children on the screen before beginning my mainloop()
procedure.  Within the form widget I have several viewport widgets, where
each viewport manages a single asciiDiskWidgetClass text widget. The
code I am using is :

	toplevel = XtInitialize("main","Demo",NULL,0,&argc,argv);
	 .....
	framebox  = XtCreateManagedWidget("Interface",formWidgetClass,
				    toplevel, formargs,XtNumber(formargs));

	/* Create the other widgets and insert in framebox   */
	 createwidgets();

	XtRealizeWidget(toplevel);

	/*
	 * At this point, I would like to map the framebox, and all its
	 * children on the screen. Also display the text of each text
	 * widget within framebox.
	 */

	Do_Something_Else();

	XtMainLoop();

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (04/19/89)

	/*
	 * At this point, I would like to map the framebox, and all its
	 * children on the screen. Also display the text of each text
	 * widget within framebox.
	 */

A call to XFlush(XtDisplay(toplevel)) should do the trick.  You widgets have
been mapped, it is just a matter of flushing these calls to the Server.  Of
course, you application will not be listening to events until you get to 
the XtMainLoop() call.

                                                Chris D. Peterson
                                                MIT X Consortium