/******************************************************************************
 Form Attachments

 11 Aug 92, tth
*/

#include <stdio.h>
#include <Xm/PushB.h>
#include "sigtypes.h"
#include "xsig_lib.h"


void XsAttach1LTRX(Widget wgt1_a,
		   Widget lfwgt_a, Widget tpwgt_a, Widget rtwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a,
		         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,
                         XmNrightAttachment, XmATTACH_WIDGET,
		         XmNrightWidget,     rtwgt_a,         NULL );
}

void XsAttach1LTFX(Widget wgt1_a, Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,
		         XmNrightAttachment, XmATTACH_FORM,   NULL );
}
void XsAttach1LTFF(Widget wgt1_a, Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,
		         XmNrightAttachment, XmATTACH_FORM,  
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );
}
void XsAttach1LTXF(Widget wgt1_a, Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );
}

void XsAttach1LFFX(Widget wgt1_a, Widget lfwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_FORM,
		         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach1LTXX( Widget wgt1_a, Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a,       
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );
}

void XsAttach1OTXX( Widget wgt1_a, Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_OPPOSITE_WIDGET,
		         XmNleftWidget,      lfwgt_a,       
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );
}

void XsAttach1OOXX( Widget wgt1_a, Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_OPPOSITE_WIDGET,
		         XmNleftWidget,      lfwgt_a,       
                         XmNtopAttachment,   XmATTACH_OPPOSITE_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );
}

void XsAttach1XTRX( Widget wgt1_a, Widget tpwgt_a, Widget rtwgt_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,    
                         XmNrightAttachment, XmATTACH_WIDGET,
		         XmNrightWidget,     rtwgt_a,         NULL );
}

void XsAttach1FTRF( Widget wgt1_a, Widget tpwgt_a, Widget rtwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
		         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,    
                         XmNrightAttachment, XmATTACH_WIDGET,
		         XmNrightWidget,     rtwgt_a,         
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );
}

void XsAttach1XTFF( Widget wgt1_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,    
                         XmNrightAttachment, XmATTACH_FORM,
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );
}

void XsAttach1XTOX( Widget wgt1_a, Widget tpwgt_a, Widget rtwgt_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,    
                         XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET,
		         XmNrightWidget,     rtwgt_a,         NULL );
}

void XsAttach1XTXX( Widget wgt1_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,    NULL );
}


void XsAttach1FTFX( Widget wgt1_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,      
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach1FTXX( Widget wgt1_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );
}
void XsAttach1FTXF( Widget wgt1_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a, 
		         XmNbottomAttachment,XmATTACH_FORM,   NULL );
}

void XsAttach1XTFX( Widget wgt1_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,      
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}
void XsAttach1FTFF( Widget wgt1_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,      
                         XmNleftAttachment,  XmATTACH_FORM,
                         XmNrightAttachment, XmATTACH_FORM,
                         XmNbottomAttachment,XmATTACH_FORM,   NULL );
}


void XsAttach1FFFX( Widget wgt1_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNtopAttachment,   XmATTACH_FORM,
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach1nFFFB( Widget wgts_a[], SINT2 icnt_a )
{
  SINT2 ii;

  for ( ii=0; ii<icnt_a; ii++ )
    {
      if ( ii == 0 ) 
	XsAttach1FFFX( wgts_a[ii] );
      else
	XsAttach1FTFX( wgts_a[ii], wgts_a[ii-1] );
    };

  if ( ii <= 1 )
    XsAttach1XXXF( wgts_a[0] );
  else
    XsAttach1XXXF( wgts_a[ii-1] );
}

void XsAttach1FFXX( Widget wgt1_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );
}
void XsAttach1XFFX( Widget wgt1_a )
{
  XtVaSetValues( wgt1_a, XmNtopAttachment,   XmATTACH_FORM,
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach1FFFB( Widget wgt1_a, Widget btwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNtopAttachment,   XmATTACH_FORM,
                         XmNrightAttachment, XmATTACH_FORM,
		         XmNbottomAttachment,XmATTACH_WIDGET,
	                 XmNbottomWidget,    btwgt_a, NULL );
}
void XsAttach1FTFB( Widget wgt1_a, Widget tpwgt_a, Widget btwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,
                         XmNrightAttachment, XmATTACH_FORM,
		         XmNbottomAttachment,XmATTACH_WIDGET,
	                 XmNbottomWidget,    btwgt_a, NULL );
}
void XsAttach1FXFF( Widget wgt1_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNrightAttachment, XmATTACH_FORM,
		         XmNbottomAttachment,XmATTACH_FORM, NULL );
}
void XsAttach1FXXF( Widget wgt1_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
		         XmNbottomAttachment,XmATTACH_FORM, NULL );
}

void XsAttach1LXXF(Widget wgt1_a, Widget lfwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a, 
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );
}

void XsAttach1XXXF(Widget wgt1_a)
{
  XtVaSetValues( wgt1_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );
}


/*-----------------------------------------------------------------------------
*/
void XsAttach2LTXX( Widget wgt1_a, Widget wgt2_a,  
		    Widget lfwgt_a,Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );


  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );
}
/*-----------------------------------------------------------------------------
*/
void XsAttach2LFFX( Widget wgt1_a, Widget wgt2_a, Widget lfwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );


  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,
                         XmNtopAttachment,   XmATTACH_FORM,
		         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach2LFXX( Widget wgt1_a, Widget wgt2_a, Widget lfwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      lfwgt_a, 
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );


  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,
                         XmNtopAttachment,   XmATTACH_FORM, NULL );
}

void XsAttach2XTRX( Widget wgt1_a,  Widget wgt2_a,  
	            Widget tpwgt_a, Widget rtwgt_a )
{
  XtVaSetValues( wgt2_a, XmNrightAttachment,  XmATTACH_WIDGET,
		         XmNrightWidget,      rtwgt_a, 
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt1_a, XmNrightAttachment,  XmATTACH_WIDGET,
	                 XmNrightWidget,      wgt2_a,
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );
}

void XsAttach2LTRX( Widget wgt1_a,  Widget wgt2_a,  
	           Widget lfwgt_a, Widget tpwgt_a, Widget rtwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a,       
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      wgt1_a,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a, 
                         XmNrightAttachment, XmATTACH_WIDGET,
	                 XmNrightWidget,     rtwgt_a,         NULL );
}

void XsAttach2LTFX( Widget wgt1_a,  Widget wgt2_a,  
	           Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      lfwgt_a,       
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
		         XmNleftWidget,      wgt1_a,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
		         XmNtopWidget,       tpwgt_a, 
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}


void XsAttach2FTXX( Widget wgt1_a, Widget wgt2_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );
}
void XsAttach2FTXF( Widget wgt1_a, Widget wgt2_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         
		         XmNbottomAttachment,XmATTACH_FORM, NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
		         XmNbottomAttachment,XmATTACH_FORM, NULL );
}

void XsAttach2XTFX( Widget wgt1_a, Widget wgt2_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt2_a, XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
                         XmNrightAttachment, XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt1_a, XmNrightAttachment, XmATTACH_WIDGET,  
	                 XmNrightWidget,     wgt2_a, 
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

}


void XsAttach2FTFX( Widget wgt1_a, Widget wgt2_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}
void XsAttach2FTFF( Widget wgt1_a, Widget wgt2_a,  Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,
                         XmNbottomAttachment,  XmATTACH_FORM,  NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
                         XmNrightAttachment, XmATTACH_FORM,
                         XmNbottomAttachment,  XmATTACH_FORM,  NULL );
}
void XsAttach2FFFX( Widget wgt1_a, Widget wgt2_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}
void XsAttach2FFXX( Widget wgt1_a, Widget wgt2_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );
}
void XsAttach2FXXF( Widget wgt1_a, Widget wgt2_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,    XmATTACH_FORM,
                 wgt1_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,       wgt1_a,      		       
                         XmNbottomAttachment,  XmATTACH_FORM, NULL );
}
void XsAttach2XXXF( Widget wgt1_a, Widget wgt2_a )
{
  XtVaSetValues( wgt1_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );
  XtVaSetValues( wgt2_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );
}

/*-----------------------------------------------------------------------------
*/
void XsAttach3FTXX( Widget wgt1_a,Widget wgt2_a,Widget wgt3_a,Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );
}

void XsAttach3FTXF( Widget wgt1_a,Widget wgt2_a,Widget wgt3_a,Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,        
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
		         XmNbottomAttachment,XmATTACH_FORM,  NULL );
}


void XsAttach3FFXX( Widget wgt1_a,Widget wgt2_a,Widget wgt3_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_FORM, NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );
}

void XsAttach3FFFX( Widget wgt1_a,Widget wgt2_a,Widget wgt3_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM, 
		         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach3LFFX( Widget wgt1_a,Widget wgt2_a,Widget wgt3_a,Widget lfwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,  
	                 XmNleftWidget,      lfwgt_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_FORM, 
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

void XsAttach3FTFX(Widget wgt1_a,Widget wgt2_a,Widget wgt3_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_FORM,  
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
                         XmNrightAttachment, XmATTACH_FORM,   NULL );
}

/*-----------------------------------------------------------------------------
*/
void XsAttach3LTFX( Widget wgt1_a,  Widget wgt2_a,  Widget wgt3_a,
		    Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,  
	                 XmNleftWidget,      lfwgt_a,
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,
		         XmNrightAttachment, XmATTACH_FORM,   NULL );
}
/*-----------------------------------------------------------------------------
*/
void XsAttach3LTXX( Widget wgt1_a,  Widget wgt2_a,  Widget wgt3_a,
		    Widget lfwgt_a, Widget tpwgt_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,  XmATTACH_WIDGET,  
	                 XmNleftWidget,      lfwgt_a,
                         XmNtopAttachment,   XmATTACH_WIDGET,
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt1_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,  XmATTACH_WIDGET,
	                 XmNleftWidget,      wgt2_a,      		       
                         XmNtopAttachment,   XmATTACH_WIDGET,   
	                 XmNtopWidget,       tpwgt_a,         NULL );
}

void XsAttach3FXXF( Widget wgt1_a,Widget wgt2_a,Widget wgt3_a )
{
  XtVaSetValues( wgt1_a, XmNleftAttachment,     XmATTACH_FORM,  
                         XmNbottomAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt2_a, XmNleftAttachment,     XmATTACH_WIDGET,
	                 XmNleftWidget,         wgt1_a,      		       
                         XmNbottomAttachment,   XmATTACH_FORM,   NULL );

  XtVaSetValues( wgt3_a, XmNleftAttachment,     XmATTACH_WIDGET,
	                 XmNleftWidget,         wgt2_a,      		       
                         XmNbottomAttachment,   XmATTACH_FORM, NULL );
}
void XsAttach3XXXF( Widget wgt1_a, Widget wgt2_a, Widget wgt3_a )
{
  XtVaSetValues( wgt1_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );
  XtVaSetValues( wgt2_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );
  XtVaSetValues( wgt3_a, XmNbottomAttachment,  XmATTACH_FORM, NULL );
}


void XsOffsetsLXXX( Widget wgt1_a, SINT2 ioff_a )
{
  XtVaSetValues( wgt1_a, XmNleftOffset, ioff_a, NULL );
}
void XsOffsetsXTXX( Widget wgt1_a, SINT2 ioff_a )
{
  XtVaSetValues( wgt1_a, XmNtopOffset, ioff_a, NULL );
}
void XsOffsetsXXRX( Widget wgt1_a, SINT2 ioff_a )
{
  XtVaSetValues( wgt1_a, XmNrightOffset, ioff_a, NULL );
}
void XsOffsetsXXXB( Widget wgt1_a, SINT2 ioff_a )
{
  XtVaSetValues( wgt1_a, XmNbottomOffset, ioff_a, NULL );
}

void XsOffsetsLTRB( Widget wgt1_a,
		    SINT2 ilf_a, SINT2 itp_a, SINT2 irt_a, SINT2 ibt_a )
{
  XtVaSetValues( wgt1_a, XmNleftOffset,  ilf_a,
		         XmNtopOffset,   itp_a, 
		         XmNrightOffset, irt_a,
		         XmNbottomOffset,ibt_a, NULL );
}

void XsOffsetsLXRB( Widget wgt1_a,
		    SINT2 ilf_a, SINT2 irt_a, SINT2 ibt_a )
{
  XtVaSetValues( wgt1_a, XmNleftOffset,  ilf_a,
		         XmNrightOffset, irt_a,
		         XmNbottomOffset,ibt_a, NULL );
}

void XsOffsetsLTXX( Widget wgt1_a, SINT2 ilf_a, SINT2 itp_a )
{
  XtVaSetValues( wgt1_a, XmNleftOffset, ilf_a,
		         XmNtopOffset,  itp_a,   NULL );
}

void XsOffsetsXTRX( Widget wgt1_a, SINT2 itp_a, SINT2 irt_a )
{
  XtVaSetValues( wgt1_a, XmNrightOffset, irt_a,
		         XmNtopOffset,   itp_a,   NULL );
}




