src/Screens/SimulatorScreen.cpp
// draw "hierarchy" tab, which shows the tree hierarchy structure for
// the currently-focused sim
draw "hierarchy" tab, which shows the tree hierarchy structure for
the currently-focused sim
draw " hierarchy " tab which shows the tree hierarchy structure for the currently - focused sim
void drawHierarchyTab(SimulatorScreen::Impl& impl) {
        UiSimulation* maybeSim = impl.mes->getFocusedSim();
        if (!maybeSim) {
            ImGui::TextDisabled("(no simulation selected)");
            return;
        }
        UiSimulation& sim = *maybeSim;
        auto resp = ComponentHierarchy{}.draw(sim.model.get(), sim.selected, sim.hovered);
        if (resp.type == ComponentHierarchy::SelectionChanged) {
            sim.selected = const_cast<OpenSim::Component*>(resp.ptr);
        } else if (resp.type == ComponentHierarchy::HoverChanged) {
            sim.hovered = const_cast<OpenSim::Component*>(resp.ptr);
        }
    }
void drawHierarchyTab ( SimulatorScreen :: Impl & impl ) { UiSimulation * maybeSim = impl . mes -> getFocusedSim ( ) ; if ( ! maybeSim ) { ImGui :: TextDisabled ( " " ) ; return ; } UiSimulation & sim = * maybeSim ; auto resp = ComponentHierarchy { } . draw ( sim . model . get ( ) , sim . selected , sim . hovered ) ; if ( resp . type == ComponentHierarchy :: SelectionChanged ) { sim . selected = const_cast < OpenSim :: Component * > ( resp . ptr ) ; } else if ( resp . type == ComponentHierarchy :: HoverChanged ) { sim . hovered = const_cast < OpenSim :: Component * > ( resp . ptr ) ; } }
draw "hierarchy" tab, which shows the tree hierarchy structure for
the currently-focused sim
draw " hierarchy " tab which shows the tree hierarchy structure for the currently - focused sim