void loadScheme() { FileChooser fc ("Please select a colour-scheme file to load...", getAppSettings().appearance.getSchemesFolder(), AppearanceSettings::getSchemeFileWildCard()); if (fc.browseForFileToOpen()) if (getAppSettings().appearance.readFromFile (fc.getResult())) rebuildProperties(); }
void AttributeViewer::setAttributeManagerToWatch(Attr::sManager attrsManager) { if (m_attr_manager != attrsManager) { if (m_attr_manager) { m_attr_manager->unbind(shared_from_this()); } m_attr_manager = attrsManager; if (m_attr_manager) { m_attr_manager->bind(shared_from_this()); rebuildProperties(); } } }
EditorPanel() : loadButton ("Load Scheme..."), saveButton ("Save Scheme...") { rebuildProperties(); addAndMakeVisible (&panel); loadButton.setColour (TextButton::buttonColourId, Colours::lightgrey.withAlpha (0.5f)); saveButton.setColour (TextButton::buttonColourId, Colours::lightgrey.withAlpha (0.5f)); loadButton.setColour (TextButton::textColourOffId, Colours::white); saveButton.setColour (TextButton::textColourOffId, Colours::white); addAndMakeVisible (&loadButton); addAndMakeVisible (&saveButton); loadButton.addListener (this); saveButton.addListener (this); }