当前位置: 首页>>代码示例>>C++>>正文


C++ ContextMenuItem::releasePlatformDescription方法代码示例

本文整理汇总了C++中ContextMenuItem::releasePlatformDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ ContextMenuItem::releasePlatformDescription方法的具体用法?C++ ContextMenuItem::releasePlatformDescription怎么用?C++ ContextMenuItem::releasePlatformDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ContextMenuItem的用法示例。


在下文中一共展示了ContextMenuItem::releasePlatformDescription方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: insertItem

void ContextMenu::insertItem(unsigned position, ContextMenuItem& item)
{
	checkOrEnableIfNeeded( item );
	
	if( item.releasePlatformDescription() != NULL )
	    m_platformDescription->AddItem( item.releasePlatformDescription(), position );
}
开发者ID:PyroOS,项目名称:Pyro,代码行数:7,代码来源:ContextMenuSyllable.cpp

示例2: appendItem

void ContextMenu::appendItem(ContextMenuItem& item)
{
    if (!m_platformDescription)
        return;
        
    PlatformMenuItemDescription itemDescription = item.releasePlatformDescription();    
    wxItemKind menuKindWx = ( itemDescription.type == CheckableActionType ) ? wxITEM_CHECK : wxITEM_NORMAL;
    wxString titleWx(itemDescription.title);
    int idWx = wxID_ANY;
    wxMenuItem * itemWx;

    ItemActionMap::const_iterator end = s_itemActions.end();
    for (ItemActionMap::const_iterator it = s_itemActions.begin();  it != end; ++it) {
        if (it->second == itemDescription.action)
            idWx = it->first;
    }

    if (itemDescription.subMenu) {
        itemWx = new wxMenuItem(m_platformDescription, idWx, titleWx, wxEmptyString, wxITEM_NORMAL, itemDescription.subMenu);
    } else if (itemDescription.type != SeparatorType) {
        itemWx = new wxMenuItem(m_platformDescription, idWx, titleWx, wxT(""), menuKindWx);
    } else {
        itemWx = new wxMenuItem(m_platformDescription);
    }

    s_itemActions.add(itemWx->GetId(), item.action());
    
    m_platformDescription->Append(itemWx);
    m_platformDescription->Enable(itemWx->GetId(), itemDescription.enabled);
    
    if (menuKindWx == wxITEM_CHECK)
        m_platformDescription->Check(itemWx->GetId(), itemDescription.checked);        
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:33,代码来源:ContextMenuWx.cpp

示例3: appendItem

void ContextMenu::appendItem(ContextMenuItem& item)
{
    checkOrEnableIfNeeded(item);

    BMenuItem* menuItem = item.releasePlatformDescription();
    if (menuItem)
        m_platformDescription->AddItem(menuItem);
}
开发者ID:achellies,项目名称:WinCEWebKit,代码行数:8,代码来源:ContextMenuHaiku.cpp

示例4: insertItem

void ContextMenu::insertItem(unsigned int position, ContextMenuItem& item)
{
    if (!m_platformDescription)
        return;

    checkOrEnableIfNeeded(item);
    ::InsertMenuItem(m_platformDescription, position, TRUE, item.releasePlatformDescription());
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:8,代码来源:ContextMenuWin.cpp

示例5: appendItem

void ContextMenu::appendItem(ContextMenuItem& item)
{
    ASSERT(m_platformDescription);

    GtkMenuItem* platformItem = item.releasePlatformDescription();
    ASSERT(platformItem);
    gtk_menu_shell_append(GTK_MENU_SHELL(m_platformDescription), GTK_WIDGET(platformItem));
    gtk_widget_show(GTK_WIDGET(platformItem));
}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:9,代码来源:ContextMenuGtk.cpp

示例6: appendItem

void ContextMenu::appendItem(ContextMenuItem& item)
{
    DEBUG("ContextMenu::appendItem\n" );
    
    checkOrEnableIfNeeded( item );
    
    os::MenuItem* pcItem = item.releasePlatformDescription();
    if( pcItem != NULL )
	    m_platformDescription->AddItem( pcItem );
}
开发者ID:PyroOS,项目名称:Pyro,代码行数:10,代码来源:ContextMenuSyllable.cpp


注:本文中的ContextMenuItem::releasePlatformDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。