1 #include <Xm/Xm.h>
2 #include <Xm/PushBG.h>
3 #include <Xm/BulletinB.h>
4 
5 Display *theDisplay;
6 Window theRootWindow;
7 Pixmap Pix;
8 Widget toplevel;
9 
10 int
main(int argc,char ** argv)11 main(int argc, char **argv)
12 {
13   XtAppContext theApp;
14   Widget toplevel, one, two;
15   Pixel fg,bg;
16 
17   toplevel = XtVaAppInitialize(&theApp, "LabelG", NULL, 0,
18 			       &argc, argv, NULL, NULL);
19 
20   two = XtVaCreateManagedWidget("Two", xmBulletinBoardWidgetClass, toplevel, NULL);
21 
22   one = XtVaCreateManagedWidget("Button1", xmPushButtonGadgetClass, two,
23 				XmNwidth, 68, XmNheight, 68, NULL);
24   XtRealizeWidget(toplevel);
25 
26   theDisplay = XtDisplay(toplevel);
27 
28   fg = XBlackPixelOfScreen(DefaultScreenOfDisplay(theDisplay));
29   bg = XWhitePixelOfScreen(DefaultScreenOfDisplay(theDisplay));
30 
31   Pix = XmGetPixmap(DefaultScreenOfDisplay(theDisplay),
32                     "xlogo64",
33                     fg, bg);
34 
35   XtVaSetValues(one,
36                 XmNlabelType,XmPIXMAP,
37 	        XmNlabelPixmap,Pix,
38                 NULL);
39 
40   {
41   static XtWidgetGeometry Expected[] = {
42   	CWWidth | CWHeight,		0,	0,	89,	89,	0,0,0,	/* Form */
43   	CWWidth | CWHeight | CWX | CWY,	10,	10,	68,	68,	0,0,0,	/* two */
44 };
45 
46   PrintDetails(toplevel, Expected);
47   }
48   LessTifTestMainLoop(toplevel);
49   /*
50   XtAppMainLoop(theApp);
51   */
52 
53   exit(0);
54 }
55