本文整理汇总了C++中ItemData::IsActive方法的典型用法代码示例。如果您正苦于以下问题:C++ ItemData::IsActive方法的具体用法?C++ ItemData::IsActive怎么用?C++ ItemData::IsActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ItemData
的用法示例。
在下文中一共展示了ItemData::IsActive方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSetProjectActive
void PHPWorkspaceView::OnSetProjectActive(wxCommandEvent& e)
{
wxString project = DoGetSelectedProject();
if(project.IsEmpty()) return;
PHPWorkspace::Get()->SetProjectActive(project);
wxTreeItemIdValue cookie;
wxTreeItemId child = m_treeCtrlView->GetFirstChild(m_treeCtrlView->GetRootItem(), cookie);
while(child.IsOk()) {
ItemData* id = DoGetItemData(child);
if(id && id->IsProject()) {
id->SetActive(id->GetProjectName() == project);
m_treeCtrlView->SetItemBold(child, id->IsActive());
}
child = m_treeCtrlView->GetNextChild(m_treeCtrlView->GetRootItem(), cookie);
}
}
示例2: LoadWorkspace
void PHPWorkspaceView::LoadWorkspace()
{
wxString workspaceName;
workspaceName << PHPWorkspace::Get()->GetFilename().GetName();
wxWindowUpdateLocker locker(m_treeCtrlView);
m_treeCtrlView->DeleteAllItems();
// Add the root item
BitmapLoader* bl = m_mgr->GetStdIcons();
wxTreeItemId root = m_treeCtrlView->AddRoot(workspaceName,
bl->GetMimeImageId(PHPWorkspace::Get()->GetFilename().GetFullName()),
bl->GetMimeImageId(PHPWorkspace::Get()->GetFilename().GetFullName()),
new ItemData(ItemData::Kind_Workspace));
const PHPProject::Map_t& projects = PHPWorkspace::Get()->GetProjects();
// add projects
wxStringSet_t files;
PHPProject::Map_t::const_iterator iter_project = projects.begin();
for(; iter_project != projects.end(); ++iter_project) {
ItemData* data = new ItemData(ItemData::Kind_Project);
data->SetProjectName(iter_project->first);
data->SetActive(iter_project->second->IsActive());
wxTreeItemId projectItemId = m_treeCtrlView->AppendItem(root,
iter_project->second->GetName(),
bl->GetMimeImageId(FileExtManager::TypeProject),
bl->GetMimeImageId(FileExtManager::TypeProject),
data);
if(data->IsActive()) {
m_treeCtrlView->SetItemBold(projectItemId, true);
}
DoBuildProjectNode(projectItemId, iter_project->second);
}
if(m_treeCtrlView->HasChildren(root)) {
m_treeCtrlView->Expand(root);
}
}