Public Member Functions | Public Attributes | List of all members
DialogItem Struct Reference

DialogItem represents a dialog item in a MicroStation/PowerPlatform dialog box. More...

#include <DialogItem.h>

Inheritance diagram for DialogItem:
Container ContainerPanel ListBox OptionButton PushButton TextBox

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 >
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...
 
RawItemHdrrawItemP
 RawItemHdr associated with this DialogItem. More...
 
DialogItemparentDiP
 Parent DialogItem. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Parameters
[in]eraseFirstindicates 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.

Parameters
[in]colorTypeone of the color types from the ItemColorType enum.
Returns
a pointer to the color associated with the specified color type
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.

Parameters
[in]fontIndexindex 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.

Parameters
[in]includeLayoutItemsindicates whether to include Layout items when searching for the next item. Defaults to false.
Returns
a pointer to the next dialog item on the dialog, if any
DialogItemP GetNextVisible ( bool  inclusive = false)

Retrieves the next visible item in the dialog item list.

Parameters
[in]inclusiveindicates whether to include this item when searching for the next visible item. Defaults to false.
Returns
a pointer to the next dialog item on the dialog, if any
DialogItemP GetOwnerItem ( )

Retrieves the DialogItem pointer of the owning dialog item, if any.

Returns
a pointer to 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.

Parameters
[in]includeLayoutItemsindicates whether to include Layout items when searching for the previous item. Defaults to false.
Returns
a pointer to the previous dialog item on the dialog, if any
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,.

Parameters
[out]statespecifies the MSValueDescr to receive the value.
RscType GetType ( ) const

Returns the resource type of this DialogItem.

T GetTypePtr ( RscType  itemType)

References NULL, and type.

StatusInt GetValue ( MSValueDescrR  value)

Retrieves this item's internal value. This is the value that is used to determine the item's.

Parameters
[out]valuespecifies 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.

Parameters
[out]valuespecifies 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.

Parameters
[in]ignoreFocusOutErrorscan 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.

Parameters
[in]newPtPwhere to move item to (dcoords)
[in]redrawtrue 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.

Parameters
[in]updateindicates 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.

Parameters
[in]bGrabMousetrue = grab mouse after opening popup
[in]pPopupPtPlacement of the popup or NULL
[out]popupDbPPMSDialog * of the new popup window
StatusInt ReloadData ( bool  redraw = true)

Reloads the item information for this item.

Parameters
[in]redrawIndicates 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.

Parameters
[in]textText for the balloon window
[in]bSetPopupTextIndicates 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.

Parameters
[in]colorTypeone of the color types from the ItemColorType enum.
[in]colorPa 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.

Parameters
[in]textText for the balloon window
StatusInt SetEnabled ( bool  enabled,
bool  ignoreFocusOutErrors = false 
)

Sets the enabled state (enabled or disabled) of a dialog item.

Parameters
[in]enabledtrue to enable or false to disable the item
[in]ignoreFocusOutErrorscan 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.

Parameters
[in]sextentnew extent of item (in dcoords)
[in]redrawusually 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.

Parameters
[in]textText for the flyover field in the Status Bar
StatusInt SetLabel ( WCharCP  pwString)

Sets the label of an item.

Parameters
[in]pwStringnew label (Unicode)
StatusInt SetLabelFont ( int  fontIndex)

Sets the font used for the label of this item.

Parameters
[in]fontIndexnew font index for label
StatusInt SetPopupMenuText ( WCharCP  text)

Sets the text displayed in the Show/Hide PopupMenu.

Parameters
[in]texttext 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.

Parameters
[out]stateChangedPpoints to an integer variable which is set to
[in]synchOthersindicates 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.

Parameters
[out]valueChangedPpoints at a bool variable which is set to
[in]newValueitem'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.

Parameters
[out]valueChangedPpoints at a bool variable which is set to
[in]newValueitem'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.

Member Data Documentation

Attributes from the resource.

Position / size (in dcoord units)

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().


The documentation for this struct was generated from the following file:

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