/ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
| 1004 | /****************************************************************************************************/ |
| 1005 | /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ |
| 1006 | G4String G4UIWin32::GetHelpTreeToolTips(HTREEITEM item) |
| 1007 | { |
| 1008 | // Tooltips for the help tree |
| 1009 | G4UImanager* UI = G4UImanager::GetUIpointer(); |
| 1010 | if (UI == nullptr) return ""; |
| 1011 | G4UIcommandTree* treeTop = UI->GetTree(); |
| 1012 | |
| 1013 | G4String itemText = GetItemPath(item); |
| 1014 | |
| 1015 | // Check if it is a command path |
| 1016 | if (TreeView_GetChild(fHWndHelpTree, item) != nullptr) itemText += "/"; |
| 1017 | |
| 1018 | G4UIcommand* command = treeTop->FindPath(itemText.c_str()); |
| 1019 | |
| 1020 | if (command) { |
| 1021 | // This is a command, return the first line of help |
| 1022 | return command->GetGuidanceLine(0).data(); |
| 1023 | } |
| 1024 | else { |
| 1025 | // This is not a command, but a sub directory, return the title |
| 1026 | G4UIcommandTree* path = treeTop->FindCommandTree(itemText.c_str()); |
| 1027 | if (path) return path->GetTitle().data(); |
| 1028 | } |
| 1029 | |
| 1030 | return ""; |
| 1031 | } |
| 1032 | /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/ |
| 1033 | /****************************************************************************************************/ |
| 1034 |
no test coverage detected