Crea botones de cascada, toggle, o normales (estos gadget), en base a type. Lo asocia a parent con la etiqueta str y el acelerador ch.
Devuelve el identificador.
/**************************************************************/

/* Procedure to create a button */

/**************************************************************/

Widget SCreateButton(parent,type,str,ch)
Widget parent;
int type;
char *str,ch;
{
Widget button;
XmString etiqueta;
Arg args[MAX_ARGS];
int n;

etiqueta=XmStringCreateLtoR(str,CHARSET);
n=0;
/*XtSetArg(args[n],XmNmnemonic,ch); n++;*/
XtSetArg(args[n],XmNfontList,fontlist); n++;
XtSetArg(args[n],XmNlabelString,etiqueta); n++;
switch (type) {
case PUSH:
button=(Widget)XmCreatePushButtonGadget(parent,"boton",args,n);
break;
case CASCADE:
button=(Widget)XmCreateCascadeButton(parent,"boton",args,n);
break;
case TOGGLE:
XtSetArg(args[n],XmNvisibleWhenOff,True); n++;
button=(Widget)XmCreateToggleButton(parent,"boton",args,n);
break;
}
XtManageChild(button);
XmStringFree(etiqueta);

return(button);
}