MCPcopy Create free account
hub / github.com/Geant4/geant4 / InitHelpTreeItems

Method InitHelpTreeItems

source/interfaces/implementation/src/G4UIWin32.cc:1212–1236  ·  view source on GitHub ↗

/ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

Source from the content-addressed store, hash-verified

1210/****************************************************************************************************/
1211/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
1212G4bool G4UIWin32::InitHelpTreeItems()
1213{
1214 HTREEITEM newItem;
1215
1216 G4UImanager* UI = G4UImanager::GetUIpointer();
1217 if (UI == nullptr) return false;
1218 G4UIcommandTree* treeTop = UI->GetTree();
1219
1220 G4int treeSize = treeTop->GetTreeEntry();
1221 G4String commandText;
1222 for (G4int a = 0; a < treeSize; a++) {
1223 // Creating new item
1224 commandText = treeTop->GetTree(a + 1)->GetPathName().data();
1225
1226 // Add the item to the tree-view control.
1227 newItem = AddItemToHelpTree((PTSTR)GetShortCommandPath(commandText).c_str());
1228
1229 if (newItem == nullptr) return false;
1230
1231 // Look for children
1232 CreateHelpTree(newItem, treeTop->GetTree(a + 1));
1233 }
1234
1235 return true;
1236}
1237/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
1238/****************************************************************************************************/
1239

Callers

nothing calls this directly

Calls 4

GetTreeEntryMethod · 0.80
c_strMethod · 0.80
GetTreeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected