diff --git a/Source/Processors/Editors/GenericEditor.cpp b/Source/Processors/Editors/GenericEditor.cpp index 661cf2128da897a54cad89c73c1e3be3ce2a56e3..2b6184170de5fbff1ec1f5b74002d1e02da59698 100755 --- a/Source/Processors/Editors/GenericEditor.cpp +++ b/Source/Processors/Editors/GenericEditor.cpp @@ -489,6 +489,20 @@ void GenericEditor::setChannelSelectionState(int chan, bool p, bool r, bool a) channelSelector->setAudioStatus(chan, a); } +void GenericEditor::saveEditorParameters(XmlElement* xml) +{ + + xml->setAttribute("Attribute", "WHAT"); + +} + +void GenericEditor::loadEditorParameters(XmlElement* xml) +{ + + //xml->setAttribute("Attribute", "WHAT"); + +} + /////////////////////// BUTTONS /////////////////////////////// diff --git a/Source/Processors/Editors/GenericEditor.h b/Source/Processors/Editors/GenericEditor.h index 5b7ace400caba7f697dd53a06d96e1d360d6e82a..3030b740a13916db3487292d81742c98df9f2e59 100755 --- a/Source/Processors/Editors/GenericEditor.h +++ b/Source/Processors/Editors/GenericEditor.h @@ -231,6 +231,12 @@ public: /** Sets param/audio/record selection state for a given channel */ void setChannelSelectionState(int chan, bool p, bool r, bool a); + /** Writes editor state to xml */ + virtual void saveEditorParameters(XmlElement* xml); + + /** Writes editor state to xml */ + virtual void loadEditorParameters(XmlElement* xml); + protected: /** A pointer to the button that opens the drawer for the ChannelSelector. */ diff --git a/Source/Processors/Editors/VisualizerEditor.cpp b/Source/Processors/Editors/VisualizerEditor.cpp index 1355aad826fa1a31c5a6db8b1daaf80f0c360f75..3459b5a6f55125d07c9749c4fc2a518d11672bd6 100755 --- a/Source/Processors/Editors/VisualizerEditor.cpp +++ b/Source/Processors/Editors/VisualizerEditor.cpp @@ -251,3 +251,16 @@ void VisualizerEditor::buttonEvent(Button* button) } +void VisualizerEditor::saveEditorParameters(XmlElement* xml) +{ + + xml->setAttribute("Attribute", "VISUALIZER"); + +} + +void VisualizerEditor::loadEditorParameters(XmlElement* xml) +{ + + //xml->setAttribute("Attribute", "VISUALIZER"); + +} \ No newline at end of file diff --git a/Source/Processors/Editors/VisualizerEditor.h b/Source/Processors/Editors/VisualizerEditor.h index c4c8df334ae41d6d1d1c0de9fc12fb7c73222d01..bc0cada8f84521e54b73b5cc18974cda5780f4f5 100755 --- a/Source/Processors/Editors/VisualizerEditor.h +++ b/Source/Processors/Editors/VisualizerEditor.h @@ -80,6 +80,9 @@ public: void updateVisualizer(); + void saveEditorParameters(XmlElement* xml); + void loadEditorParameters(XmlElement* xml); + ScopedPointer<DataWindow> dataWindow; ScopedPointer<Visualizer> canvas; diff --git a/Source/Processors/GenericProcessor.cpp b/Source/Processors/GenericProcessor.cpp index bc156d8c875d7138d1e46d5fdc01394017e10373..c3d76f8b60ac00cfecc41f5d00a90931a56f33f4 100755 --- a/Source/Processors/GenericProcessor.cpp +++ b/Source/Processors/GenericProcessor.cpp @@ -534,9 +534,11 @@ void GenericProcessor::saveParametersToChannelsXml(juce::XmlElement* channelPare void GenericProcessor::saveToXml(juce::XmlElement* parentElement) { - std::cout <<"Creating Channels" << std::endl; + std::cout <<"Creating channel xml elements" << std::endl; + String channelName; XmlElement* channelChildNode; + XmlElement* editorChildNode; int numChannels = channels.size(); //I'm unsure whether or not the name or XML elements should include whether they're normal or event channels–it probably depends on loading implementation @@ -548,17 +550,19 @@ void GenericProcessor::saveToXml(juce::XmlElement* parentElement) saveParametersToChannelsXml(channelChildNode, i); } - int numEventChannels = eventChannels.size(); + // int numEventChannels = eventChannels.size(); - for (int i = 1; i <= numEventChannels; i++) - { + // for (int i = 1; i <= numEventChannels; i++) + // { - channelName=/**String("EventCh:")+*/String(i); - channelChildNode = parentElement->createNewChildElement("EVENTCHANNEL"); - channelChildNode->setAttribute("name", channelName); - saveParametersToChannelsXml(channelChildNode, i); - } + // channelName=/**String("EventCh:")+*/String(i); + // channelChildNode = parentElement->createNewChildElement("EVENTCHANNEL"); + // channelChildNode->setAttribute("name", channelName); + // saveParametersToChannelsXml(channelChildNode, i); + // } + editorChildNode = parentElement->createNewChildElement("EDITOR"); + getEditor()->saveEditorParameters(editorChildNode); } @@ -593,6 +597,9 @@ void GenericProcessor::loadFromXml() subNode->getBoolAttribute("audio")); } } + } else if (xmlNode->hasTagName("EDITOR")) + { + getEditor()->loadEditorParameters(xmlNode); } }