MCPcopy Create free account
hub / github.com/TheWaveWarden/odin2 / forceValueTreeOntoComponents

Method forceValueTreeOntoComponents

Source/gui/ModMatrixComponent.cpp:859–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

857}
858
859void ModMatrixComponent::forceValueTreeOntoComponents(ValueTree p_tree) {
860
861 for (int row = 0; row < N_ROWS; ++row) {
862
863 m_dest_1[row].clear();
864 createMenu(m_dest_1[row].getRootMenu());
865 m_dest_2[row].clear();
866 createMenu(m_dest_2[row].getRootMenu());
867
868 m_source[row].setValue(m_value_tree.state.getChildWithName("mod")[String("source_row_" + std::to_string(row))]);
869
870 m_dest_1[row].rearrangeMenu();
871 m_dest_1[row].setValue(m_value_tree.state.getChildWithName("mod")[String("dest_1_row_" + std::to_string(row))]);
872
873 m_dest_2[row].rearrangeMenu();
874 m_dest_2[row].setValue(m_value_tree.state.getChildWithName("mod")[String("dest_2_row_" + std::to_string(row))]);
875
876 m_scale[row].setValue(m_value_tree.state.getChildWithName("mod")[String("scale_row_" + std::to_string(row))]);
877
878 m_amount_1[row].setValue(m_value_tree.state.getChildWithName("mod")[String("amount_0_row_" + std::to_string(row))]);
879 m_amount_2[row].setValue(m_value_tree.state.getChildWithName("mod")[String("amount_1_row_" + std::to_string(row))]);
880 m_amount_3[row].setValue(m_value_tree.state.getChildWithName("mod")[String("amount_2_row_" + std::to_string(row))]);
881 }
882}
883
884void ModMatrixComponent::resized() {
885 GET_LOCAL_AREA(m_clear_button0, "MatrixClearButton");

Callers

nothing calls this directly

Calls 1

setValueMethod · 0.45

Tested by

no test coverage detected