Functions
PushButton Item

Functions

ErrorCode mdlDialog_pushButtonActivate (RawItemHdr *pButP)
 Activates the Push Button identified by pButP. More...
 
StatusInt mdlDialog_pushButtonSetDefault (RawItemHdr *pButP, bool isDefault)
 Changes the default status of the Push Button identified by pButP. More...
 
StatusInt mdlDialog_pushButtonSetCancel (RawItemHdr *pButP, bool isCancel)
 Changes the cancel status of the Push Button identified by pButP. More...
 
StatusInt mdlDialog_pushButtonGetInfo (CommandNumber *commandNumberP, UInt32 *commandSourceP, WChar **unparsedPP, int *buttonTypeP, RawItemHdr *pButP)
 Obtains information about the Push Button specified by pButP. More...
 
StatusInt mdlDialog_pushButtonSetIcon (RawItemHdr *pButP, UInt32 *iconAlignmentP, RscId *iconIdP, RscType *iconTypeP, MdlDesc **iconOwnerMDP)
 Sets the icon information for a PushButton or PushButtonX item. More...
 
StatusInt mdlDialog_pushButtonSetPressedIcon (RawItemHdr *pButP, RscId *iconIdP, RscType *iconTypeP, MdlDesc **iconOwnerMDP)
 Sets the pressed icon id, type and owner for the specified pushbutton dialog item. More...
 
StatusInt mdlDialog_pushButtonSetInfo (CommandNumber *commandNumberP, UInt32 *commandSourceP, WChar **unparsedPP, int *buttonTypeP, bool redraw, RawItemHdr *pButP)
 Sets information about the Push Button specified by pButP. More...
 
StatusInt mdlDialog_pushButtonSetIconColors (RawItemHdr *pButP, BSIColorDescr **iconFgColorPP, BSIColorDescr **iconBgColorPP)
 Sets the foreground and background icon colors for the specified Push Button dialog item. More...
 

Detailed Description

Function Documentation

ErrorCode mdlDialog_pushButtonActivate ( RawItemHdr pButP)

Activates the Push Button identified by pButP.

Activating a Push Button simulates the user clicking the mouse while the mouse cursor is over the Push Button.

Parameters
[in]pButPPush Button item to activate
Returns
SUCCESS, or a non-zero value if an error occurs. This means that pButP does not point to a Push Button item.
StatusInt mdlDialog_pushButtonGetInfo ( CommandNumber *  commandNumberP,
UInt32 commandSourceP,
WChar **  unparsedPP,
int *  buttonTypeP,
RawItemHdr pButP 
)

Obtains information about the Push Button specified by pButP.

Parameters
[out]commandNumberPpoints to a variable to receive the command that is activated when the button is pressed.
[out]commandSourcePindicates the owning application. If zero, the owning application is MicroStation. If non-zero, the owning application is the application that built the MSDialog.
[out]unparsedPPpoints to a string to be passed to the command. The string is copied into the queue element, and the function that processes the command receives a pointer to the copy. The string that unparsedPP points to can be in a temporary location. If there is no string to pass to the command, unparsedPP can be NULL. It can also point to a zero-length string.
[out]buttonTypePreturns the button type. Possible values are DEFAULT_BUTTON, CANCEL_BUTTON, or zero (meaning the button is of some other type).
[in]pButPPush Button to get info on
Returns
SUCCESS, or a non-zero value if an error occurs. This means that pButP does not point to a Push Button item.
See also
mdlDialog_pushButtonSetInfo mdlDialog_pushButtonActivate mdlDialog_pushButtonSetDefault mdlDialog_pushButtonSetCancel mdlInput_sendCommand
StatusInt mdlDialog_pushButtonSetCancel ( RawItemHdr pButP,
bool  isCancel 
)

Changes the cancel status of the Push Button identified by pButP.

If isCancel is true, the Push Button is made the Cancel button. If isCancel is false, the Push Button has its cancel status revoked.

Parameters
[in]pButPPush Button item to change
[in]isCancelfalse if button is no longer cancel
Remarks
You should take care to ensure that only one button in each dialog has its cancel flag set. Disable any existing Cancel button(s) before assigning cancel status to a new button.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that pButP does not point to a Push Button item.
See also
mdlDialog_pushButtonSetDefault mdlDialog_pushButtonActivate mdlDialog_pushButtonGetInfo mdlDialog_pushButtonSetInfo
StatusInt mdlDialog_pushButtonSetDefault ( RawItemHdr pButP,
bool  isDefault 
)

Changes the default status of the Push Button identified by pButP.

If isDefault is true, the Push Button is made the default. If isDefault is false, the Push Button has its default status revoked.

Parameters
[in]pButPPush Button item to change
[in]isDefaultfalse if button is no longer the default
Remarks
There can be only one default button, so no danger exists that more than one button might be activated by default. However, because this function does not reset the default flag on previous default buttons, it is possible for several buttons to have the default flag set, and thus be drawn in the dialog with default highlights. To avoid more than one button with default highlights in a dialog, use this function to clear the default flag on previous default buttons before you set another button to default.
Returns
SUCCESS, or a non-zero value if an error occurs. This means that pButP does not point to a Push Button item.
See also
mdlDialog_pushButtonActivate mdlDialog_pushButtonSetCancel mdlDialog_pushButtonGetInfo mdlDialog_pushButtonSetInfo
StatusInt mdlDialog_pushButtonSetIcon ( RawItemHdr pButP,
UInt32 iconAlignmentP,
RscId iconIdP,
RscType iconTypeP,
MdlDesc **  iconOwnerMDP 
)

Sets the icon information for a PushButton or PushButtonX item.

Parameters
[in]pButPpoints to the RawItemHdr for the PushButton item
[in]iconAlignmentPpoints to an unsigned long representing the alignment to be used for the icon
[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
Returns
SUCCESS, or a non-zero value if the pButP is invalid.
See also
mdlDialog_pushButtonSetPressedIcon
StatusInt mdlDialog_pushButtonSetIconColors ( RawItemHdr pButP,
BSIColorDescr **  iconFgColorPP,
BSIColorDescr **  iconBgColorPP 
)

Sets the foreground and background icon colors for the specified Push Button dialog item.

Parameters
[in]pButPpoints to the pushbutton item to set the icon colors in
[in]iconFgColorPPthe color descriptor for the foreground color, set NULL if not setting the foreground color
[in]iconBgColorPPthe color descriptor for the background color, set NULL if not setting the background color
Returns
SUCCESS, or a non-zero value if an error occurs. This means that pButP does not point to a Push Button item.
StatusInt mdlDialog_pushButtonSetInfo ( CommandNumber *  commandNumberP,
UInt32 commandSourceP,
WChar **  unparsedPP,
int *  buttonTypeP,
bool  redraw,
RawItemHdr pButP 
)

Sets information about the Push Button specified by pButP.

Parameters
[in]commandNumberPpoints to a variable to receive the command to be activated when the button is pressed.
[in]commandSourcePindicates the owning application. If zero, the owning application will be MicroStation. If non-zero, the owning application is the application that built the MSDialog.
[in]unparsedPPpoints to a string to be passed to the command. The string is copied into the queue element, and the function that processes the command receives a pointer to the copy. The string that unparsedPP points to can be in a temporary location. If there is no string to pass to the command, unparsedPP can be NULL. It can also point to a zero-length string.
[in]buttonTypePsets the button type. Possible values are DEFAULT_BUTTON, CANCEL_BUTTON, or zero (meaning the button is of some other type).
[in]redrawif set to true, will redraw the button after the new information is set, so that the button's appearance will reflect any changes.
[in]pButPpushbutton to set info on
Returns
SUCCESS, or a non-zero value if an error occurs. This means that pButP does not point to a Push Button item.
See also
mdlDialog_pushButtonActivate mdlDialog_pushButtonSetDefault mdlDialog_pushButtonSetCancel mdlDialog_pushButtonGetInfo mdlInput_sendCommand
StatusInt mdlDialog_pushButtonSetPressedIcon ( RawItemHdr pButP,
RscId iconIdP,
RscType iconTypeP,
MdlDesc **  iconOwnerMDP 
)

Sets the pressed icon id, type and owner for the specified pushbutton dialog item.

Parameters
[in]pButPis the pushbutton to set the pressed icon for.
[in]iconIdPis the Id of the pressed icon, or NULL if not setting this information.
[in]iconTypePis the icon type, or NULL if not setting this information.
[in]iconOwnerMDPis the icon ownerMD, or NULL if not setting this information.
Returns
SUCCESS, or a non-zero value if an error occurs.
See also
mdlDialog_pushButtonSetIcon

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