MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / fillCombo

Method fillCombo

Source/UIComponents/CtrlrValueMap.cpp:214–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void CtrlrValueMap::fillCombo (ComboBox &comboToFill, const bool clearBeforeFill)
215{
216 if (clearBeforeFill)
217 {
218 comboToFill.clear(sendNotification);
219 }
220
221 for (int i=0; i<values.size(); i++)
222 {
223 if (additionalData.contains (i))
224 {
225 if (additionalData[i] == "")
226 {
227 comboToFill.addSeparator();
228 }
229 else
230 {
231 comboToFill.addSectionHeading (additionalData[i]);
232 }
233 }
234
235 if ((i+1) <= 0)
236 {
237 _WRN("CtrlrValueMap::fillCombo trying to insert an item with newItemId="+String(i+1));
238 }
239 comboToFill.addItem (values[i].textRepresentation, i+1);
240 }
241}
242
243void CtrlrValueMap::setPair (const int index, const int value, const String &text)
244{

Callers 4

comboContentChangedMethod · 0.45
fillContentMethod · 0.45

Calls 7

addSectionHeadingMethod · 0.80
StringFunction · 0.50
clearMethod · 0.45
sizeMethod · 0.45
containsMethod · 0.45
addSeparatorMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected