/*====================================================================*\ FILE : UgAsmMenu.c PURPOSE : Set up the menu structure for the User's Guide sample code HISTORY.. DATE BUILD AUTHOR MODIFICATIONS 04-Dec-97 H-02-02 Philippe $$1 Created from UgMenusSetup.c 10-Dec-97 H-03-32 Philippe $$2 add includes 08-Jan-97 H-03-36 Philippe $$3 add Relations button 11-May-98 I-01-07 CHI $$4 fix include \*====================================================================*/ /*---------------------- Pro/Toolkit Includes ------------------------*/ #include #include #include #include /*---------------------- Application Includes ------------------------*/ #include /*---------------------- Function Prototypes -------------------------*/ int UserAssemblySetup(); int UserSimpRepSetup(); ProError UserComponentSetup(); /*------------------------- External Data ----------------------------*/ extern int UserFundSetup(); extern int UserGeometrySetup(); extern int UserAnimationSetup(); extern int UserRelationsSetup(); extern int UserAsmCompVisit(); extern int UserAsmcompAnimate(); extern int UserSimpRepCreate(); extern int UserSimpRepInfo(); extern ProError UserViewsSetup(); extern ProError UserDimensionsSetup(); extern int UserMenuDeleteAndPop(); extern ProError UserAsmcompTransfGet(); /*====================================================================* Function : UserAssemblySetup() Purpose : Set up the Assembly menu of the User's guide demo \*====================================================================*/ int UserAssemblySetup() { int menu_id, action, status; status = ProMenuFileRegister("UGAssembly", "ugasm.mnu", &menu_id); ERROR_CHECK( "UserAssemblySetup", "ProMenuFileRegister", status ); status = ProMenubuttonActionSet("UGAssembly", "-Fundamentals", (ProMenubuttonAction)UserFundSetup, NULL, PRO_MODE_ASSEMBLY); ERROR_CHECK( "UserAssemblySetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAssembly", "-Geometry", (ProMenubuttonAction)UserGeometrySetup, NULL, PRO_MODE_ASSEMBLY); ERROR_CHECK( "UserAssemblySetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAssembly","-Views", (ProMenubuttonAction)UserViewsSetup, NULL,0); ERROR_CHECK("UserAssemblySetup","ProMenubuttonActionSet()",status); status = ProMenubuttonActionSet("UGAssembly","-Components", (ProMenubuttonAction)UserComponentSetup, NULL,0); ERROR_CHECK("UserAssemblySetup","ProMenubuttonActionSet()",status); status = ProMenubuttonActionSet("UGAssembly","-Relations", (ProMenubuttonAction)UserRelationsSetup, NULL,0); ERROR_CHECK("UserAssemblySetup","ProMenubuttonActionSet()",status); status = ProMenubuttonActionSet("UGAssembly", "-Simp Rep", (ProMenubuttonAction)UserSimpRepSetup, NULL, PRO_MODE_ASSEMBLY); ERROR_CHECK( "UserAssemblySetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAssembly", "-Animation", (ProMenubuttonAction)UserAnimationSetup, NULL, PRO_MODE_ASSEMBLY); ERROR_CHECK( "UserAssemblySetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAssembly", "-Done/Return", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK( "UserAssemblySetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAssembly", "UGAssembly", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK( "UserAssemblySetup", "ProMenubuttonActionSet", status ); status = ProMenuPush(); ERROR_CHECK( "UserAssemblySetup", "ProMenuPush", status ); status = ProMenuCreate(PROMENUTYPE_MAIN, "UGAssembly", &menu_id); ERROR_CHECK( "UserAssemblySetup", "ProMenuCreate", status ); status = ProMenuProcess("UGAssembly", &action); ERROR_CHECK( "UserAssemblySetup", "ProMenuProcess", status ); return (PRO_TK_NO_ERROR); } /*====================================================================* Function : UserComponentSetup() Purpose : Set up the component menu of the user guide examples \*====================================================================*/ ProError UserComponentSetup () { int menu_id, action, status; status = ProMenuFileRegister("AssComp","ugasmcomp.mnu",&menu_id); ERROR_CHECK("UserComponentSetup","ProMenuFileRegister",status); status = ProMenubuttonActionSet("AssComp","-List Components", (ProMenubuttonAction)UserAsmCompVisit, NULL, 0); ERROR_CHECK("UserComponentSetup","ProMenubuttonActionSet",status); status = ProMenubuttonActionSet("AssComp","-Component Transfm", (ProMenubuttonAction)UserAsmcompTransfGet, NULL, 0); ERROR_CHECK("UserComponentSetup","ProMenubuttonActionSet",status); status = ProMenubuttonActionSet("AssComp","-Done/Return", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK("UserComponentSetup","ProMenubuttonActionSet",status); status = ProMenubuttonActionSet("AssComp","AssComp", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK("UserComponentSetup","ProMenubuttonActionSet",status); status = ProMenuPush(); ERROR_CHECK( "UserComponentSetup", "ProMenuPush", status ); status = ProMenuCreate(PROMENUTYPE_MAIN,"AssComp", &menu_id); ERROR_CHECK("UserComponentSetup","ProMenuCreate",status); status = ProMenuProcess("AssComp", &action); ERROR_CHECK( "UserComponentSetup", "ProMenuProcess", status ); return (PRO_TK_NO_ERROR); } /*====================================================================* Function : UserSimpRepSetup() Purpose : Set up the Simplified Rep menu or the User's guide demo \*====================================================================*/ int UserSimpRepSetup() { int menu_id, action, status; status = ProMenuFileRegister("UGSimpRep", "ugsrep.mnu", &menu_id); ERROR_CHECK( "UserSimpRepSetup", "ProMenuFileRegister", status ); status = ProMenubuttonActionSet("UGSimpRep","-Create", (ProMenubuttonAction)UserSimpRepCreate, NULL, 0); ERROR_CHECK( "UserSimpRepSetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGSimpRep","-Info", UserSimpRepInfo, NULL, 0); ERROR_CHECK( "UserSimpRepSetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGSimpRep","-Done/Return", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK( "UserSimpRepSetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGSimpRep","UGSimpRep", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK( "UserSimpRepSetup", "ProMenubuttonActionSet", status ); status = ProMenuPush(); ERROR_CHECK( "UserSimpRepSetup", "ProMenuPush", status ); status = ProMenuCreate(PROMENUTYPE_MAIN, "UGSimpRep", &menu_id); ERROR_CHECK( "UserSimpRepSetup", "ProMenuCreate", status ); status = ProMenuProcess("UGSimpRep", &action); ERROR_CHECK( "UserSimpRepSetup", "ProMenuProcess", status ); return(PRO_TK_NO_ERROR); } /*====================================================================* Function : UserAnimationSetup() Purpose : Set up the Animation Menu \*====================================================================*/ int UserAnimationSetup() { int menu_id, action, status; status = ProMenuFileRegister("UGAnim", "uganim.mnu", &menu_id); ERROR_CHECK( "UserAnimationSetup", "ProMenuFileRegister", status ); status = ProMenubuttonActionSet("UGAnim","-Anim Comp", (ProMenubuttonAction)UserAsmcompAnimate, NULL, 0); ERROR_CHECK( "UserAnimationSetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAnim","-Done/Return", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK( "UserAnimationSetup", "ProMenubuttonActionSet", status ); status = ProMenubuttonActionSet("UGAnim","UGAnim", (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0); ERROR_CHECK( "UserAnimationSetup", "ProMenubuttonActionSet", status ); status = ProMenuPush(); ERROR_CHECK( "UserAnimationSetup", "ProMenuPush", status ); status = ProMenuCreate(PROMENUTYPE_MAIN, "UGAnim", &menu_id); ERROR_CHECK( "UserAnimationSetup", "ProMenuCreate", status ); status = ProMenuProcess("UGAnim", &action); ERROR_CHECK( "UserAnimationSetup", "ProMenuProcess", status ); return(PRO_TK_NO_ERROR); }