/*====================================================================*\
FUNCTION : ProTestRadioButtonValue()
PURPOSE : Set value for radio group
\*====================================================================*/
extern "C"int ProTestRadioButtonValue(
uiCmdCmdId command,
uiCmdValue *p_value)
{
ProError err;
ProMenuItemName name;
return(0);
}
/*====================================================================*\
FUNCTION : ProTestCheckButtonValue()
PURPOSE : Set new value for check buttons
\*====================================================================*/
extern "C"int ProTestCheckButtonValue(
uiCmdCmdId command,
uiCmdValue *p_value)
{
ProError err;
ProBoolean bool;
int i;
for (i=0; i<sizeof(check_but)/sizeof(check_but[0]); i++)
if (check_but[i].command == command)
{
err = ProMenubarmenuChkbuttonValueGet (p_value, &bool);
break;
}
return(0);
}
/*====================================================================*\
FUNCTION : ProTestCheckButton()
PURPOSE : Callback function for check button options
\*====================================================================*/
extern "C"int ProTestCheckButton(
uiCmdCmdId command,
uiCmdValue *p_value,
void *p_push_command_data)
{
int i;
ProMessageDisplay(msgfil, "TEST Check Button pressed.");
for (i=0; i<sizeof(check_but)/sizeof(check_but[0]); i++)
if (check_but[i].command == command)
{
/* Change state of pressed button */
check_but[i].state = !check_but[i].state;
break;
}
return(0);
}
/*============================================================================*\
Function : ProTestMenuBar
Purpose : Create a menu to test Menu Bar functions
\*============================================================================*/
extern "C"int ProTestMenuBar()
{
ProError err;
uiCmdCmdId push_act, push_act2, action;
uiCmdCmdId radio_act;
int i;
static ProMenuItemName radio_group_items[]=
{"TestRadio1", "TestRadio2", "TestRadio3", ""};
static ProMenuItemLabel radio_group_labels[]=
{"Radio button 1", "Radio button 2", "Radio button 3", ""};
static ProMenuLineHelp radio_group_help[]=
{"Test radio button", "Test radio button", "Test radio button", ""};
/*---------------------------------------------------------------------*\
Add new button to the menu bar
\*---------------------------------------------------------------------*/
err = ProMenubarMenuAdd( "TestMenuBar", "-MenuBar", "Help", PRO_B_FALSE,
msgfil);