[comp.windows.x] hp widgets questions

turner@daisy.UUCP (D'arc Angel) (06/14/88)

A couple of questions from a first time user of widgets

1. I define a title bar to span a form widget as follows:

/***
 TitleBar
 ***/
  static Arg arglist2[] = {
    {XtNxRefName, (XtArgVal) "Xrolo"},
    {XtNyRefName, (XtArgVal) "Xrolo"},
    {XtNstring, (XtArgVal) titleString},
    {XtNxAttachRight, (XtArgVal) TRUE},
    {XtNxAttachOffset, (XtArgVal) 5},
    {XtNxReE},
  };
	.
	.

/***
 set up the widgets
 ***/

  toplevel=XtInitialize("main","ROlo",NULL,NULL,&argc,argv); 

  form1 = XtCreateManagedWidget ("Xrolo", XwformWidgetClass,
                                 toplevel, (ArgList) arglist1, 0);


  tbar1 = XtCreateManagedWidget ("title1", XwtitlebarWidgetClass,
                                 form1, (ArgList) arglist2, XtNumber(arglist2));


 The title bar gets truncated on the right by the form1 widget, shouldn't
 the form widget resize itself to fit the full titlebar ?

2. Also in the same code if I use 

	{XtNxRefWidget (XtArgVal) form1},

   in arglist2, I get a segv error, if I use

	{XtNxRefWidget (XtArgVal) &form1},

   I get an error msg from XCreateManagedWidget, saying that the referenced
   widget is not a form or child of the form. I'm confused, RefName works
   perfect.

The full program is fairly large so I have omitted it but (hopefully) 
included enough info here, toplevel, form1 and tbar1 are all declared
as Widget (not Widget *).



-- 
Don't you think that Mahitabel is a bit too toujour gay? - Archie
...{decwrl|ucbvax}!imagen!atari!daisy!turner (James M. Turner)
Daisy Systems, 700 E. Middlefield Rd, P.O. Box 7006, 
Mountain View CA 94039-7006.                          (415)960-0123

pal@calmasd.GE.COM (Peter Lawrence) (07/13/88)

Hi There,
         I have the preliminary HP Widgets and documents from expo.lcs.mit.edu
and am trying them out. My biggest concern now is where are some sample
programs. In trying out the Athena widgets the best help was in looking at the
sources for xmh which has just about one of everything used in a non trivial
manner. Is there anything like this for the HP Widgets.
-- 
pal@calmasd.GE.COM   or  ...!sdcsvax!calmasd!pal