DialogItem represents a dialog item in a MicroStation/PowerPlatform dialog box. More...
#include <DialogItem.h>
Public Member Functions | |
DialogItemAttributes const & | GetAttributes () const |
Returns a reference to the DialogItemAttributes for this DialogItem. More... | |
RscId | GetId () const |
Returns the id of this DialogItem. More... | |
int | GetItemIndex () const |
Returns the index within the MSDialog of this DialogItem. More... | |
MSDialogP | GetDialog () const |
Returns a pointer to the MSDialog that is hosting this DialogItem. More... | |
RawItemHdrP | GetRawItem () const |
Returns a pointer to the RawItemHdr associated with this DialogItem. More... | |
BSIRect const & | GetRect () const |
Returns a reference to the rectangle for this DialogItem. This rectangle is used for mouse processing. More... | |
RscType | GetType () const |
Returns the resource type of this DialogItem. More... | |
bool | HasFocus () const |
Determines if an item has focus. More... | |
bool | IsEnabled () const |
Determines if an item is enabled. More... | |
bool | IsFocusable () |
Determines if an item is focusable. More... | |
bool | IsDisplayable () |
Determines if an item can be displayed. More... | |
bool | IsHidden () |
Determines if an item is hidden. More... | |
StatusInt | Draw (bool eraseFirst=true) |
Redraws an item within the Dialog Box. More... | |
BSIColorDescr const * | GetColor (ItemColorType colorType) |
Gets a specific color for the item. More... | |
StatusInt | GetLabel (WStringR label) |
Retrieves the text displayed in the label for this item as a WString. More... | |
int | GetLabelLength () |
Retrieves the length in characters of the label for this item. More... | |
int | GetLabelWidth (int fontIndex) |
Retrieves the width in pixels of the label for this item. More... | |
GuiLayoutControlP | GetLayoutControl () |
Retrieves the GuiLayoutControl for this item. More... | |
GuiLayoutPropertiesP | GetLayoutProperties () |
Retrieves the GuiLayoutProperties for this item. More... | |
DialogItemP | GetNext (bool includeLayoutItems=false) |
Retrieves the next item in the dialog item list. More... | |
DialogItemP | GetNextVisible (bool inclusive=false) |
Retrieves the next visible item in the dialog item list. More... | |
DialogItemP | GetOwnerItem () |
Retrieves the DialogItem pointer of the owning dialog item, if any. More... | |
StatusInt | GetPopupMenuText (WStringR text) |
Retrieves the text displayed in the Show/Hide PopupMenu. More... | |
DialogItemP | GetPrev (bool includeLayoutItems=false) |
Retrieves the previous item in the dialog item list. More... | |
StatusInt | GetState (MSValueDescrR state) |
Retrieves this item's external state. This is the value of the application data that the item controls,. More... | |
StatusInt | GetValue (MSValueDescrR value) |
Retrieves this item's internal value. This is the value that is used to determine the item's. More... | |
StatusInt | GetValue (WStringR value) |
Retrieves the item's internal value as a string. This is the value that is used to determine the item's. More... | |
StatusInt | Hide (bool ignoreFocusOutErrors=false) |
Hides an item within the Dialog Box. More... | |
StatusInt | Move (Point2dP newPtP, bool redraw=true) |
Moves an item within the Dialog Box. More... | |
StatusInt | Obscure () |
Obscures the item. Unobscure() reverses this process. More... | |
StatusInt | PopupClose (bool update) |
Notifies the owner item to close its popup window. More... | |
StatusInt | PopupOpen (bool bGrabMouse, Point2dP pPopupPt, MSDialogP *popupDbPP) |
Opens a Popup dialog associated with this item. If the popup should have focus and the mouse then. More... | |
StatusInt | ReloadData (bool redraw=true) |
Reloads the item information for this item. More... | |
StatusInt | SetBalloonText (WCharCP text, bool bSetPopupText=true) |
Sets the information displayed in the balloon window for this item. More... | |
StatusInt | SetColor (ItemColorType colorType, BSIColorDescr *colorP) |
Sets a specific color for the item. More... | |
StatusInt | SetDisabledBalloonText (WCharCP text) |
Sets the text to be displayed in the balloon window when this item is disabled. More... | |
StatusInt | SetEnabled (bool enabled, bool ignoreFocusOutErrors=false) |
Sets the enabled state (enabled or disabled) of a dialog item. More... | |
StatusInt | SetExtent (SextentCP sextent, bool redraw=true) |
Sets the extent (position and size) of an item within the dialog. More... | |
StatusInt | SetFlyoverText (WCharCP text) |
Sets the information displayed in the flyover field in the Status Bar for this item. More... | |
StatusInt | SetLabel (WCharCP pwString) |
Sets the label of an item. More... | |
StatusInt | SetLabelFont (int fontIndex) |
Sets the font used for the label of this item. More... | |
StatusInt | SetPopupMenuText (WCharCP text) |
Sets the text displayed in the Show/Hide PopupMenu. More... | |
StatusInt | SetState (bool *stateChangedP, bool synchOthers=true) |
Forces the specified item's external state to match its internal value. More... | |
StatusInt | SetValue (bool *valueChangedP, MSValueDescrCR newValue) |
Sets the internal value of the specified item to a certain value. More... | |
StatusInt | SetValue (bool *valueChangedP, WCharCP newValue) |
Sets the internal value of the specified item to a certain string value. More... | |
StatusInt | Show () |
Shows a previously hidden item. More... | |
StatusInt | Synchronize () |
Forces the appearance of an item to match its external state. This is the opposite. More... | |
StatusInt | SynchronizeOthers () |
Causes a DITEM_MESSAGE_SYNCHRONIZE message to be sent to all items listed in the. More... | |
StatusInt | Unobscure () |
Unobscures the item. The Obscure method obscures the item. More... | |
template<typename T > | |
T | GetTypePtr (RscType itemType) |
DialogItem () | |
Constructs a DialogItem object. More... | |
~DialogItem () | |
Destructs a DialogItem object. More... | |
Public Attributes | |
RscType | type |
type of item, ie. RTYPE_PushButton More... | |
RscId | id |
id of item More... | |
int | itemIndex |
index within parent More... | |
UInt64 | itemArg |
item arg More... | |
BSIRect | rect |
mouse sensitive/update region of item More... | |
Sextent | extent |
Position / size (in dcoord units) More... | |
Point2d | origin |
Position (in dcoord units) More... | |
DialogItemAttributes | attributes |
Attributes from the resource. More... | |
RawItemHdr * | rawItemP |
RawItemHdr associated with this DialogItem. More... | |
DialogItem * | parentDiP |
Parent DialogItem. More... | |
DialogItem represents a dialog item in a MicroStation/PowerPlatform dialog box.
Pointers to this structure are normally provided by messages, functions and methods. This structure should seldom be instantiated by an application.
DialogItem | ( | ) |
Constructs a DialogItem object.
Pointers to this structure are normally provided by messages, functions and methods. This structure should seldom be instantiated by an application.
~DialogItem | ( | ) |
Destructs a DialogItem object.
DialogItem objects should seldom be destroyed by an application.
StatusInt Draw | ( | bool | eraseFirst = true | ) |
Redraws an item within the Dialog Box.
The item is drawn based on its internal value, not its external state.
[in] | eraseFirst | indicates whether to erase the item first before redrawing. Defaults to true. |
DialogItemAttributes const& GetAttributes | ( | ) | const |
Returns a reference to the DialogItemAttributes for this DialogItem.
BSIColorDescr const* GetColor | ( | ItemColorType | colorType | ) |
Gets a specific color for the item.
[in] | colorType | one of the color types from the ItemColorType enum. |
MSDialogP GetDialog | ( | ) | const |
Returns a pointer to the MSDialog that is hosting this DialogItem.
RscId GetId | ( | ) | const |
Returns the id of this DialogItem.
int GetItemIndex | ( | ) | const |
Returns the index within the MSDialog of this DialogItem.
StatusInt GetLabel | ( | WStringR | label | ) |
Retrieves the text displayed in the label for this item as a WString.
int GetLabelLength | ( | ) |
Retrieves the length in characters of the label for this item.
int GetLabelWidth | ( | int | fontIndex | ) |
Retrieves the width in pixels of the label for this item.
[in] | fontIndex | index of the font to use when determining the label width |
GuiLayoutControlP GetLayoutControl | ( | ) |
Retrieves the GuiLayoutControl for this item.
GuiLayoutPropertiesP GetLayoutProperties | ( | ) |
Retrieves the GuiLayoutProperties for this item.
DialogItemP GetNext | ( | bool | includeLayoutItems = false | ) |
Retrieves the next item in the dialog item list.
Layout items are optionally excluded.
[in] | includeLayoutItems | indicates whether to include Layout items when searching for the next item. Defaults to false. |
DialogItemP GetNextVisible | ( | bool | inclusive = false | ) |
Retrieves the next visible item in the dialog item list.
[in] | inclusive | indicates whether to include this item when searching for the next visible item. Defaults to false. |
DialogItemP GetOwnerItem | ( | ) |
Retrieves the DialogItem pointer of the owning dialog item, if any.
StatusInt GetPopupMenuText | ( | WStringR | text | ) |
Retrieves the text displayed in the Show/Hide PopupMenu.
DialogItemP GetPrev | ( | bool | includeLayoutItems = false | ) |
Retrieves the previous item in the dialog item list.
Layout items are optionally excluded.
[in] | includeLayoutItems | indicates whether to include Layout items when searching for the previous item. Defaults to false. |
RawItemHdrP GetRawItem | ( | ) | const |
Returns a pointer to the RawItemHdr associated with this DialogItem.
BSIRect const& GetRect | ( | ) | const |
Returns a reference to the rectangle for this DialogItem. This rectangle is used for mouse processing.
StatusInt GetState | ( | MSValueDescrR | state | ) |
Retrieves this item's external state. This is the value of the application data that the item controls,.
[out] | state | specifies the MSValueDescr to receive the value. |
RscType GetType | ( | ) | const |
Returns the resource type of this DialogItem.
StatusInt GetValue | ( | MSValueDescrR | value | ) |
Retrieves this item's internal value. This is the value that is used to determine the item's.
[out] | value | specifies the MSValueDescr to receive the value. |
StatusInt GetValue | ( | WStringR | value | ) |
Retrieves the item's internal value as a string. This is the value that is used to determine the item's.
[out] | value | specifies the WString to receive the value. |
bool HasFocus | ( | ) | const |
Determines if an item has focus.
StatusInt Hide | ( | bool | ignoreFocusOutErrors = false | ) |
Hides an item within the Dialog Box.
[in] | ignoreFocusOutErrors | can be used to ignore any focusing |
bool IsDisplayable | ( | ) |
Determines if an item can be displayed.
bool IsEnabled | ( | ) | const |
Determines if an item is enabled.
bool IsFocusable | ( | ) |
Determines if an item is focusable.
bool IsHidden | ( | ) |
Determines if an item is hidden.
StatusInt Move | ( | Point2dP | newPtP, |
bool | redraw = true |
||
) |
Moves an item within the Dialog Box.
[in] | newPtP | where to move item to (dcoords) |
[in] | redraw | true means redraw item after move. Defaults to true. |
StatusInt Obscure | ( | ) |
Obscures the item. Unobscure() reverses this process.
StatusInt PopupClose | ( | bool | update | ) |
Notifies the owner item to close its popup window.
[in] | update | indicates whether to update the state of the item on close |
StatusInt PopupOpen | ( | bool | bGrabMouse, |
Point2dP | pPopupPt, | ||
MSDialogP * | popupDbPP | ||
) |
Opens a Popup dialog associated with this item. If the popup should have focus and the mouse then.
[in] | bGrabMouse | true = grab mouse after opening popup |
[in] | pPopupPt | Placement of the popup or NULL |
[out] | popupDbPP | MSDialog * of the new popup window |
StatusInt ReloadData | ( | bool | redraw = true | ) |
Reloads the item information for this item.
[in] | redraw | Indicates whether the item should be redrawn to the screen after. Defaults to true. |
StatusInt SetBalloonText | ( | WCharCP | text, |
bool | bSetPopupText = true |
||
) |
Sets the information displayed in the balloon window for this item.
[in] | text | Text for the balloon window |
[in] | bSetPopupText | Indicates whether to also set the Show/Hide popup menu text. Defaults to true. |
StatusInt SetColor | ( | ItemColorType | colorType, |
BSIColorDescr * | colorP | ||
) |
Sets a specific color for the item.
[in] | colorType | one of the color types from the ItemColorType enum. |
[in] | colorP | a pointer to a BSIColorDescr which will become the new specified color for the item |
StatusInt SetDisabledBalloonText | ( | WCharCP | text | ) |
Sets the text to be displayed in the balloon window when this item is disabled.
[in] | text | Text for the balloon window |
StatusInt SetEnabled | ( | bool | enabled, |
bool | ignoreFocusOutErrors = false |
||
) |
Sets the enabled state (enabled or disabled) of a dialog item.
[in] | enabled | true to enable or false to disable the item |
[in] | ignoreFocusOutErrors | can be used to ignore any focusing |
StatusInt SetExtent | ( | SextentCP | sextent, |
bool | redraw = true |
||
) |
Sets the extent (position and size) of an item within the dialog.
[in] | sextent | new extent of item (in dcoords) |
[in] | redraw | usually true, item redraw after resized. Defaults to true. |
StatusInt SetFlyoverText | ( | WCharCP | text | ) |
Sets the information displayed in the flyover field in the Status Bar for this item.
[in] | text | Text for the flyover field in the Status Bar |
StatusInt SetLabel | ( | WCharCP | pwString | ) |
Sets the label of an item.
[in] | pwString | new label (Unicode) |
StatusInt SetLabelFont | ( | int | fontIndex | ) |
Sets the font used for the label of this item.
[in] | fontIndex | new font index for label |
StatusInt SetPopupMenuText | ( | WCharCP | text | ) |
Sets the text displayed in the Show/Hide PopupMenu.
[in] | text | text displayed in the Show/Hide PopupMenu |
StatusInt SetState | ( | bool * | stateChangedP, |
bool | synchOthers = true |
||
) |
Forces the specified item's external state to match its internal value.
[out] | stateChangedP | points to an integer variable which is set to |
[in] | synchOthers | indicates whether to synch other items in same dialog. Defaults to true. |
StatusInt SetValue | ( | bool * | valueChangedP, |
MSValueDescrCR | newValue | ||
) |
Sets the internal value of the specified item to a certain value.
[out] | valueChangedP | points at a bool variable which is set to |
[in] | newValue | item's new value, represented as a MSValueDescr object. |
StatusInt SetValue | ( | bool * | valueChangedP, |
WCharCP | newValue | ||
) |
Sets the internal value of the specified item to a certain string value.
[out] | valueChangedP | points at a bool variable which is set to |
[in] | newValue | item's new string value |
StatusInt Show | ( | ) |
Shows a previously hidden item.
StatusInt Synchronize | ( | ) |
Forces the appearance of an item to match its external state. This is the opposite.
StatusInt SynchronizeOthers | ( | ) |
Causes a DITEM_MESSAGE_SYNCHRONIZE message to be sent to all items listed in the.
StatusInt Unobscure | ( | ) |
Unobscures the item. The Obscure method obscures the item.
DialogItemAttributes attributes |
Attributes from the resource.
RscId id |
id of item
UInt64 itemArg |
item arg
int itemIndex |
index within parent
Point2d origin |
Position (in dcoord units)
DialogItem* parentDiP |
Parent DialogItem.
RawItemHdr* rawItemP |
RawItemHdr associated with this DialogItem.
BSIRect rect |
mouse sensitive/update region of item
RscType type |
type of item, ie. RTYPE_PushButton
Referenced by GetTypePtr().