summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-09-11 08:42:30 +0100
committerTim Redfern <tim@eclectronics.org>2012-09-11 08:42:30 +0100
commit8cba80bd1a624d424b1ef82b8c3394e30ae1bcf7 (patch)
tree8460c1c29e1fd1f29451728bd9537c150bf1c8c2
parent4a43e83a3c4a43925a0a99ceba7a292a58bbccf0 (diff)
making multiwindow
-rwxr-xr-xliveengine/addons.make1
-rw-r--r--liveengine/liveengine.layout18
-rw-r--r--liveengine/src/layers.cpp2
-rw-r--r--liveengine/src/layers.h6
-rwxr-xr-xliveengine/src/testApp.cpp4
-rwxr-xr-xliveengine/src/testApp.h19
6 files changed, 34 insertions, 16 deletions
diff --git a/liveengine/addons.make b/liveengine/addons.make
index d6be812..d84b231 100755
--- a/liveengine/addons.make
+++ b/liveengine/addons.make
@@ -2,3 +2,4 @@ ofxXmlSettings
ofxMidi
ofxSVG
ofxSVGTiny
+ofxFenster
diff --git a/liveengine/liveengine.layout b/liveengine/liveengine.layout
index b43ca8b..dec38e1 100644
--- a/liveengine/liveengine.layout
+++ b/liveengine/liveengine.layout
@@ -4,8 +4,8 @@
<File name="Makefile" open="0" top="0" tabpos="2">
<Cursor position="0" topLine="117" />
</File>
- <File name="addons.make" open="0" top="0" tabpos="1">
- <Cursor position="42" topLine="0" />
+ <File name="addons.make" open="1" top="0" tabpos="7">
+ <Cursor position="53" topLine="0" />
</File>
<File name="bin/data/insects.xml" open="0" top="0" tabpos="9">
<Cursor position="3136" topLine="14" />
@@ -17,18 +17,18 @@
<Cursor position="477" topLine="0" />
</File>
<File name="src/layers.cpp" open="1" top="0" tabpos="2">
- <Cursor position="1853" topLine="23" />
+ <Cursor position="650" topLine="0" />
</File>
<File name="src/layers.h" open="1" top="0" tabpos="1">
- <Cursor position="107" topLine="21" />
+ <Cursor position="40" topLine="1" />
</File>
- <File name="src/main.cpp" open="0" top="0" tabpos="7">
+ <File name="src/main.cpp" open="1" top="0" tabpos="8">
<Cursor position="220" topLine="0" />
</File>
- <File name="src/testApp.cpp" open="1" top="1" tabpos="3">
- <Cursor position="1650" topLine="48" />
+ <File name="src/testApp.cpp" open="1" top="0" tabpos="4">
+ <Cursor position="1715" topLine="45" />
</File>
- <File name="src/testApp.h" open="1" top="0" tabpos="4">
- <Cursor position="2008" topLine="55" />
+ <File name="src/testApp.h" open="1" top="0" tabpos="3">
+ <Cursor position="3211" topLine="121" />
</File>
</CodeBlocks_layout_file>
diff --git a/liveengine/src/layers.cpp b/liveengine/src/layers.cpp
index d7c7d77..6ab91ca 100644
--- a/liveengine/src/layers.cpp
+++ b/liveengine/src/layers.cpp
@@ -8,7 +8,7 @@ svglayer::svglayer(string _f)
load(_f);
}
-int svglayer::load(string _f){
+void svglayer::load(string _f){
//check if files exits
svg.load(_f);
printf("%i paths\n",svg.getNumPath());
diff --git a/liveengine/src/layers.h b/liveengine/src/layers.h
index 2ebbd53..ae17989 100644
--- a/liveengine/src/layers.h
+++ b/liveengine/src/layers.h
@@ -12,10 +12,10 @@ class layer
virtual void load(string _f){};
virtual void draw(float a){};
virtual void draw(float a,unsigned char* controllers){ draw(a);};
- virtual bool getLoaded();
- protected:
- private:
+ bool getLoaded() {return isLoaded;};
+ protected:
bool isLoaded;
+ private:
};
class svglayer: public layer
diff --git a/liveengine/src/testApp.cpp b/liveengine/src/testApp.cpp
index 52a9cc3..4935803 100755
--- a/liveengine/src/testApp.cpp
+++ b/liveengine/src/testApp.cpp
@@ -61,7 +61,9 @@ void testApp::setup(){
*/
ofSetFrameRate(60);
rotate=0;
- scale=1.0f;
+ scale=1.0f;
+
+ prevWin.setup();
}
void testApp::makeColours() {
diff --git a/liveengine/src/testApp.h b/liveengine/src/testApp.h
index 4d769da..9104ac6 100755
--- a/liveengine/src/testApp.h
+++ b/liveengine/src/testApp.h
@@ -68,8 +68,8 @@ non random colours
#define NUM_CONTROLLERS 6
#define START_CONTROLLER 102
-
#include "ofxMidi.h"
+#include "ofxFensterManager.h"
#define NOTHING 0
#define BLOCKS 1
@@ -77,8 +77,21 @@ non random colours
#include "playlist.h"
+class previewWindow: public ofxFensterListener{
+public:
+ ~previewWindow(){
+ cout << "preview window destroyed" << endl;
+ }
+ void setup(){
+ }
+ void draw(ofTexture &grab){
+ grab.draw(0,0,ofGetWidth(),ofGetHeight());
+ }
+
+};
-class testApp : public ofBaseApp, public ofxMidiListener{
+
+class testApp : public ofxFensterListener, public ofxMidiListener{
public:
@@ -121,6 +134,8 @@ class testApp : public ofBaseApp, public ofxMidiListener{
ofTexture grab;
+ previewWindow prevWin;
+
int midiChannel;
ofxMidiIn midiIn;