1 typedef __SIZE_TYPE__ size_t;
2 typedef void *XtPointer;
3 
4 typedef struct _WidgetRec *Widget;
5 typedef struct _WidgetClassRec *WidgetClass;
6 
7 extern WidgetClass commandWidgetClass;
8 
9 typedef void (*XtCallbackProc)(
10     Widget 		 ,
11     XtPointer 		 ,
12     XtPointer
13 );
14 
15 extern const  char XtStrings[];
16 
17 
18 typedef struct
19 {
20 	char			*Name,
21 				*Label;
22 	XtCallbackProc		Callback;
23 	XtPointer		ClientData;
24 	Widget			W;
25 } DialogButtonType, *DialogButtonTypePtr;
26 
27 
AddButtons(Widget Parent,Widget Top,DialogButtonTypePtr Buttons,size_t Count)28 Widget AddButtons(Widget Parent, Widget Top,
29 	DialogButtonTypePtr Buttons, size_t Count)
30 {
31 	int		i;
32 
33 	for (i = 0; i < Count; i++)
34 	{
35 		if (!Buttons[i].Label)
36 			continue;
37 		Buttons[i].W  = XtVaCreateManagedWidget(Buttons[i].Name,
38 			commandWidgetClass,
39 			Parent,
40 			((char*)&XtStrings[429]) , Buttons[i].Label,
41 			"fromHoriz" , i ? Buttons[i-1].W : ((void *)0) ,
42 			"fromVert" , Top,
43 			"resizable" , 1 ,
44 			((void *)0) );
45 
46 		XtAddCallback(((char*)&XtStrings[136]),
47 				 Buttons[i].Callback, Buttons[i].ClientData);
48 	}
49 	return(Buttons[Count-1].W);
50 }
51 
52