Rhino C++ API  8.13
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CRuiUpdateUi Class Reference

#include <RhinoSdkUiXML.h>

Public Member Functions

 CRuiUpdateUi (UUID idFile, UUID idMenu, UUID idItem, HMENU hMenu, int nIndex)
 
bool Checked () const
 
void Enable (bool bOn=true)
 
bool Enabled () const
 
UUID FileUUID () const
 
bool IsValid () const
 
HMENU Menu () const
 
UINT MenuItemID () const
 
int MenuItemIndex () const
 
UUID MenuItemUUID () const
 
UUID MenuUUID () const
 
bool RadioChecked () const
 
void SetCheck (bool bCheck=true)
 
void SetRadio (bool bOn=false)
 
void SetText (const wchar_t *sText)
 
const wchar_t * Text () const
 

Public Attributes

class CRhDockBarExtension * m__update_ui_extension
 

Protected Member Functions

void SetCheckState (bool bCheck)
 

Protected Attributes

HMENU m_hMenu
 Handle to the menu containing this menu item. More...
 
UUID m_idFile
 File ID. More...
 
UUID m_idItem
 Menu item ID. More...
 
UUID m_idMenu
 Menu ID. More...
 
UINT m_nID
 Menu item ID. More...
 
int m_nIndex
 Zero based menu item index. More...
 
int m_nItemCount
 Number of items in this menu, used to validate index. More...
 
ON_wString m_wText
 

Detailed Description

==========================================================================================

Description: This class provides an easy way to update a menu item. A reference to one of these is sent to CRuiOnUpdateMenuItems::OnUpdateMenuItem on a WM_INITMENUPOPUP event

See Also: MSDN Help for WM_INITMENUPOPUP MSDN help for CCmdUI CRuiOnUpdateMenuItems::OnUpdateMenuItem

Constructor & Destructor Documentation

◆ CRuiUpdateUi()

CRuiUpdateUi::CRuiUpdateUi ( UUID  idFile,
UUID  idMenu,
UUID  idItem,
HMENU  hMenu,
int  nIndex 
)

Description: Constructor

Member Function Documentation

◆ Checked()

bool CRuiUpdateUi::Checked ( ) const

Description: Call this member function determine if the item is checked

Returns: Returns true if checked otherwise false

◆ Enable()

void CRuiUpdateUi::Enable ( bool  bOn = true)

Description: Call this member function to enable or disable the user-interface item for this command.

Parameters: bOn [in] Set to true to enable the item, false to disable it

See Also: See CCmdUI::Enable in MSDN help file

◆ Enabled()

bool CRuiUpdateUi::Enabled ( ) const

Description: Call this member function determine if the menu item is enabled

Returns: Returns true if enabled otherwise false

◆ FileUUID()

UUID CRuiUpdateUi::FileUUID ( ) const

Description: Call this member function get the UUID of the RUI file that owns this Windows menu item

Returns: Returns the UUID of the RUI file that owns this Windows menu item

◆ IsValid()

bool CRuiUpdateUi::IsValid ( ) const

Description: Returns true if successfully initialized

◆ Menu()

HMENU CRuiUpdateUi::Menu ( ) const

Description: Call this member function to get the menu handle for the menu that owns this item

Returns: Return menu handle for the menu that owns this item

◆ MenuItemID()

UINT CRuiUpdateUi::MenuItemID ( ) const

Description: Call this member function to get the menu item ID

Returns: Returns the menu item ID

◆ MenuItemIndex()

int CRuiUpdateUi::MenuItemIndex ( ) const

Description: Call this member function to get the menu item index

Returns: Returns the menu item index

◆ MenuItemUUID()

UUID CRuiUpdateUi::MenuItemUUID ( ) const

Description: Call this member function get the UUID of the RUI menu item associated with this Windows menu item

Returns: Returns the UUID of the RUI menu item that owns this associated with this Windows menu item

◆ MenuUUID()

UUID CRuiUpdateUi::MenuUUID ( ) const

Description: Call this member function get the UUID of the RUI menu that owns this Windows menu item

Returns: Returns the UUID of the RUI menu that owns this Windows menu item

◆ RadioChecked()

bool CRuiUpdateUi::RadioChecked ( ) const

Description: Call this member function determine if the radio button is checked

Returns: Returns true if checked otherwise false

◆ SetCheck()

void CRuiUpdateUi::SetCheck ( bool  bCheck = true)

Description: Call this member function to set the user-interface item for this command to the appropriate check state.

Parameters: bCheck [in] Set to true to check the item, false to uncheck it

See Also: See CCmdUI::SetCheck in MSDN help file

◆ SetCheckState()

void CRuiUpdateUi::SetCheckState ( bool  bCheck)
protected

Description: Used internally to set the check state for a menu item without changing the check state bitmap

Parameters: bCheck [in] Set to true to check the item, false to uncheck it

◆ SetRadio()

void CRuiUpdateUi::SetRadio ( bool  bOn = false)

Description: Call this member function to set the user-interface item for this command to the appropriate check state.

This member function operates like SetCheck, except that it operates on user-interface items acting as part of a radio group. Unchecking the other items in the group is not automatic unless the items themselves maintain the radio-group behavior.

Parameters: bOn [in] Set to true to check the item, false to uncheck it

See Also: See CCmdUI::SetRadio in MSDN help file

◆ SetText()

void CRuiUpdateUi::SetText ( const wchar_t *  sText)

Description: Call this member function to set the text of the menu item.

Parameters: sText [in] If not NULL or empty string the menu item text will be set to this value

See Also: See CCmdUI::SetText in MSDN help file

◆ Text()

const wchar_t* CRuiUpdateUi::Text ( ) const

Description: Call this member function to get the text of the menu item.

Returns: Menu item text

Member Data Documentation

◆ m__update_ui_extension

class CRhDockBarExtension* CRuiUpdateUi::m__update_ui_extension

For internal use only! Reserved for future use.

◆ m_hMenu

HMENU CRuiUpdateUi::m_hMenu
protected

Handle to the menu containing this menu item.

◆ m_idFile

UUID CRuiUpdateUi::m_idFile
protected

File ID.

◆ m_idItem

UUID CRuiUpdateUi::m_idItem
protected

Menu item ID.

◆ m_idMenu

UUID CRuiUpdateUi::m_idMenu
protected

Menu ID.

◆ m_nID

UINT CRuiUpdateUi::m_nID
protected

Menu item ID.

◆ m_nIndex

int CRuiUpdateUi::m_nIndex
protected

Zero based menu item index.

◆ m_nItemCount

int CRuiUpdateUi::m_nItemCount
protected

Number of items in this menu, used to validate index.

◆ m_wText

ON_wString CRuiUpdateUi::m_wText
protected