本文整理汇总了C++中CSkinSimple::GetWorkunitRunningImage方法的典型用法代码示例。如果您正苦于以下问题:C++ CSkinSimple::GetWorkunitRunningImage方法的具体用法?C++ CSkinSimple::GetWorkunitRunningImage怎么用?C++ CSkinSimple::GetWorkunitRunningImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSkinSimple
的用法示例。
在下文中一共展示了CSkinSimple::GetWorkunitRunningImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateTaskSelectionList
//.........这里部分代码省略.........
std::vector<bool>::iterator iter = is_alive.begin();
m_TaskSelectionCtrl->Insert(resname, wxNullBitmap, j, (void*)selData);
is_alive.insert(iter+j, true);
if (j <= m_CurrentTaskSelection) {
++m_CurrentTaskSelection;
m_TaskSelectionCtrl->SetSelection(m_CurrentTaskSelection);
}
} else
#endif
{
m_TaskSelectionCtrl->Append(resname, wxNullBitmap, (void*)selData);
is_alive.push_back(true);
}
++count;
} // End if (!found)
} // End for (i) loop
// Check items in descending order so deletion won't change indexes of items yet to be checked
for(j = count-1; j >=0; --j) {
if(!is_alive.at(j)) {
wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Task '%d' no longer alive"), j);
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j);
wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - selData '%p' "), selData);
wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - result_name '%s' "), selData->result_name);
selData->slideShowFileNames.Clear();
wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Deleting selData"));
delete selData;
wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Deleting control data"));
// Indicate to Delete() we have cleaned up the Selection Data
m_TaskSelectionCtrl->SetClientData(j, NULL);
m_TaskSelectionCtrl->Delete(j);
if (j == m_CurrentTaskSelection) {
int newCount = m_TaskSelectionCtrl->GetCount();
if (m_CurrentTaskSelection < newCount) {
// Select the next item if one exists
m_TaskSelectionCtrl->SetSelection(m_CurrentTaskSelection);
} else if (newCount > 0) {
// Select the previous item if one exists
m_CurrentTaskSelection = newCount-1;
m_TaskSelectionCtrl->SetSelection(m_CurrentTaskSelection);
} else {
m_CurrentTaskSelection = -1;
m_TaskSelectionCtrl->SetSelection(wxNOT_FOUND);
}
m_bStableTaskInfoChanged = true;
needRefresh = true;
} else if (j < m_CurrentTaskSelection) {
--m_CurrentTaskSelection;
m_TaskSelectionCtrl->SetSelection(m_CurrentTaskSelection);
}
}
}
if ((m_CurrentTaskSelection >= 0) && !m_bStableTaskInfoChanged) {
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(m_CurrentTaskSelection);
project = pDoc->state.lookup_project(selData->project_url);
if ( project && (project->project_files_downloaded_time > selData->project_files_downloaded_time) ) {
FindSlideShowFiles(selData);
selData->project_files_downloaded_time = project->project_files_downloaded_time;
}
}
count = m_TaskSelectionCtrl->GetCount();
for(j = 0; j < count; ++j) {
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j);
ctrlResult = selData->result;
if (Suspended() || ctrlResult->suspended_via_gui || ctrlResult->project_suspended_via_gui) {
newIcon = suspendedIcon;
} else if (isRunning(ctrlResult)) {
newIcon = runningIcon;
} else if (ctrlResult->scheduler_state == CPU_SCHED_PREEMPTED) {
newIcon = waitingIcon;
} else {
newIcon = suspendedIcon;
}
if (reskin || (newIcon != selData->dotColor)) {
switch (newIcon) {
case runningIcon:
m_TaskSelectionCtrl->SetItemBitmap(j, *pSkinSimple->GetWorkunitRunningImage()->GetBitmap());
break;
case waitingIcon:
m_TaskSelectionCtrl->SetItemBitmap(j, *pSkinSimple->GetWorkunitWaitingImage()->GetBitmap());
break;
case suspendedIcon:
m_TaskSelectionCtrl->SetItemBitmap(j, *pSkinSimple->GetWorkunitSuspendedImage()->GetBitmap());
break;
}
selData->dotColor = newIcon;
needRefresh = true;
}
}
if (needRefresh) {
m_TaskSelectionCtrl->Refresh();
}
bAlreadyRunning = false;
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Function End"));
}