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


C++ wxDataViewItem函数代码示例

本文整理汇总了C++中wxDataViewItem函数的典型用法代码示例。如果您正苦于以下问题:C++ wxDataViewItem函数的具体用法?C++ wxDataViewItem怎么用?C++ wxDataViewItem使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: wxDataViewItem

wxDataViewItem vvStampsModel::AddItem(
	const wxString& sName,
	unsigned int    uCount,
	bool            bChecked
	)
{
	// check if this item already exists
	stlDataItemMap::iterator it = this->mcDataItems.find(sName);
	if (it != this->mcDataItems.end())
	{
		return wxDataViewItem();
	}

	// add the item
	DataItem cItem;
	cItem.sName    = sName;
	cItem.uCount   = uCount;
	cItem.bChecked = bChecked;
	it = this->mcDataItems.insert(it, stlDataItemMap::value_type(sName, cItem));
	
	// create a wxDataViewItem from it
	wxDataViewItem cViewItem = this->ConvertDataItem(it);

	// notify anyone that cares about the new item
	this->ItemAdded(wxDataViewItem(), cViewItem);

	// return the new item
	return cViewItem;
}
开发者ID:refaqtor,项目名称:sourcegear_veracity_clone,代码行数:29,代码来源:vvStampsControl.cpp

示例2: wxDataViewItem

unsigned int MyMusicTreeModel::GetChildren( const wxDataViewItem &parent,
                                            wxDataViewItemArray &array ) const
{
    MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) parent.GetID();
    if (!node)
    {
        array.Add( wxDataViewItem( (void*) m_root ) );
        return 1;
    }

    if (node == m_classical)
    {
        MyMusicTreeModel *model = (MyMusicTreeModel*)(const MyMusicTreeModel*) this;
        model->m_classicalMusicIsKnownToControl = true;
    }

    if (node->GetChildCount() == 0)
    {
        return 0;
    }

    unsigned int count = node->GetChildren().GetCount();
    for (unsigned int pos = 0; pos < count; pos++)
    {
        MyMusicTreeModelNode *child = node->GetChildren().Item( pos );
        array.Add( wxDataViewItem( (void*) child ) );
    }

    return count;
}
开发者ID:EmptyChaos,项目名称:wxWidgets,代码行数:30,代码来源:mymodels.cpp

示例3: wxDataViewItem

wxDataViewItem FunctionsModel::GetParent(const wxDataViewItem& item) const
{
    FunctionsModel_Item* node = reinterpret_cast<FunctionsModel_Item*>(item.m_pItem);
    if ( node ) {
        return wxDataViewItem(node->GetParent());
    }
    return wxDataViewItem(NULL);
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:8,代码来源:functionsmodel.cpp

示例4: wxDataViewItem

wxDataViewItem CScoptViewResultsModel::GetParent(const wxDataViewItem& item) const
{
    CScoptViewResultsModel_Item* node = reinterpret_cast<CScoptViewResultsModel_Item*>(item.m_pItem);
    if ( node ) {
        return wxDataViewItem(node->GetParent());
    }
    return wxDataViewItem(NULL);
}
开发者ID:HTshandou,项目名称:codelite,代码行数:8,代码来源:cscoptviewresultsmodel.cpp

示例5: wxDataViewItem

wxDataViewItem StaleFilesModel::GetParent(const wxDataViewItem& item) const
{
    StaleFilesModel_Item* node = reinterpret_cast<StaleFilesModel_Item*>(item.m_pItem);
    if ( node ) {
        return wxDataViewItem(node->GetParent());
    }
    return wxDataViewItem(NULL);
}
开发者ID:HTshandou,项目名称:codelite,代码行数:8,代码来源:stalefilesmodel.cpp

示例6: if

void MemCheckOutputView::ShowPageView(size_t page)
{
    // CL_DEBUG1(PLUGIN_PREFIX("MemCheckOutputView::ShowPage()"));

    if(page < 1)
        m_currentPage = 1;
    else if(page > m_pageMax)
        m_currentPage = m_pageMax;
    else
        m_currentPage = page;

    if(m_currentPage == 0)
        m_textCtrlPageNumber->Clear();
    else
        pageValidator.TransferToWindow(); // it sets m_textCtrlPageNumber

    m_currentPageIsEmptyView = true;
    m_currentItem = wxDataViewItem(0);
    m_onValueChangedLocked = false;
    m_markedErrorsCount = 0;
    m_dataViewCtrlErrorsModel->Clear();

    if(m_totalErrorsView == 0) return;

    ErrorList& errorList = m_plugin->GetProcessor()->GetErrors();
    long iStart = (long)(m_currentPage - 1) * m_plugin->GetSettings()->GetResultPageSize();
    long iStop =
        (long)std::min(m_totalErrorsView - 1, m_currentPage * m_plugin->GetSettings()->GetResultPageSize() - 1);
    // CL_DEBUG1(PLUGIN_PREFIX("start - stop = %lu - %lu", iStart, iStop));
    m_currentPageIsEmptyView = (iStop - iStart) < 0;

    // this should never happen if m_totalErrorsView > 0, but...
    if(m_currentPageIsEmptyView) return;

    wxWindowDisabler disableAll;
    wxBusyInfo wait(wxT(BUSY_MESSAGE));
    m_mgr->GetTheApp()->Yield();

    unsigned int flags = 0;
    if(m_plugin->GetSettings()->GetOmitNonWorkspace()) flags |= MC_IT_OMIT_NONWORKSPACE;
    if(m_plugin->GetSettings()->GetOmitDuplications()) flags |= MC_IT_OMIT_DUPLICATIONS;
    if(m_plugin->GetSettings()->GetOmitSuppressed()) flags |= MC_IT_OMIT_SUPPRESSED;
    size_t i = 0;
    MemCheckIterTools::ErrorListIterator it = MemCheckIterTools::Factory(errorList, m_workspacePath, flags);
    for(; i < iStart && it != errorList.end(); ++i, ++it)
        ; // skipping item before start
    // CL_DEBUG1(PLUGIN_PREFIX("items skiped"));
    m_mgr->GetTheApp()->Yield();
    for(; i <= iStop; ++i, ++it) {
        if(it == errorList.end()) {
            CL_WARNING(PLUGIN_PREFIX("Some items skiped. Total errors count mismatches the iterator."));
            break;
        }
        AddTree(wxDataViewItem(0), *it); // CL_DEBUG1(PLUGIN_PREFIX("adding %lu", i));
        if(!(i % WAIT_UPDATE_PER_ITEMS)) m_mgr->GetTheApp()->Yield();
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:57,代码来源:memcheckoutputview.cpp

示例7: wxDataViewItem

wxDataViewItem GNC::GUI::AcquisitionTableModel::GetParent( const wxDataViewItem &item ) const
{
        if (!item.IsOk()) {
                return wxDataViewItem(0);
        }
        //if it's a study...
        AcquisitionNode* pNode = (AcquisitionNode*)(item.GetID());
        return wxDataViewItem( (void*) pNode->GetParent() );
}
开发者ID:151706061,项目名称:ginkgocadx,代码行数:9,代码来源:acquisitiontablemodel.cpp

示例8: wxDataViewItem

wxDataViewItem TreeListModel::GetParent(const wxDataViewItem& item) const
{
    if ( IsEmpty() ) {
        return wxDataViewItem(NULL);
    }
    
    TreeListModel_Item* node = reinterpret_cast<TreeListModel_Item*>(item.m_pItem);
    if ( node ) {
        return wxDataViewItem(node->GetParent());
    }
    return wxDataViewItem(NULL);
}
开发者ID:wuqiong4945,项目名称:memu,代码行数:12,代码来源:treelistmodel.cpp

示例9: wxDataViewItem

wxDataViewItem LLDBBreakpointModel::GetParent(const wxDataViewItem& item) const
{
    if ( IsEmpty() ) {
        return wxDataViewItem(NULL);
    }
    
    LLDBBreakpointModel_Item* node = reinterpret_cast<LLDBBreakpointModel_Item*>(item.m_pItem);
    if ( node ) {
        return wxDataViewItem(node->GetParent());
    }
    return wxDataViewItem(NULL);
}
开发者ID:05storm26,项目名称:codelite,代码行数:12,代码来源:lldbbreakpointmodel.cpp

示例10: wxDataViewItem

wxDataViewItem MemCheckDVCErrorsModel::GetParent(const wxDataViewItem& item) const
{
    if ( IsEmpty() ) {
        return wxDataViewItem(NULL);
    }
    
    MemCheckDVCErrorsModel_Item* node = reinterpret_cast<MemCheckDVCErrorsModel_Item*>(item.m_pItem);
    if ( node ) {
        return wxDataViewItem(node->GetParent());
    }
    return wxDataViewItem(NULL);
}
开发者ID:05storm26,项目名称:codelite,代码行数:12,代码来源:memcheckdvcerrorsmodel.cpp

示例11: GetParent

	virtual wxDataViewItem GetParent(const wxDataViewItem &item) const
	{
		// the invisible root node has no parent
		if (!item.IsOk())
			return wxDataViewItem(0);

		ReplayProvider* provider = (ReplayProvider*)item.GetID();

		if (provider == m_root)
			return wxDataViewItem(0);

		return wxDataViewItem((void*)provider->GetParent());
	}
开发者ID:TcT2k,项目名称:RLReplayManager,代码行数:13,代码来源:ManagerFrame.cpp

示例12: CancelCommand

void GNC::GUI::AcquisitionTableModel::ClearResults()
{
        CancelCommand();

        wxDataViewItemArray toDeleteList;
        for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
                toDeleteList.push_back(wxDataViewItem((*it).second));
        }
        //then delete studies Nodes...
        ItemsDeleted(wxDataViewItem(0), toDeleteList);

        //delete all and reload again...
        ClearStudyMap();
}
开发者ID:151706061,项目名称:ginkgocadx,代码行数:14,代码来源:acquisitiontablemodel.cpp

示例13: wxDataViewItem

wxDataViewItem MyMusicTreeModel::GetParent( const wxDataViewItem &item ) const
{
    // the invisible root node has no parent
    if (!item.IsOk())
        return wxDataViewItem(0);

    MyMusicTreeModelNode *node = (MyMusicTreeModelNode*) item.GetID();

    // "MyMusic" also has no parent
    if (node == m_root)
        return wxDataViewItem(0);

    return wxDataViewItem( (void*) node->GetParent() );
}
开发者ID:euler0,项目名称:Helium,代码行数:14,代码来源:mymodels.cpp

示例14: wxDataViewItem

void DIALOG_LIB_EDIT_PIN_TABLE::DataViewModel::Refresh()
{
#ifdef REASSOCIATE_HACK
    m_Widget->AssociateModel( this );
#else
    std::queue<wxDataViewItem> todo;
    todo.push( wxDataViewItem() );

    while( !todo.empty() )
    {
        wxDataViewItem current = todo.front();
        wxDataViewItemArray items;

        GetChildren( current, items );
        ItemsAdded( current, items );

        for( wxDataViewItemArray::const_iterator i = items.begin(); i != items.end(); ++i )
        {
            if( IsContainer( *i ) )
                todo.push( *i );
        }

        todo.pop();
    }

#endif
}
开发者ID:BTR1,项目名称:kicad-source-mirror,代码行数:27,代码来源:dialog_lib_edit_pin_table.cpp

示例15: wxDataViewTreeCtrl

/* ActionSpecialTreeView::ActionSpecialTreeView
 * ActionSpecialTreeView class constructor
 *******************************************************************/
ActionSpecialTreeView::ActionSpecialTreeView(wxWindow* parent) : wxDataViewTreeCtrl(parent, -1)
{
	parent_dialog = NULL;

	// Create root item
	root = wxDataViewItem(0);

	// Add 'None'
	item_none = AppendItem(root, "0: None");

	// Populate tree
	vector<as_t> specials = theGameConfiguration->allActionSpecials();
	std::sort(specials.begin(), specials.end());
	for (unsigned a = 0; a < specials.size(); a++)
	{
		AppendItem(getGroup(specials[a].special->getGroup()),
		           S_FMT("%d: %s", specials[a].number, specials[a].special->getName()), -1);
	}

	// Bind events
	Bind(wxEVT_DATAVIEW_ITEM_START_EDITING, &ActionSpecialTreeView::onItemEdit, this);
	Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, &ActionSpecialTreeView::onItemActivated, this);

	Expand(root);
	SetMinSize(wxSize(-1, 200));
}
开发者ID:jonrimmer,项目名称:SLADE,代码行数:29,代码来源:ActionSpecialDialog.cpp


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