void updateStylesList (const Font& newFont) { const StringArray newStyles (newFont.getAvailableStyles()); if (newStyles != currentStyleList) { currentStyleList = newStyles; styleBox.clear(); styleBox.addItemList (newStyles, 1); styleBox.setSelectedItemIndex (0); } }
static void createFileCreationOptionComboBox (Component& setupComp, OwnedArray<Component>& itemsCreated, const char** fileOptions) { ComboBox* c = new ComboBox(); itemsCreated.add (c); setupComp.addChildAndSetID (c, "filesToCreate"); c->addItemList (StringArray (fileOptions), 1); c->setSelectedId (1, false); Label* l = new Label (String::empty, "Files to Auto-Generate:"); l->attachToComponent (c, true); itemsCreated.add (l); c->setBounds ("parent.width / 2 + 160, 10, parent.width - 10, top + 22"); }