/*
	Copyright (c) 2024 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.
*/



/*---------------------- Pro/Toolkit Includes ------------------------*/

#include <ProToolkit.h>
#include <ProMenu.h>
#include <ProMdl.h>
#include <ProMode.h>

/*---------------------- Application Includes ------------------------*/
#include <TestError.h>

extern int UserMenuDeleteAndPop();
extern int UserIGESGeomflagsExport();

/*====================================================================*\
FUNCTION: UserInterfaceSetup()
PURPOSE:  Set up the interface operations menu
\*====================================================================*/
int UserInterfaceSetup()
{
  int menu_id, action, status;

  status = ProMenuFileRegister("UGINTERFACE", "uginterface.mnu", &menu_id);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenuFileRegister", status );

  status = ProMenubuttonActionSet("UGINTERFACE","-Export IGES",
     (ProMenubuttonAction)UserIGESGeomflagsExport, NULL, 0);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenubuttonActionSet", status );

  status = ProMenubuttonActionSet("UGINTERFACE","-Export Shrinkwrap",
     (ProMenubuttonAction)UserShrinkwrapExport, NULL, 0);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenubuttonActionSet", status );

  status = ProMenubuttonActionSet("UGINTERFACE","-Create Shrinkwrap Solid",
     (ProMenubuttonAction)UserNewShrinkwrapCreate, NULL, 0);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenubuttonActionSet", status );

  status = ProMenubuttonActionSet("UGINTERFACE","-Import IGES",
     (ProMenubuttonAction)UserIGESImportViaFilter, NULL, 0);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenubuttonActionSet", status );

  status = ProMenubuttonActionSet("UGINTERFACE", "-Done/Return",
     (ProMenubuttonAction)UserMenuDeleteAndPop, NULL,0);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenubuttonActionSet", status );

  status = ProMenubuttonActionSet("UGINTERFACE", "UGINTERFACE",
     (ProMenubuttonAction)UserMenuDeleteAndPop, NULL, 0);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenubuttonActionSet", status );

  status = ProMenuPush();
  ERROR_CHECK( "UserInterfaceSetup", "ProMenuPush", status );

  status = ProMenuCreate(PROMENUTYPE_MAIN, "UGINTERFACE", &menu_id);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenuCreate", status );

  status = ProMenuProcess("UGINTERFACE", &action);
  ERROR_CHECK( "UserInterfaceSetup", "ProMenuProcess", status );

  return(PRO_TK_NO_ERROR);	
}