| 117 | |
| 118 | |
| 119 | PropertyComponent *CtrlrIDManager::createComponentForProperty (const Identifier &propertyName, |
| 120 | const ValueTree &propertyElement, |
| 121 | CtrlrPanel *panel, |
| 122 | StringArray *possibleChoices, |
| 123 | StringArray *possibleValues) |
| 124 | { |
| 125 | ValueTree identifierDefinition = ctrlrIdTree.getChildWithProperty (Ids::name, propertyName.toString()); |
| 126 | |
| 127 | StringArray choices; |
| 128 | Array <var> values; |
| 129 | |
| 130 | if (possibleChoices != nullptr && possibleChoices->size() > 0) |
| 131 | { |
| 132 | choices = *possibleChoices; |
| 133 | } |
| 134 | else |
| 135 | { |
| 136 | choices = getChoicesArray(identifierDefinition); |
| 137 | } |
| 138 | |
| 139 | if (possibleValues != nullptr && possibleValues->size() > 0) |
| 140 | { |
| 141 | values = toValueList(*possibleValues); |
| 142 | } |
| 143 | else |
| 144 | { |
| 145 | values = toValueList(getValuesArray(identifierDefinition)); |
| 146 | } |
| 147 | |
| 148 | return (new CtrlrPropertyComponent (propertyName, propertyElement, identifierDefinition, panel, &choices, &values)); |
| 149 | } |
| 150 | |
| 151 | const String CtrlrIDManager::typeToString (const PropertyType t) |
| 152 | { |
no test coverage detected