/******************************************************************************* Association.c *******************************************************************************/ #include #include "UxLib.h" #include "UxLabel.h" #include "UxPushB.h" #include "UxText.h" #include "UxTogB.h" #include "UxRowCol.h" #include "UxScrW.h" #include "UxForm.h" #include "UxTranSh.h" /******************************************************************************* Includes, Defines, and Global variables from the Declarations Editor: *******************************************************************************/ #include /******************************************************************************* The definition of the context structure: If you create multiple instances of your interface, the context structure ensures that your callbacks use the variables for the correct instance. For each swidget in the interface, each argument to the Interface function, and each variable in the Instance Specific section of the Declarations Editor, there is an entry in the context structure. and a #define. The #define makes the variable name refer to the corresponding entry in the context structure. *******************************************************************************/ typedef struct { swidget UxAssociation; swidget Uxform5; swidget UxscrolledWindow5; swidget UxrowColumn2; swidget Uxt_1; swidget Uxt1_1; swidget Uxt2_1; swidget Uxt_2; swidget Uxt_3; swidget Uxt_4; swidget Uxt_5; swidget Uxt_6; swidget Uxt1_2; swidget Uxt1_3; swidget Uxt1_4; swidget Uxt1_5; swidget Uxt1_6; swidget Uxt2_2; swidget Uxt2_3; swidget Uxt2_4; swidget Uxt2_5; swidget Uxt3_1; swidget Uxp_1; swidget Uxp_2; swidget Uxt2_6; swidget Uxt3_2; swidget Uxt3_3; swidget Uxt3_4; swidget Uxt3_5; swidget Uxt3_6; swidget Uxp_3; swidget Uxp_4; swidget Uxp_5; swidget Uxp_6; swidget Uxlabel18; swidget Uxtext4; swidget Uxtext5; swidget UxpushButton1; swidget UxpushButton7; swidget Uxlabel20; } _UxCAssociation; #define Association UxAssociationContext->UxAssociation #define form5 UxAssociationContext->Uxform5 #define scrolledWindow5 UxAssociationContext->UxscrolledWindow5 #define rowColumn2 UxAssociationContext->UxrowColumn2 #define t_1 UxAssociationContext->Uxt_1 #define t1_1 UxAssociationContext->Uxt1_1 #define t2_1 UxAssociationContext->Uxt2_1 #define t_2 UxAssociationContext->Uxt_2 #define t_3 UxAssociationContext->Uxt_3 #define t_4 UxAssociationContext->Uxt_4 #define t_5 UxAssociationContext->Uxt_5 #define t_6 UxAssociationContext->Uxt_6 #define t1_2 UxAssociationContext->Uxt1_2 #define t1_3 UxAssociationContext->Uxt1_3 #define t1_4 UxAssociationContext->Uxt1_4 #define t1_5 UxAssociationContext->Uxt1_5 #define t1_6 UxAssociationContext->Uxt1_6 #define t2_2 UxAssociationContext->Uxt2_2 #define t2_3 UxAssociationContext->Uxt2_3 #define t2_4 UxAssociationContext->Uxt2_4 #define t2_5 UxAssociationContext->Uxt2_5 #define t3_1 UxAssociationContext->Uxt3_1 #define p_1 UxAssociationContext->Uxp_1 #define p_2 UxAssociationContext->Uxp_2 #define t2_6 UxAssociationContext->Uxt2_6 #define t3_2 UxAssociationContext->Uxt3_2 #define t3_3 UxAssociationContext->Uxt3_3 #define t3_4 UxAssociationContext->Uxt3_4 #define t3_5 UxAssociationContext->Uxt3_5 #define t3_6 UxAssociationContext->Uxt3_6 #define p_3 UxAssociationContext->Uxp_3 #define p_4 UxAssociationContext->Uxp_4 #define p_5 UxAssociationContext->Uxp_5 #define p_6 UxAssociationContext->Uxp_6 #define label18 UxAssociationContext->Uxlabel18 #define text4 UxAssociationContext->Uxtext4 #define text5 UxAssociationContext->Uxtext5 #define pushButton1 UxAssociationContext->UxpushButton1 #define pushButton7 UxAssociationContext->UxpushButton7 #define label20 UxAssociationContext->Uxlabel20 static _UxCAssociation *UxAssociationContext; /******************************************************************************* Forward declarations of functions that are defined later in this file. *******************************************************************************/ swidget create_Association(); /******************************************************************************* The following are callback functions. *******************************************************************************/ static void activateCB_p_1( UxWidget, UxClientData, UxCallbackArg ) Widget UxWidget; XtPointer UxClientData, UxCallbackArg; { _UxCAssociation *UxSaveCtx, *UxContext; swidget UxThisWidget; UxThisWidget = UxWidgetToSwidget( UxWidget ); UxSaveCtx = UxAssociationContext; UxAssociationContext = UxContext = (_UxCAssociation *) UxGetContext( UxThisWidget ); { extern swidget asso; extern Widget arow1[20],arow2[20],arow3[20],arow4[20]; char mytext[8]; Widget tl; int rows = 5; int i; extern int arowno; XtVaSetValues(UxGetWidget(UxFindSwidget("rowasso")),XmNnumColumns,rows,NULL); if (!arow1[0]) { arowno = 5; for (i=0; i