Functions
Option Pulldown Menu Item

Functions

StatusInt mdlDialog_optionButtonSetExtent (RawItemHdr *oButP)
 Causes the Dialog Manager to recompute the extents of the Option Button item pointed to by oButP. More...
 
StatusInt mdlDialog_optionPDMItemGetInfo (WChar *labelP, RscType *iconTypeP, RscId *iconIdP, int *commandSourceP, UInt32 *valueP, UInt32 *maskP, bool *enabledP, void **userDataPP, DItem_PulldownMenuItem *menuItemP)
 Gets information about the Option Pull-Down menu item specified by menuItemP. More...
 
StatusInt mdlDialog_optionPDMItemSetInfo (WCharCP labelP, RscType *iconTypeP, RscId *iconIdP, int *commandSourceP, UInt32 *valueP, UInt32 *maskP, bool *enabledP, void **userDataPP, DItem_PulldownMenuItem *menuItemP)
 Sets information in the Option Pull-Down menu item specified by menuItemP. More...
 
StatusInt mdlDialog_optionPDMItemSetEnabled (DItem_PulldownMenuItem *menuItemP, bool enabled)
 Sets the enabled state (enabled or disabled) of the Option Pull-Down menu item specified by menuItemP to the value specified by enabled. More...
 
StatusInt mdlDialog_optionPDMItemInsert (WCharCP labelP, RscType *iconTypeP, RscId *iconIdP, int *commandSourceP, UInt32 *valueP, UInt32 *maskP, bool *enabledP, void *userDataP, DItem_PulldownMenu *menuP, DItem_PulldownMenuItem *menuItemP)
 Inserts an Option Pull-Down menu item into an Option Pull-Down menu. More...
 

Detailed Description

Function Documentation

StatusInt mdlDialog_optionButtonSetExtent ( RawItemHdr oButP)

Causes the Dialog Manager to recompute the extents of the Option Button item pointed to by oButP.

This function allows the Option Button to be resized by MicroStation after the labels of the option button subitems have been changed.

Parameters
[in]oButPis a pointer to the Option Button's RawItemHdr.
Returns
SUCCESS upon successful resizing of the item and true if an error occurred.
See also
mdlDialog_optionButtonSetSubInfo mdlDialog_optionButtonSetItemInfo mdlDialog_optionButtonInsSubItem mdlDialog_optionButtonInsertItem
StatusInt mdlDialog_optionPDMItemGetInfo ( WChar *  labelP,
RscType iconTypeP,
RscId iconIdP,
int *  commandSourceP,
UInt32 valueP,
UInt32 maskP,
bool *  enabledP,
void **  userDataPP,
DItem_PulldownMenuItem menuItemP 
)

Gets information about the Option Pull-Down menu item specified by menuItemP.

Remarks
The parameters other than menuItemP and userDataPP are analogous to those found in the DItem_PulldownOptionItemRsc structure. See the "Option Pull-Down Menu" and "Option Button Item" sections of the "Standard Dialog Items" chapter for more information on the DItem_PulldownOptionItemRsc structure.
User defined data can be attached to any Option Pull-Down menu item. userDataPP is used to attach or retrieve a pointer to the user defined data area.
When using mdlDialog_optionPDMItemGetInfo the caller can specify NULL for any parameter (other than menuItemP), which indicates that the corresponding value is not required.
A pointer to an Option Pull-Down menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
Parameters
[out]labelPNULL = don't want label
[out]iconTypePNULL = don't want type
[out]iconIdPNULL = don't want ID
[out]commandSourcePNULL = don't want cmd source
[out]valuePNULL = don't want value
[out]maskPNULL = don't want mask
[out]enabledPNULL = don't want enab state
[out]userDataPPNULL = don't want userDataP
[in]menuItemPitem to get info on
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to an option Pull-Down menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_optionPDMItemSetInfo
StatusInt mdlDialog_optionPDMItemInsert ( WCharCP  labelP,
RscType iconTypeP,
RscId iconIdP,
int *  commandSourceP,
UInt32 valueP,
UInt32 maskP,
bool *  enabledP,
void *  userDataP,
DItem_PulldownMenu menuP,
DItem_PulldownMenuItem menuItemP 
)

Inserts an Option Pull-Down menu item into an Option Pull-Down menu.

Parameters
[in]labelPset NULL if no label
[in]iconTypePset NULL if no icon
[in]iconIdPset NULL if no icon
[in]commandSourcePset NULL if not setting cmd source
[in]valuePNULL means value of 0
[in]maskPset NULL if NOMASK
[in]enabledPNULL means enabled
[in]userDataPNULL means no userDataP
[in]menuPmenu to insert into
[in]menuItemPThe menuItemP parameter specifies the Option 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 Option Pull-Down menu to insert into can be determined from a valid pointer to an Option Pull-Down menu item.
Remarks
User defined data can be attached to any Option Pull-Down menu item. The userDataP parameter is used to attach a pointer to user defined data to an Option Pull-Down menu item.
The parameters other than menuItemP, menuP, and userDataP point to variables that are analogous to those found in the DItem_PulldownOptionItemRsc structure. See the "Option Pull-Down Menu" and "Option Button Item" sections of the "Standard Dialog Items" chapter for more information on the DItem_PulldownOptionItemRsc structure. Specifying NULL for a parameter either means that the parameter does not apply or a default value should be used. See the summary argument comments for more information.
A pointer to an Option 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.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem
StatusInt mdlDialog_optionPDMItemSetEnabled ( DItem_PulldownMenuItem menuItemP,
bool  enabled 
)

Sets the enabled state (enabled or disabled) of the Option Pull-Down menu item specified by menuItemP to the value specified by enabled.

If enabled is true, the Option Pull-Down menu item is drawn with normal bold text (if the menu is not using icons) 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 an Option Pull-Down menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
This function is 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 of all Option 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 an Option Pull-Down menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem
StatusInt mdlDialog_optionPDMItemSetInfo ( WCharCP  labelP,
RscType iconTypeP,
RscId iconIdP,
int *  commandSourceP,
UInt32 valueP,
UInt32 maskP,
bool *  enabledP,
void **  userDataPP,
DItem_PulldownMenuItem menuItemP 
)

Sets information in the Option Pull-Down menu item specified by menuItemP.

Remarks
The parameters other than menuItemP and userDataPP are analogous to those found in the DItem_PulldownOptionItemRsc structure. See the "Option Pull-Down Menu" and "Option Button Item" sections of the "Standard Dialog Items" chapter for more information on the DItem_PulldownOptionItemRsc structure.
User defined data can be attached to any Option Pull-Down menu item. userDataPP is used to attach or retrieve a pointer to the user defined data area.
When using mdlDialog_optionPDMItemSetInfo the caller can specify NULL for any parameter (other than menuItemP), which indicates that the corresponding value is not being set and should remain unchanged.
A pointer to an Option Pull-Down menu item can be obtained by calling mdlDialog_menuBarFindItem or mdlDialog_menuBarGetItem.
Parameters
[in]labelPNULL = not setting label
[in]iconTypePNULL = not setting type
[in]iconIdPNULL = not setting ID
[in]commandSourcePNULL = not settng cmd source
[in]valuePNULL = not setting value
[in]maskPNULL = not setting mask
[in]enabledPNULL = not settng enab state
[in]userDataPPNULL = not settng userDataP
[in]menuItemPitem to set
Returns
SUCCESS, or a non-zero value if an error occurs. This means that menuItemP does not point to an option Pull-Down menu item.
See also
mdlDialog_menuBarFindItem mdlDialog_menuBarGetItem mdlDialog_optionPDMItemGetInfo

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