Functions
TextPull-downMenu Item

Functions

StatusInt mdlDialog_textPDMItemGetInfo (TextPDM_Item *textPDMInfoP, DItem_PulldownMenuItem *menuItemP)
 Gets information about the Text Pull-down Menu item specified by menuItemP in the TextPDM_Item structure pointed to by textPDMInfoP. More...
 
StatusInt mdlDialog_textPDMItemSetInfo (DItem_PulldownMenuItem *menuItemP, TextPDM_Item *textPDMInfoP, TextPDM_ItemModify *textPDMModifyP)
 Sets information in the Text Pull-down Menu item specified by menuItemP using the TextPDM_Item structure pointed to by textPDMInfoP, and the TextPDM_ItemModify variable pointed to by textPDMModifyP. More...
 
StatusInt mdlDialog_textPDMItemSetEnabled (DItem_PulldownMenuItem *menuItemP, bool enabled)
 Sets the enabled state (enabled or disabled) of the Text Pull-down Menu item specified by menuItemP to the value specified by enabled. More...
 
StatusInt mdlDialog_textPDMItemSetLabel (DItem_PulldownMenuItem *menuItemP, WCharCP labelP)
 Sets the label of the Text Pull-down Menu item specified by menuItemP to the string pointed to by labelP. More...
 
StatusInt mdlDialog_textPDMItemInsert (DItem_PulldownMenu *menuP, DItem_PulldownMenuItem *menuItemP, TextPDM_Item *textPDMInfoP, TextPDM_ItemModify *textPDMModifyP)
 Inserts the Text Pull-down Menu item specified by textPDMInfoP and the TextPDM_ItemModify variable pointed to by textPDMModifyP into a Text Pull-down Menu. More...
 
StatusInt mdlDialog_textPDMItemIns (DItem_PulldownMenuItem *newMenuItemP, DItem_PulldownMenu *menuP, DItem_PulldownMenuItem *menuItemP, TextPDM_Item *textPDMInfoP, TextPDM_ItemModify *textPDMModifyP)
 Inserts the Text Pull-down Menu item specified by textPDMInfoP and the TextPDM_ItemModify variable pointed to by textPDMModifyP into a Text Pull-down Menu. More...
 
StatusInt mdlDialog_textPDMItemSetIcon (DItem_PulldownMenuItem *menuItemP, RscId *iconIdP, RscType *iconTypeP, MdlDesc **iconOwnerMDP, bool pressed)
 Sets the icon information for a PulldownMenuItem or PulldownIconMenuItem. More...
 
StatusInt mdlDialog_textPDMItemSetIconName (DItem_PulldownMenuItem *menuItemP, WCharCP iconNameP, Point2d *sizeP, bool pressed)
 Sets the icon information for a PulldownMenuItem or PulldownIconMenuItem. More...
 
StatusInt mdlDialog_textPDMItemGetIcon (RscId *iconIdP, RscType *iconTypeP, MdlDesc **iconOwnerMDP, bool *pressedP, DItem_PulldownMenuItem *menuItemP)
 Gets the icon that is specified for the given pulldown menu item. More...
 
StatusInt mdlDialog_textPDMItemSetPressedIcon (DItem_PulldownMenuItem *menuItemP, RscId *iconIdP, RscType *iconTypeP, MdlDesc **iconOwnerMDP)
 Sets the pressed icon id type and owner of the specified pulldown menu item. More...
 

Detailed Description

Function Documentation

StatusInt mdlDialog_textPDMItemGetIcon ( RscId iconIdP,
RscType iconTypeP,
MdlDesc **  iconOwnerMDP,
bool *  pressedP,
DItem_PulldownMenuItem menuItemP 
)

Gets the icon that is specified for the given pulldown menu item.

Any of the parameters receiving information back from this function can be set to NULL if that information is not required.

Parameters
[out]iconIdPis the Id of the icon.
[out]iconTypePis the icon type of the specified pull down menu item.
[out]iconOwnerMDPis the owner MD of the icon.
[out]pressedPindicates the pressed state of the icon, true if the pressed state is set.
[in]menuItemPspecifies the pulldown menu item to get the icon information from.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_textPDMItemSetPressedIcon
StatusInt mdlDialog_textPDMItemGetInfo ( TextPDM_Item textPDMInfoP,
DItem_PulldownMenuItem menuItemP 
)

Gets information about the Text Pull-down Menu item specified by menuItemP in the TextPDM_Item structure pointed to by textPDMInfoP.

Remarks
The TextPDM_Item structure (declared in dlogitem.h) contains fields analogous to those found in the DItem_PulldownMenuItemRsc structure. See the "Text Pull-down Menu" section of the "Standard Dialog Items" chapter for more information on the DItem_PulldownMenuItemRsc structure.
The TextPDM_ItemModify structure (also declared in dlogitem.h) contains one bitfield for each field of a TextPDM_Item structure. Setting a bitfield in the TextPDM_ItemModify structure to true indicates the corresponding field in the TextPDM_Item should be used when setting information in a Text Pull-down Menu item with the mdlDialog_textPDMItemSetInfo function. If a bitfield is false, the corresponding field in the text Pull-Down menu item is unchanged.
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem..
Parameters
[in]textPDMInfoPtext menu item info
[in]menuItemPText Pulldown item to get info on
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to a Text Pull-down Menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_textPDMItemSetInfo
StatusInt mdlDialog_textPDMItemIns ( DItem_PulldownMenuItem newMenuItemP,
DItem_PulldownMenu menuP,
DItem_PulldownMenuItem menuItemP,
TextPDM_Item textPDMInfoP,
TextPDM_ItemModify textPDMModifyP 
)

Inserts the Text Pull-down Menu item specified by textPDMInfoP and the TextPDM_ItemModify variable pointed to by textPDMModifyP into a Text Pull-down Menu.

Parameters
[out]newMenuItemPin mdlDialog_textPDMItemIns (which makes mdlDialog_textPDMItemInsert obsolete) specifies a non-NULL pointer to a memory area allocated by the application program into which the newly created PulldownMenuItem information can be copied upon successful insertion of the item into the menu. This information is useful if further operations are to be performed on the newly created item.
[in]menuPmenu to insert into
[in]menuItemPspecifies the Text Pull-down Menu item before which the new menu item is to be inserted. If menuItemP is NULL, the menu item is appended to the end of the menu specified by menuP, which must not also be NULL. If menuItemP is not NULL, menuP can be set to NULL, since the Text Pull-down Menu to insert into can be determined from a valid pointer to a Text Pull-down Menu item.
[in]textPDMInfoPtext menu item info
[in]textPDMModifyPmodify info
Remarks
The TextPDM_Item structure (declared in dlogitem.h) contains fields analogous to those found in the DItem_PulldownMenuItemRsc structure. See the "Text Pull-down Menu" section of the "Standard Dialog Items" chapter for more information on the DItem_PulldownMenuItemRsc structure.
The TextPDM_ItemModify structure (also declared in dlogitem.h) contains one bitfield for each field of a TextPDM_Item structure. Setting a bitfield in the TextPDM_ItemModify structure to true indicates the corresponding field in the TextPDM_Item should be used when creating the new Text Pull- down menu item. If a bitfield is false, an appropriate default value will be used for the corresponding field.
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
Returns
SUCCESS, or non-zero value if an error occurs.
Related Structs
typedef struct textpdm_item Text Pulldown menu item info
{
DItem_PulldownMenu submenu; Resource info for
sub-menu
byte enabled; True if item enabled
byte mark; Item mark value
UInt32 helpInfo; help info
UInt32 helpType;
WChar *helpTaskIdP;
long pulldownItemHookId; Item hook data
long pulldownSearchId;
CommandNumber commandNumber; Command assoc. with item
WChar *commandTaskIdP;
WChar *unparsedP;
char *labelP; Item text label
UInt32 accelerator;
int mnemonic;
int mneIndex;
typedef struct textpdm_itemmodify
{ Set each bit for corresponding item
UInt32 submenu:1; item in TextPDM_Item struct initted
UInt32 enabled:1;
UInt32 mark:1;
UInt32 helpInfo:1;
UInt32 helpType:1;
UInt32 helpTaskIdP:1;
UInt32 pulldownItemHookId:1;
UInt32 pulldownSearchId:1;
UInt32 commandNumber:1;
UInt32 commandTaskIdP:1;
UInt32 unparsedP:1;
UInt32 labelP:1;
UInt32 acceleratorP:1;
UInt32 mnemonic:1;
UInt32 mneIndex:1;
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem
StatusInt mdlDialog_textPDMItemInsert ( DItem_PulldownMenu menuP,
DItem_PulldownMenuItem menuItemP,
TextPDM_Item textPDMInfoP,
TextPDM_ItemModify textPDMModifyP 
)

Inserts the Text Pull-down Menu item specified by textPDMInfoP and the TextPDM_ItemModify variable pointed to by textPDMModifyP into a Text Pull-down Menu.

Parameters
[in]menuPmenu to insert into
[in]menuItemPspecifies the Text Pull-down Menu item before which the new menu item is to be inserted. If menuItemP is NULL, the menu item is appended to the end of the menu specified by menuP, which must not also be NULL. If menuItemP is not NULL, menuP can be set to NULL, since the Text Pull-down Menu to insert into can be determined from a valid pointer to a Text Pull-down Menu item.
[in]textPDMInfoPtext menu item info
[in]textPDMModifyPmodify info
Remarks
The TextPDM_Item structure (declared in dlogitem.h) contains fields analogous to those found in the DItem_PulldownMenuItemRsc structure. See the "Text Pull-down Menu" section of the "Standard Dialog Items" chapter for more information on the DItem_PulldownMenuItemRsc structure.
The TextPDM_ItemModify structure (also declared in dlogitem.h) contains one bitfield for each field of a TextPDM_Item structure. Setting a bitfield in the TextPDM_ItemModify structure to true indicates the corresponding field in the TextPDM_Item should be used when creating the new Text Pull- down menu item. If a bitfield is false, an appropriate default value will be used for the corresponding field.
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
Returns
SUCCESS, or a non-zero value if an error occurs.
Related Structs
typedef struct textpdm_item Text Pulldown menu item info
{
sub-menu
byte enabled; True if item enabled
byte mark; Item mark value
UInt32 helpInfo; help info
long pulldownItemHookId; Item hook data
CommandNumber commandNumber; Command assoc. with item
char *labelP; Item text label
UInt32 accelerator;
int mnemonic;
int mneIndex;
typedef struct textpdm_itemmodify
{ Set each bit for corresponding item
UInt32 submenu:1; item in TextPDM_Item struct initted
UInt32 enabled:1;
UInt32 mark:1;
UInt32 helpInfo:1;
UInt32 helpType:1;
UInt32 helpTaskIdP:1;
UInt32 pulldownItemHookId:1;
UInt32 pulldownSearchId:1;
UInt32 commandNumber:1;
UInt32 commandTaskIdP:1;
UInt32 unparsedP:1;
UInt32 labelP:1;
UInt32 acceleratorP:1;
UInt32 mnemonic:1;
UInt32 mneIndex:1;
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_textPDMItemIns
StatusInt mdlDialog_textPDMItemSetEnabled ( DItem_PulldownMenuItem menuItemP,
bool  enabled 
)

Sets the enabled state (enabled or disabled) of the Text Pull-down Menu item specified by menuItemP to the value specified by enabled.

If enabled is true, the Text Pull-down Menu item is drawn with normal bold text and the user can select the item. If enabled is false, the Pull-Down menu item is drawn with dimmed text and the user cannot select the item.

Parameters
[in]menuItemPmenu item to set
[in]enabledtrue if enabled
Remarks
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
These functions are usually called as part of an item hook function attached to a Menu Bar item. The DITEM_MESSAGE_BUTTON message should be trapped with buttonTrans equal to BUTTONTRANS_DOWN. This message is sent when the data button is pressed inside a Menu Bar item and before any Pull-Down menus are displayed. Trapping this message allows the state, label, or mark of all Text Pull-down Menu items to be correctly set before the menus are displayed.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to a Text Pull-down Menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_textPDMItemSetLabel mdlDialog_textPDMItemSetMark
StatusInt mdlDialog_textPDMItemSetIcon ( DItem_PulldownMenuItem menuItemP,
RscId iconIdP,
RscType iconTypeP,
MdlDesc **  iconOwnerMDP,
bool  pressed 
)

Sets the icon information for a PulldownMenuItem or PulldownIconMenuItem.

Parameters
[in]menuItemPpoints to the RawItemHdr for the PulldownMenuItem or PulldownIconMenuItem
[in]iconIdPpoints to a long representing the id of the icon to be used
[in]iconTypePpoints to an unsigned long representing the type of icon to be used
[in]iconOwnerMDPpoints to the MDL Descriptor of the icon to be used
[in]pressedindicates whether the icon should be pressed
Returns
SUCCESS, or a non-zero value if the menuItemP is invalid.
See also
mdlDialog_toggleButtonSetInfo
StatusInt mdlDialog_textPDMItemSetIconName ( DItem_PulldownMenuItem menuItemP,
WCharCP  iconNameP,
Point2d *  sizeP,
bool  pressed 
)

Sets the icon information for a PulldownMenuItem or PulldownIconMenuItem.

Parameters
[in]menuItemPpoints to the RawItemHdr for the PulldownMenuItem or PulldownIconMenuItem
[in]iconNamePpoints to a character string representing the name of the icon to be used
[in]sizePpoints to Point2d representing the width and height of the icon to be used
[in]pressedindicates whether the icon should be pressed
Returns
SUCCESS, or a non-zero value if the menuItemP is invalid.
See also
mdlDialog_textPDMItemSetIcon
StatusInt mdlDialog_textPDMItemSetInfo ( DItem_PulldownMenuItem menuItemP,
TextPDM_Item textPDMInfoP,
TextPDM_ItemModify textPDMModifyP 
)

Sets information in the Text Pull-down Menu item specified by menuItemP using the TextPDM_Item structure pointed to by textPDMInfoP, and the TextPDM_ItemModify variable pointed to by textPDMModifyP.

Remarks
The TextPDM_Item structure (declared in dlogitem.h) contains fields analogous to those found in the DItem_PulldownMenuItemRsc structure. See the "Text Pull-down Menu" section of the "Standard Dialog Items" chapter for more information on the DItem_PulldownMenuItemRsc structure.
The TextPDM_ItemModify structure (also declared in dlogitem.h) contains one bitfield for each field of a TextPDM_Item structure. Setting a bitfield in the TextPDM_ItemModify structure to true indicates the corresponding field in the TextPDM_Item should be used when setting information in a Text Pull-down Menu item with the mdlDialog_textPDMItemSetInfo function. If a bitfield is false, the corresponding field in the text Pull-Down menu item is unchanged.
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem..
Parameters
[in]menuItemPitem to set info in
[in]textPDMInfoPtext menu item info
[in]textPDMModifyPmodify info
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to a Text Pull-down Menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_textPDMItemGetInfo
StatusInt mdlDialog_textPDMItemSetLabel ( DItem_PulldownMenuItem menuItemP,
WCharCP  labelP 
)

Sets the label of the Text Pull-down Menu item specified by menuItemP to the string pointed to by labelP.

Remarks
A pointer to a Text Pull-down Menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
These functions are usually called as part of an item hook function attached to a Menu Bar item. The DITEM_MESSAGE_BUTTON message should be trapped with buttonTrans equal to BUTTONTRANS_DOWN. This message is sent when the data button is pressed inside a Menu Bar item and before any Pull-Down menus are displayed. Trapping this message allows the state, label, or mark of all Text Pull-down Menu items to be correctly set before the menus are displayed.
Parameters
[in]menuItemPitem to set
[in]labelPnew label
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to a Text Pull-down Menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_textPDMItemSetEnabled mdlDialog_textPDMItemSetMark
StatusInt mdlDialog_textPDMItemSetPressedIcon ( DItem_PulldownMenuItem menuItemP,
RscId iconIdP,
RscType iconTypeP,
MdlDesc **  iconOwnerMDP 
)

Sets the pressed icon id type and owner of the specified pulldown menu item.

Parameters
[in]menuItemPspecifies the pulldown menu item to set the pressed icon for.
[in]iconIdPspecifies the Id of the icon to set as the "pressed" icon for the menu item, or NULL if not setting this value.
[in]iconTypePspecifies the icon type, or NULL if not setting this value.
[in]iconOwnerMDPis the owner of the icon ownerMD, or NULL if not setting this value.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_textPDMItemGetIcon

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.