Category Creo Parametric user interface, Object ProPopupmenu

Function ProPopupmenuButtonAdd


Description
Add a new item to a Creo Parametric popup menu. This function supports pushbutton and checkbutton commands created by ProCmdActionAdd() and ProCmdOptionAdd().
Synopsis
#include <ProPopupmenu.h>
ProErrorProPopupmenuButtonAdd(
ProPopupMenuId menu_id
/* (In)
The id of the Popup menu.
*/
int position
/* (In)
Position at which to add the menubutton. Pass PRO_VALUE_UNUSED to append to the end of the relevant menu.
*/
ProMenuName button_name
/* (In)
The button name in the Popup Menu (must be unique)
*/
ProLine button_label
/* (In)
The button label. To localize this obtain and pass a message string from ProMessageToBuffer().
*/
ProLine button_helptext
/* (In)
The button helptext. To localize this obtain and pass a message string from ProMessageToBuffer().
*/
uiCmdCmdId cmd_id
/* (In)
The command name.
*/
ProPopupmenuAccessFunction access_status
/* (In)
The accessibility function for the added Menu Item. This function is in addition to the command accessibility function. This argument is allowed to be NULL, in which case the item accessibility will be the command accessibility.
*/
ProAppData appdata
/* (In)
Application data to be supplied to the access function. This argument is allowed to be NULL.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully added a menu item.
PRO_TK_BAD_INPUTSOne or more arguments was invalid.
PRO_TK_E_FOUNDButton already exists.
PRO_TK_INVALID_TYPEThe command type is not supported.
PRO_TK_INVALID_ITEMInvalid command.

Manual References:

  1. User Interface: Menus, Commands, and Popupmenus: Checking the Access State of a Popup Menu Item
  2. User Interface: Menus, Commands, and Popupmenus: Checking the Access State of a Popup Menu Item
  3. User Interface: Menus, Commands, and Popupmenus: Adding a Button to the Model Tree Popup Menu

Sample Code References:

  1. pt_userguide ( UgPopupmenus.c )
  2. pt_userguide ( UgPopupmenus.c )
  3. pt_userguide ( UgPopupmenus.c )
  4. pt_userguide ( UgPopupmenus.c )
  5. pt_userguide ( UgPopupmenus.c )
  6. pt_userguide ( UgPopupmenus.c )
  7. pt_userguide ( UgPopupmenus.c )
  8. pt_userguide ( UgPopupmenus.c )
  9. pt_userguide ( UgPopupmenus.c )