bitmap support factored
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,6 +47,8 @@ public:
|
|||||||
void UpdateItemBitmap() ;
|
void UpdateItemBitmap() ;
|
||||||
void UpdateItemText() ;
|
void UpdateItemText() ;
|
||||||
void UpdateItemStatus() ;
|
void UpdateItemStatus() ;
|
||||||
|
|
||||||
|
void DoUpdateItemBitmap( WXHMENU menu, wxUint16 index) ;
|
||||||
|
|
||||||
// mark item as belonging to the given radio group
|
// mark item as belonging to the given radio group
|
||||||
void SetAsRadioGroupStart();
|
void SetAsRadioGroupStart();
|
||||||
|
@@ -754,8 +754,10 @@ void wxMenuBar::MacInstallMenuBar()
|
|||||||
if ( mh )
|
if ( mh )
|
||||||
{
|
{
|
||||||
UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
|
UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
|
||||||
SetMenuItemCommandID( mh , CountMenuItems(mh) , wxIdToMacCommand ( item->GetId() ) ) ;
|
MenuItemIndex position = CountMenuItems(mh);
|
||||||
SetMenuItemRefCon( mh , CountMenuItems(mh) , (URefCon) item ) ;
|
SetMenuItemCommandID( mh , position, wxIdToMacCommand ( item->GetId() ) );
|
||||||
|
SetMenuItemRefCon( mh , position, (URefCon) item );
|
||||||
|
item->DoUpdateItemBitmap( mh, position );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,6 +63,13 @@ void wxMenuItem::UpdateItemBitmap()
|
|||||||
|
|
||||||
MenuHandle mhandle = MAC_WXHMENU(m_parentMenu->GetHMenu()) ;
|
MenuHandle mhandle = MAC_WXHMENU(m_parentMenu->GetHMenu()) ;
|
||||||
MenuItemIndex index = m_parentMenu->MacGetIndexFromItem( this ) ;
|
MenuItemIndex index = m_parentMenu->MacGetIndexFromItem( this ) ;
|
||||||
|
DoUpdateItemBitmap( mhandle, index );
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxMenuItem::DoUpdateItemBitmap( WXHMENU menu, wxUint16 index)
|
||||||
|
{
|
||||||
|
MenuHandle mhandle = (MenuHandle) menu;
|
||||||
|
|
||||||
if ( mhandle == NULL || index == 0)
|
if ( mhandle == NULL || index == 0)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user