| 89 | } |
| 90 | |
| 91 | bool CEventsDlg::BuildConfigFromTree(EventsConfiguration& config) { |
| 92 | auto item = m_Tree.GetRootItem(); |
| 93 | CString text; |
| 94 | while (item) { |
| 95 | item.GetText(text); |
| 96 | EventConfigCategory category; |
| 97 | category.Name = text; |
| 98 | if (m_Tree.GetCheckState(item)) { |
| 99 | config.AddCategory(category); |
| 100 | } |
| 101 | else { |
| 102 | auto child = item.GetChild(); |
| 103 | while (child) { |
| 104 | if (m_Tree.GetCheckState(child)) { |
| 105 | auto evt = (KernelEvent*)child.GetData(); |
| 106 | category.Opcodes.push_back(evt->Opcode); |
| 107 | } |
| 108 | child = child.GetNextSibling(); |
| 109 | } |
| 110 | if (!category.Opcodes.empty()) |
| 111 | config.AddCategory(category); |
| 112 | } |
| 113 | item = item.GetNextSibling(); |
| 114 | } |
| 115 | |
| 116 | return true; |
| 117 | } |
| 118 | |
| 119 | void CEventsDlg::SwitchToAdvancedView(bool advanced) { |
| 120 | m_Init = true; |
nothing calls this directly
no test coverage detected