[comp.windows.x] Some Xt questions

werner@tnoibbc.UUCP (Werner de Bruijn) (09/11/90)

I just started to use the Xt toolkit to built an interface to a DBMS. I based
this interface on earlier work of a student who worked for us. Since I am
not too familiar with X or the Xt toolkit I have some questions.

	+ How do define a form to fill in a name. Besides a prompt-string
	  and a fill-in space the form should contain two buttons (cancel
	  and ok). A return in the fill-in should have the same effect as
	  the ok-button.

	+ How to create a widget that allows you to scroll through a file.

	+ How can I create windows at a fixed position on the screen.

Any pointers to documentation (I already have Xt-manual)? However
any source-examples showing these primitive features would be more welcome.

Thanks in advance,

	Werner.
-- 
Werner de Bruijn                              TEL      : (31) 15-842040
IBBC-TNO                                      FAX      : (31) 15-843990
P.O. Box 49                                   DOMAIN   : werner@ibbc.tno.nl
2600 AA  Delft, the Netherlands               INTERNET : werner@tnoibbc

moraes@cs.toronto.edu (Mark Moraes) (09/12/90)

werner@tnoibbc.UUCP (Werner de Bruijn) writes:

>	+ How do define a form to fill in a name. Besides a prompt-string
>	  and a fill-in space the form should contain two buttons (cancel
>	  and ok). A return in the fill-in should have the same effect as
>	  the ok-button.

See the Athena (Xaw) Dialog widget.

>	+ How to create a widget that allows you to scroll through a file.

A text widget (asciiDiskWidgetClass in Xaw) See xmore or xless (in
contrib in R3/R4 respectively) for examples.

>	+ How can I create windows at a fixed position on the screen.

XtSetValues to set XtNgeometry for the toplevel shell before you
realize it.  Or set it via the app-defaults file.  (Is there a better
way?)

>Any pointers to documentation (I already have Xt-manual)? However
>any source-examples showing these primitive features would be more welcome.

The Xaw manual, the HP widgets (Xw) manual, Doug Young's book "X
Window Systems Programming and Applications with Xt", and the Nutshell
book on Xt (Volumes 3 and 4)

In R4, mit/examples/Xaw has plenty of examples for the Xaw widgets.
The Xw widgets come with tests/ that make useful starting points.
Doug Young's book examples are available by ftp from
expo.lcs.mit.edu:contrib/young.examples.tar.Z or
cs.toronto.edu:pub/X/young.examples.tar.Z.  (The examples for the Motif
version of Doug Young's book are in
expo.lcs.mit.edu:young.motif.tar.Z) The Nutshell examples are in
uunet.uu.net:nutshell/xt/.
expo.lcs.mit.edu:asente-swick.examples.tar.Z contain more examples.

	Mark.