diff --git a/Builds/Linux/Makefile b/Builds/Linux/Makefile index 3b23dd951c9435fe4ccfa3fb791b52c426058d60..100959547e9c062db5a757fcc25c70cebc8e411e 100644 --- a/Builds/Linux/Makefile +++ b/Builds/Linux/Makefile @@ -43,6 +43,7 @@ ifeq ($(CONFIG),Release) endif OBJECTS := \ + $(OBJDIR)/AccessClass_de9602d5.o \ $(OBJDIR)/PracticalSocket_2574ecc8.o \ $(OBJDIR)/Bessel_63b88b81.o \ $(OBJDIR)/Biquad_479045c5.o \ @@ -129,6 +130,11 @@ clean: -@rm -rf $(OBJDIR)/* -@rm -rf $(OBJDIR) +$(OBJDIR)/AccessClass_de9602d5.o: ../../Source/AccessClass.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling AccessClass.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + $(OBJDIR)/PracticalSocket_2574ecc8.o: ../../Source/Network/PracticalSocket.cpp -@mkdir -p $(OBJDIR) @echo "Compiling PracticalSocket.cpp" diff --git a/Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj b/Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj index c8de8e43c9c9e543d99fc122e6f1de6917517a33..74850e892d74ade09c51b67747ae7dc5b68a7fa9 100644 --- a/Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj +++ b/Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ C038A696FD85E64E249AF737 = { isa = PBXBuildFile; fileRef = 191441B631182A346D494BB5; }; 881EDBF5D2D6FD7B53B71182 = { isa = PBXBuildFile; fileRef = 1CBCB9D2FE5B967D93785E75; }; 14BE1E76E7BB3593A5F66DCC = { isa = PBXBuildFile; fileRef = BF41F256D0C244C2C02AE6E1; }; + 09E5633D492B59E418AC11C9 = { isa = PBXBuildFile; fileRef = CA0A1584725D21237DBCD70A; }; D379BC3417418182ECFA5716 = { isa = PBXBuildFile; fileRef = 673778A175624FC9F52E7A15; }; 2C6D200191B27DDF088B3089 = { isa = PBXBuildFile; fileRef = B30EF131FE61BAA4C1818102; }; BF78E6E9903CF5A5C53789B9 = { isa = PBXBuildFile; fileRef = 07AE46453303977ED64E38ED; }; @@ -123,6 +124,8 @@ 294B78ADA337603DE3C87BF9 = { isa = PBXFileReference; lastKnownFileType = image.png; name = "PipelineA-02.png"; path = "../../Resources/Images/Buttons/PipelineA-02.png"; sourceTree = SOURCE_ROOT; }; 8AD9A0F023B727B34348B95E = { isa = PBXFileReference; lastKnownFileType = image.png; name = "PipelineB-01.png"; path = "../../Resources/Images/Buttons/PipelineB-01.png"; sourceTree = SOURCE_ROOT; }; 89CF25CB48EEA21B226869E1 = { isa = PBXFileReference; lastKnownFileType = image.png; name = "PipelineB-02.png"; path = "../../Resources/Images/Buttons/PipelineB-02.png"; sourceTree = SOURCE_ROOT; }; + CA0A1584725D21237DBCD70A = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = AccessClass.cpp; path = ../../Source/AccessClass.cpp; sourceTree = SOURCE_ROOT; }; + 63992CB3AC42F91A51135EAC = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AccessClass.h; path = ../../Source/AccessClass.h; sourceTree = SOURCE_ROOT; }; 673778A175624FC9F52E7A15 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PracticalSocket.cpp; path = ../../Source/Network/PracticalSocket.cpp; sourceTree = SOURCE_ROOT; }; 2EAE0475B719C3233AD8BB35 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PracticalSocket.h; path = ../../Source/Network/PracticalSocket.h; sourceTree = SOURCE_ROOT; }; B30EF131FE61BAA4C1818102 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Bessel.cpp; path = ../../Source/Dsp/Bessel.cpp; sourceTree = SOURCE_ROOT; }; @@ -444,6 +447,8 @@ 2A78F719BAFBDCD63AE9A88A, DB605BA15852F367DF625300 ); name = UI; sourceTree = "<group>"; }; 98D3BECE25EB3CF1F64F54B4 = { isa = PBXGroup; children = ( + CA0A1584725D21237DBCD70A, + 63992CB3AC42F91A51135EAC, 8F98BACF97340868397BA4BB, B3AB794228C0205240A8F72E, FFA2631FEEE7932BE08907A6, @@ -554,6 +559,7 @@ 5D7484BAF16E272FF0E9EEAE ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; 7D11CCCE7B7FAA037837E9F0 = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 49B8C83C4A6BA460E2492EAD = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 09E5633D492B59E418AC11C9, D379BC3417418182ECFA5716, 2C6D200191B27DDF088B3089, BF78E6E9903CF5A5C53789B9, diff --git a/Source/AccessClass.cpp b/Source/AccessClass.cpp new file mode 100644 index 0000000000000000000000000000000000000000..494d0bb2e86f989875ed1d58325edc7eea3c1811 --- /dev/null +++ b/Source/AccessClass.cpp @@ -0,0 +1,33 @@ +/* + ============================================================================== + + AccessClass.cpp + Created: 1 Mar 2012 1:36:31pm + Author: jsiegle + + ============================================================================== +*/ + +#include "AccessClass.h" + +#include "UI/UIComponent.h" +#include "UI/FilterViewport.h" +#include "UI/FilterList.h" +#include "UI/DataViewport.h" +#include "UI/Configuration.h" +#include "UI/ControlPanel.h" +#include "UI/MessageCenter.h" +#include "Processors/ProcessorGraph.h" + +void AccessClass::setUIComponent(UIComponent* ui_) +{ + ui = ui_; + + fv = ui->getFilterViewport(); + dv = ui->getDataViewport(); + fl = ui->getFilterList(); + pg = ui->getProcessorGraph(); + cp = ui->getControlPanel(); + mc = ui->getMessageCenter(); + cf = ui->getConfiguration(); +} diff --git a/Source/AccessClass.h b/Source/AccessClass.h new file mode 100644 index 0000000000000000000000000000000000000000..57640d815f77a8d08c762fe6af2d17f8fbb63260 --- /dev/null +++ b/Source/AccessClass.h @@ -0,0 +1,57 @@ +/* + ============================================================================== + + AccessClass.h + Created: 1 Mar 2012 1:17:45pm + Author: jsiegle + + ============================================================================== +*/ + +#ifndef __ACCESSCLASS_H_CE1DC2DE__ +#define __ACCESSCLASS_H_CE1DC2DE__ + + + +class UIComponent; +class FilterViewport; +class FilterList; +class DataViewport; +class ProcessorGraph; +class MessageCenter; +class ControlPanel; +class Configuration; + +class AccessClass +{ +public: + + AccessClass() { } + ~AccessClass() { } + + void setUIComponent(UIComponent*); + + FilterViewport* getFilterViewport() {return fv;} + DataViewport* getDataViewport() {return dv;} + FilterList* getFilterList() {return fl;} + ProcessorGraph* getProcessorGraph() {return pg;} + ControlPanel* getControlPanel() {return cp;} + MessageCenter* getMessageCenter() {return mc;} + UIComponent* getUIComponent() {return ui;} + Configuration* getConfiguration() {return cf;} + +private: + + UIComponent* ui; + FilterViewport* fv; + FilterList* fl; + DataViewport* dv; + ProcessorGraph* pg; + ControlPanel* cp; + MessageCenter* mc; + Configuration* cf; + +}; + + +#endif // __ACCESSCLASS_H_CE1DC2DE__ diff --git a/Source/UI/FilterList.cpp b/Source/UI/FilterList.cpp index c5a27adc14396ee8332a469a866399d8a02f47e5..ab50ac9cd7d1030c506ecef3b6ac88521d2edf27 100644 --- a/Source/UI/FilterList.cpp +++ b/Source/UI/FilterList.cpp @@ -358,11 +358,11 @@ void FilterList::mouseDown(const MouseEvent& e) if (fli == baseItem) { if (fli->isOpen()) { - UI->childComponentChanged(); + getUIComponent()->childComponentChanged(); } else { - UI->childComponentChanged(); + getUIComponent()->childComponentChanged(); //setBounds(0,0,225,itemHeight + 2*yBuffer); totalHeight = itemHeight + 2*yBuffer; } diff --git a/Source/UI/FilterList.h b/Source/UI/FilterList.h index bed15e48b57a4feb48b1c8fe80e45ed81a741360..e430209e915dca40a059a5a2a35d3943de47928c 100644 --- a/Source/UI/FilterList.h +++ b/Source/UI/FilterList.h @@ -26,6 +26,7 @@ #include "../../JuceLibraryCode/JuceHeader.h" #include "../Processors/Visualization/OpenGLCanvas.h" +#include "../AccessClass.h" /** @@ -43,10 +44,10 @@ class FilterListItem; class UIComponent; class FilterList : public OpenGLCanvas, - public DragAndDropContainer + public DragAndDropContainer, + public AccessClass { - public: FilterList(); @@ -54,7 +55,7 @@ public: void newOpenGLContextCreated(); void renderOpenGL(); - void setUIComponent(UIComponent* ui) {UI = ui;} + //void setUIComponent(UIComponent* ui) {UI = ui;} bool isOpen(); @@ -77,7 +78,7 @@ private: int totalHeight, itemHeight, subItemHeight; int xBuffer, yBuffer; - UIComponent* UI; + //UIComponent* UI; String category; diff --git a/Source/UI/UIComponent.cpp b/Source/UI/UIComponent.cpp index c35033e156b8889ae7e7b57b558156fa382b9eb2..9a6d31a8508708c0ed245354301d9580b848e970 100644 --- a/Source/UI/UIComponent.cpp +++ b/Source/UI/UIComponent.cpp @@ -55,7 +55,7 @@ UIComponent::UIComponent (MainWindow* mainWindow_, ProcessorGraph* pgraph, Audio std::cout << "Created control panel." << std::endl; filterList = new FilterList(); - filterList->setUIComponent(this); + //filterList->setUIComponent(this); addAndMakeVisible(filterList); std::cout << "Created filter list." << std::endl; @@ -83,6 +83,7 @@ UIComponent::UIComponent (MainWindow* mainWindow_, ProcessorGraph* pgraph, Audio std::cout << "Finished UI stuff." << std::endl << std::endl << std::endl; + filterList->setUIComponent(this); processorGraph->loadState(); } diff --git a/Source/UI/UIComponent.h b/Source/UI/UIComponent.h index ad8ee577633e2909d7fb4d8c870f3e7b033a4a7a..f2d61a067d2eea5385ff778357344096bf1b6a37 100644 --- a/Source/UI/UIComponent.h +++ b/Source/UI/UIComponent.h @@ -51,6 +51,7 @@ */ class MainWindow; +class FilterList; class FilterViewportButton; @@ -68,8 +69,13 @@ public: ~UIComponent(); FilterViewport* getFilterViewport() {return filterViewport;} + FilterList* getFilterList() {return filterList;} DataViewport* getDataViewport() {return dataViewport;} Configuration* getConfiguration() {return config;} + ProcessorGraph* getProcessorGraph() {return processorGraph;} + ControlPanel* getControlPanel() {return controlPanel;} + MessageCenter* getMessageCenter() {return messageCenter;} + UIComponent* getUIComponent() {return this;} //void transmitMessage(const String& message); void disableCallbacks(); diff --git a/open-ephys.jucer b/open-ephys.jucer index 9a588617db7a5b42f4a4cc52d50da19efc1478eb..25813c92676c9e29dc00b46129fb339afb1b7844 100644 --- a/open-ephys.jucer +++ b/open-ephys.jucer @@ -68,6 +68,9 @@ </GROUP> </GROUP> <GROUP id="ZMfWAFj" name="Source"> + <FILE id="AXFRUPT" name="AccessClass.cpp" compile="1" resource="0" + file="Source/AccessClass.cpp"/> + <FILE id="2ViPrE" name="AccessClass.h" compile="0" resource="0" file="Source/AccessClass.h"/> <GROUP id="leJrZDi" name="Network"> <FILE id="mOOc0R" name="PracticalSocket.cpp" compile="1" resource="0" file="Source/Network/PracticalSocket.cpp"/>