/*============================================================================*\ FILE : TestMenuBar.c PURPOSE : Menu bar function testing for Pro/TOOLKIT HISTORY.. DATE BUILD AUTHOR MODIFICATIONS 29-Sep-97 H-03-38 Pavel $$1 Created 03-Mar-98 H-03-40 Pavel $$2 Allows to add radio group 18-Sep-98 I-01-23 Alexey $$3 Add ProCmdBracketFuncAdd test 31-May-99 I-03-11 mka $$4 Delete unused variable \*============================================================================*/ /*----------------------------------------------------------------------------*\ Pro/TOOLKIT includes \*----------------------------------------------------------------------------*/ #include #include #include #include #include #include /*----------------------------------------------------------------------------*\ Application includes \*----------------------------------------------------------------------------*/ #include "TestError.h" #include "TestMenu.h" #include "UtilMessage.h" /*----------------------------------------------------------------------------*\ Application data types \*----------------------------------------------------------------------------*/ typedef struct user_command { char *name; uiCmdCmdId id; } UserCommand; typedef struct user_check_but { uiCmdCmdId command; ProBoolean state; } UserCheckBut; typedef struct user_push_but { char *action_name; uiCmdCmdActFn action_cb; char *button_name; char *button_label; char *button_help; } UserPushButton; /*----------------------------------------------------------------------------*\ Application global/external data \*----------------------------------------------------------------------------*/ static wchar_t msgfil[] = { 'm','e','n','u','b','a','r','_','m','s','g','.','t','x','t','\0'}; static UserCheckBut check_but[2]; static uiCmdAccessState access_state = ACCESS_AVAILABLE; static FILE *log_file = NULL; static UserCommand user_actions[] = { {"TestPushButtonAct1", (uiCmdCmdId)NULL}, {"TestPushButtonAct2", (uiCmdCmdId)NULL}, {"TestCheckButtonOpt1", (uiCmdCmdId)NULL}, {"TestCheckButtonOpt2", (uiCmdCmdId)NULL}, {"TestRadioGroupOpt", (uiCmdCmdId)NULL}}; /*====================================================================*\ FUNCTION : ProUtilLogFileWrite() PURPOSE : Write message to the log file \*====================================================================*/ static void ProUtilLogFileWrite( char *func_type, uiCmdCmdId command) { int i; if (log_file == NULL) return; if (command == NULL) { fprintf(log_file, "%s function is called.\n", func_type); printf( "%s function is called.\n", func_type); return; } for (i=0; i